File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 * requiring each individual component to implement styles for it
1212 *
1313 * This file is _not_ automatically generated
14+ *
15+ * The checked-sibling selector is deliberately scoped to `.ox-radio-card`
16+ * rather than `*`. A bare `*` on the right of `~` gets evaluated against every
17+ * element in the document, and Gecko then flags every parent as having
18+ * sibling-dependent children. Removing a child from such a parent restyles all
19+ * of its later siblings and their subtrees, so removing the top rows of a
20+ * virtualized list (audit log, on scroll) restyled every remaining row: ~20ms
21+ * per scroll step in Firefox, most of the main-thread time during a fling.
22+ * Stylo sets the flag whenever a sibling combinator is evaluated, matched or
23+ * not: https://github.com/servo/stylo/blob/11cc72d/selectors/matching.rs#L885-L889
24+ * and https://github.com/servo/stylo/blob/11cc72d/selectors/matching.rs#L43-L46
25+ * Gecko acts on it in RestyleManager::RestyleForRemove (layout/base/RestyleManager.cpp).
1426 */
1527. is-selected ,
16- : checked ~ * {
28+ : checked ~ . ox-radio-card {
1729 --content-default : var ( --theme-accent-800 ) ;
1830 --content-secondary : var ( --theme-accent-700 ) ;
1931 --content-tertiary : var ( --theme-accent-700 ) ;
You can’t perform that action at this time.
0 commit comments