aboutsummaryrefslogtreecommitdiff
path: root/resources/assets/stylesheets/scss/talk-bubble.scss
blob: 380fb6dfc6bccf316b4b71a757f3976e07678702 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
$color: var(--base-color-20);
$ownColor: var(--petrol-40);

.talk-bubble-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: start;

    .talk-bubble-avatar {
        padding: 8px;
        width: 40px;
        height: 40px;

        img {
            width: 100%;
            height: 100%;
        }
    }

    .talk-bubble {
        margin: 10px 20px;
        position: relative;
        max-width: 80%;
        height: auto;
        background-color: $color;
        border-radius: 10px;

        &.editing {
            min-width: 50%;
        }

        .talk-bubble-content {
            padding: 8px 1em;

            .talk-bubble-header {
                margin-bottom: 8px;

                a {
                    font-weight: 700;
                }
            }

            .talk-bubble-talktext {
                margin-bottom: 4px;
                text-align: left;
                line-height: 1.5em;

                .html {
                    display: inline;

                    .formatted-content {
                        display: inline;
                    }

                    .opengraph,
                    blockquote {
                        background-color: rgba(255, 255, 255, 0.5);
                    }

                    video {
                        max-width: 100%;
                    }

                    img {
                        max-height: 70vh;
                    }
                }

                .talk-bubble-edit {
                    display: flex;
                    align-items: flex-end;
                    gap: 2px;

                    textarea {
                        flex-grow: 1;
                    }

                    button {
                        width: 24px;
                        height: 24px;
                        border: solid thin var(--base-color);
                        background-color: var(--white);
                        cursor: pointer;

                        img {
                            vertical-align: middle;
                        }
                    }
                }

                .talk-bubble-footer {
                    float: right;
                    margin-top: 4px;
                    padding-bottom: 4px;

                    &:before {
                        content: " ";
                        display: inline-block;
                        width: 1em;
                    }

                    .talk-bubble-talktext-time {
                        text-align: right;
                        font-size: 0.8em;
                        margin-bottom: -0.5em;
                    }
                }

            }
        }

        &:after {
            content: ' ';
            position: absolute;
            width: 0;
            height: 0;
            top: 0px;
            bottom: auto;
            border: 16px solid;
            border-color: $color transparent transparent transparent;
            border-radius: 4px;
            left: -14px;
            right: auto;
        }
    }

    &.talk-bubble-own-post {
        justify-content: end;

        .talk-bubble {
            flex-direction: row-reverse;
            background-color: $ownColor;

            &:after {
                border-color: $ownColor transparent transparent transparent;
                left: auto;
                right: -14px;
            }
        }


        .talk-bubble-header {
            flex-direction: row-reverse;
        }
    }
}