From 980a0b6c981970388430d374cbe5d017c865c29c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= Date: Thu, 4 Mar 2021 11:26:24 +0100 Subject: [PATCH] Make preset values !important 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. --- lib/class-wp-theme-json.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/class-wp-theme-json.php b/lib/class-wp-theme-json.php index 716113f371def..32f3513fff8b9 100644 --- a/lib/class-wp-theme-json.php +++ b/lib/class-wp-theme-json.php @@ -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', ), ) );