|
1 | 1 | @use '../../../styling/utils'; |
2 | 2 |
|
| 3 | +$message-active-background-color: transparent; |
| 4 | +$message-reactions-host-offset-x: calc(var(--spacing-xs) * -1); |
| 5 | + |
3 | 6 | .str-chat { |
4 | 7 | /* The width/height of the message options button(s) */ |
5 | 8 | --str-chat__message-options-button-size: var(--size-32); |
6 | | - --str-chat__message-active-background-color: transparent; |
7 | | - --str-chat__message-reactions-host-offset-x: calc(var(--spacing-xs) * -1); |
8 | 9 | /* The maximum allowed width of the message component */ |
9 | 10 | --str-chat__message-max-width: 400px; |
10 | 11 | /* The maximum allowed width of the message component, if it has attachments */ |
|
273 | 274 | } |
274 | 275 |
|
275 | 276 | &:has(.str-chat__message-reactions--top) { |
276 | | - padding-inline-start: calc( |
277 | | - var(--str-chat__message-reactions-host-offset-x) * -1 |
278 | | - ); |
| 277 | + padding-inline-start: calc($message-reactions-host-offset-x * -1); |
279 | 278 |
|
280 | | - margin-inline-end: var(--str-chat__message-reactions-host-offset-x); |
| 279 | + margin-inline-end: $message-reactions-host-offset-x; |
281 | 280 | } |
282 | 281 |
|
283 | 282 | .str-chat__message-reactions.str-chat__message-reactions--segmented.str-chat__message-reactions--bottom |
|
318 | 317 | } |
319 | 318 |
|
320 | 319 | &:has(.str-chat__message-reactions--top) { |
321 | | - padding-inline-end: calc(var(--str-chat__message-reactions-host-offset-x) * -1); |
| 320 | + padding-inline-end: calc($message-reactions-host-offset-x * -1); |
322 | 321 |
|
323 | | - margin-inline-start: var(--str-chat__message-reactions-host-offset-x); |
| 322 | + margin-inline-start: $message-reactions-host-offset-x; |
324 | 323 | } |
325 | 324 |
|
326 | 325 | .str-chat__message-reactions.str-chat__message-reactions--segmented.str-chat__message-reactions--bottom |
|
534 | 533 |
|
535 | 534 | /* This rule won't be applied in browsers that don't support :has() */ |
536 | 535 | .str-chat__li:hover:not(:has(.str-chat__reaction-list:hover, .str-chat__modal--open)) { |
537 | | - background-color: var(--str-chat__message-active-background-color); |
| 536 | + background-color: $message-active-background-color; |
538 | 537 | } |
539 | 538 |
|
540 | 539 | /* Fallback for when :has() is unsupported */ |
541 | 540 | @supports not selector(:has(a, b)) { |
542 | 541 | .str-chat__li:hover { |
543 | | - background-color: var(--str-chat__message-active-background-color); |
| 542 | + background-color: $message-active-background-color; |
544 | 543 | } |
545 | 544 | } |
546 | 545 |
|
|
0 commit comments