Skip to content

Commit

Permalink
Make preset values !important
Browse files Browse the repository at this point in the history
Given how the style system works, !important is a good choice
for preset classes the user attaches to the post content.
If those values need to be overridden, in addition to regular CSS,
we can offer hooks for the theme.json processing,
so plugins have an alternate mechanism to modify this behavior.
  • Loading branch information
oandregal committed Mar 4, 2021
1 parent fc91941 commit 980a0b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/class-wp-theme-json.php
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ private static function compute_preset_classes( $settings, $selector ) {
array(
array(
'name' => $class['property_name'],
'value' => $value[ $preset['value_key'] ],
'value' => $value[ $preset['value_key'] ] . ' !important',
),
)
);
Expand Down

0 comments on commit 980a0b6

Please sign in to comment.