element-web/res/css/views
Eric Eastwood 9b0da552e7
Fix vertical spacing in compact <ContextMenu> (#7684)
Fix https://github.com/vector-im/element-web/issues/20801

Regressed in https://github.com/matrix-org/matrix-react-sdk/pull/7339

Relevant styles were first added in https://github.com/matrix-org/matrix-react-sdk/pull/4858
(context behind why the original styles were added)

---

## Cause

Battling CSS specificity between the default and compact styles, https://specificity.keegan.st/

Known good (On `app.element.io` (expected)):
```css
// 0 3 0
.mx_IconizedContextMenu .mx_IconizedContextMenu_optionList .mx_AccessibleButton {
    padding-top: 12px;
    padding-bottom: 12px;
}

// Compact styles override our default rules because they come
// after the other styles (source order) and have the same specificity
// 0 3 0
.mx_IconizedContextMenu.mx_IconizedContextMenu_compact .mx_IconizedContextMenu_optionList > * {
    padding: 8px 16px 8px 11px;
}
```

Bad (On `develop` (broken)):
```css
// Default rules always override because they have higher specificity.
// The `:not()` selector doesn't add any extra specificity but the selectors inside the `:not(...)` do.
// 0 4 0
.mx_IconizedContextMenu .mx_IconizedContextMenu_optionList .mx_AccessibleButton:not(.mx_AccessibleButton_hasKind) {
    padding-top: 12px;
    padding-bottom: 12px;
}

// 0 3 0
.mx_IconizedContextMenu.mx_IconizedContextMenu_compact .mx_IconizedContextMenu_optionList > * {
    padding: 8px 16px 8px 11px;
}
```
2022-02-01 11:23:21 -06:00
..
audio_messages $voice-record-waveform-incomplete-fg-color -> $quaternary-content 2021-10-16 20:34:24 +02:00
auth Color cleanup 8 (#7108) 2021-11-11 13:37:29 +00:00
avatars Spotlight search labs (#7116) 2021-12-10 11:50:01 +00:00
beta Color cleanup 8 (#7108) 2021-11-11 13:37:29 +00:00
context_menus Fix vertical spacing in compact <ContextMenu> (#7684) 2022-02-01 11:23:21 -06:00
dialogs Chat export parameter customisation (#7647) 2022-01-31 12:54:14 +01:00
directory Color cleanup 8 (#7108) 2021-11-11 13:37:29 +00:00
elements Enlarge emoji in composer (#7602) 2022-01-24 12:53:05 +00:00
emojipicker Color cleanup 8 (#7108) 2021-11-11 13:37:29 +00:00
groups
location Add user avatar to location sharing dialog (#7520) 2022-01-12 13:32:08 +00:00
messages Fix vertical spacing in compact <ContextMenu> (#7684) 2022-02-01 11:23:21 -06:00
right_panel Wrap status message (#7325) 2021-12-28 13:54:54 -07:00
room_settings Color cleanup 8 (#7108) 2021-11-11 13:37:29 +00:00
rooms Make polls fill column width in bubbles layout (#7661) 2022-02-01 09:27:14 +00:00
settings De-labs Metaspaces (#7613) 2022-01-25 12:33:17 +00:00
spaces Task/colors 11 (#7211) 2021-11-29 12:52:09 +00:00
terms Color cleanup 8 (#7108) 2021-11-11 13:37:29 +00:00
toasts Analytics opt in for posthog (#6936) 2021-12-06 09:39:33 +11:00
typography Add Heading components (#7362) 2021-12-15 11:00:10 +01:00
verification Fix look of emoji verification (#7133) 2021-11-15 09:09:19 +00:00
voip Add ability to switch between voice & video in calls (#7155) 2022-01-24 12:48:35 +00:00