wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
wp_get_state_text_fill_reset › WordPress Function
Seit7.2.0
Veraltetn/v
› wp_get_state_text_fill_reset ( $state_style )
| Parameter: |
|
| Gibt zurück: |
|
| Definiert in: |
|
| Codex: |
Returns the declarations that refill the letters when a state sets a text color but no clip.
The fill is added even without a known text clip, since a block instance cannot see a clip set in global styles. It does nothing when no clip applies. Mirror ofgetStateTextFillResetCSS in packages/block-editor/src/hooks/style.jsx.Quellcode
function wp_get_state_text_fill_reset( array $state_style ): array {
$state_clip = $state_style['background']['backgroundClip'] ?? '';
if ( ! in_array( $state_clip, WP_Style_Engine::VALID_BACKGROUND_CLIP_VALUES, true ) ) {
$state_clip = '';
}
if ( ! empty( $state_clip ) || empty( $state_style['color']['text'] ) || wp_state_paints_own_background( $state_style ) ) {
return array();
}
return array( '-webkit-text-fill-color' => 'currentColor' );
}