element-web/res/css
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
..
structures Fix warning image overflow in space hierarchy (#7686) 2022-02-01 10:21:58 +05:30
views Fix vertical spacing in compact <ContextMenu> (#7684) 2022-02-01 11:23:21 -06:00
_animations.scss Handle prefers-reduced-motion 2021-09-21 17:42:23 +02:00
_common.scss Make LocationPicker appearance cleaner (#7516) 2022-01-12 09:19:26 +00:00
_components.scss Add jump to date functionality to date headers in timeline v2 (#7339) 2022-01-27 16:32:12 -06:00
_font-sizes.scss Use rem to guard against font scaling breakages 2020-07-16 20:15:28 +05:30
_font-weights.scss Iterate PR, tweak margins 2020-08-18 12:00:56 +01:00
_spacing.scss add spacing variables (#7456) 2022-01-04 10:15:20 -07:00
rethemendex.sh Remove sort and include new scss file in components 2020-04-02 13:42:59 +01:00