wp-includes/block-supports/states.php:114Adds background reset declarations to prevent gradient/solid color conflicts.
$declarationsarrayarrayfunction wp_get_state_declarations_with_background_resets( $declarations ) { if ( ! is_array( $declarations ) ) { return $declarations; } $has_background_color = isset( $declarations['background-color'] ) && '' !== $declarations['background-color']; $has_background = isset( $declarations['background'] ) && '' !== $declarations['background']; $has_background_image = isset( $declarations['background-image'] ) && '' !== $declarations['background-image']; /* * When the state sets a solid background-color but no gradient of its own, * emit `background-image: unset` to clear any gradient (whether stored as * the `background` shorthand or as `background-image`) that was applied to * the default / normal state via an inline style attribute. The declaration * is marked important when the state rule is registered with the style engine. */ if ( $has_background_color && ! $has_background && ! $has_background_image ) { $declarations['background-image'] = 'unset'; } return $declarations;}Introduced in 7.1.0.
Signature, return type and hooks compared across 1 parsed release.
src/wp-includes/block-supports/states.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.