Changeset 58751 for branches/6.6/src/wp-includes/class-wp-theme-json.php
- Timestamp:
- 07/18/2024 11:58:22 AM (5 months ago)
- Location:
- branches/6.6
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.6
-
branches/6.6/src/wp-includes/class-wp-theme-json.php
r58696 r58751 2880 2880 } 2881 2881 2882 /* 2883 * Top-level element styles using element-only specificity selectors should 2884 * not get wrapped in `:root :where()` to maintain backwards compatibility. 2885 * 2886 * Pseudo classes, e.g. :hover, :focus etc., are a class-level selector so 2887 * still need to be wrapped in `:root :where` to cap specificity for nested 2888 * variations etc. Pseudo selectors won't match the ELEMENTS selector exactly. 2889 */ 2890 $element_only_selector = $current_element && 2891 isset( static::ELEMENTS[ $current_element ] ) && 2892 // buttons, captions etc. still need `:root :where()` as they are class based selectors. 2893 ! isset( static::__EXPERIMENTAL_ELEMENT_CLASS_NAMES[ $current_element ] ) && 2894 static::ELEMENTS[ $current_element ] === $selector; 2895 2882 2896 // 2. Generate and append the rules that use the general selector. 2883 $block_rules .= static::to_ruleset( ":root :where($selector)", $declarations ); 2897 $general_selector = $element_only_selector ? $selector : ":root :where($selector)"; 2898 $block_rules .= static::to_ruleset( $general_selector, $declarations ); 2884 2899 2885 2900 // 3. Generate and append the rules that use the duotone selector.
Note: See TracChangeset
for help on using the changeset viewer.