What problem does this address?
Currently, CSS rules generated from theme.json settings get !important automatically added.
It's fine for theme authors who need to ensure that their CSS rules are not overridden by plugins or so.
But as a theme developer, working at web agency, I don't need those !important. I control the scope of custom plugins.
What is your proposed solution?
My solution is to add a filter, to opt out of adding those !important to CSS, in the compute_preset_classes function.
eg : add_filter( 'compute_preset_classes_important', '__return_false' );
What problem does this address?
Currently, CSS rules generated from theme.json settings get !important automatically added.
It's fine for theme authors who need to ensure that their CSS rules are not overridden by plugins or so.
But as a theme developer, working at web agency, I don't need those !important. I control the scope of custom plugins.
What is your proposed solution?
My solution is to add a filter, to opt out of adding those !important to CSS, in the
compute_preset_classesfunction.eg :
add_filter( 'compute_preset_classes_important', '__return_false' );