UNPKG

2.02 kBSCSSView Raw
1.str-chat__message-attachment-card {
2 position: relative;
3 background: var(--white);
4 border-radius: var(--border-radius) var(--border-radius) var(--border-radius) 0;
5 overflow: hidden;
6 font-size: var(--sm-font);
7 border: 10px solid var(--border);
8 margin: var(--lg-m) 0 0 0;
9
10 &--header {
11 width: 100%;
12 height: 175px;
13
14 img {
15 width: inherit;
16 height: inherit;
17 object-fit: cover;
18 }
19 }
20
21 &--title {
22 font-weight: var(--font-weight-bold);
23 flex: 1;
24 }
25
26 &--flex {
27 min-width: 0;
28
29 &,
30 > * {
31 overflow: hidden;
32 text-overflow: ellipsis;
33 }
34 }
35
36 &--content {
37 padding: var(--xs-p) var(--sm-p);
38 margin: calc(var(--xs-m) * -1);
39 display: flex;
40 flex-direction: row;
41 align-items: center;
42 justify-content: space-between;
43
44 > * {
45 margin: var(--xs-m) 0;
46 }
47 }
48
49 &--url {
50 text-decoration: none;
51 display: block;
52 color: var(--black);
53 text-transform: uppercase;
54 opacity: 0.5;
55
56 &::after {
57 content: '';
58 position: absolute;
59 top: 0;
60 right: 0;
61 bottom: 0;
62 left: 0;
63 }
64 }
65
66 &--giphy &--header {
67 height: unset;
68 }
69}
70
71.str-chat.commerce {
72 .str-chat__message-attachment-card {
73 max-width: 375px;
74 width: 100%;
75 }
76}
77
78.str-chat__message--me {
79 .str-chat__message-attachment-card {
80 background: var(--overlay);
81 border: 1px solid transparent;
82 border-radius: var(--border-radius) var(--border-radius) 0 var(--border-radius);
83 }
84}
85
86.dark.str-chat {
87 .str-chat__message-attachment-card__giphy-logo {
88 filter: invert(100%);
89 }
90}
91
92.str-chat__message-attachment-card.str-chat__message-attachment-card--giphy {
93 .str-chat__message-attachment-card--content {
94 background-image: url('#{$assetsPath}/Poweredby_100px-White_VertText.png');
95 background-position: right var(--border-radius) bottom var(--border-radius);
96 background-repeat: no-repeat;
97 /* that was the original sizing of the img in React */
98 background-size: 56px;
99 }
100}