mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 11:47:23 +03:00
9b0da552e7
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; } ```
41 lines
1 KiB
SCSS
41 lines
1 KiB
SCSS
/*
|
|
Copyright 2022 The Matrix.org Foundation C.I.C.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/
|
|
|
|
.mx_JumpToDatePicker_form {
|
|
display: flex;
|
|
// This matches the default padding of IconizedContextMenuOption
|
|
// (see context_menus/_IconizedContextMenu.scss)
|
|
padding-top: 12px;
|
|
padding-bottom: 12px;
|
|
}
|
|
|
|
.mx_JumpToDatePicker_label {
|
|
align-self: center;
|
|
font-size: $font-15px;
|
|
}
|
|
|
|
.mx_JumpToDatePicker_datePicker {
|
|
margin: 0;
|
|
margin-left: 8px;
|
|
|
|
&, & > input {
|
|
border-radius: 8px;
|
|
}
|
|
}
|
|
|
|
.mx_JumpToDatePicker_submitButton {
|
|
margin-left: 8px;
|
|
}
|