wpseek.com
WordPress开发者和主题制作者的搜索引擎
wp_get_state_text_fill_reset › WordPress Function
Since7.2.0
已弃用n/a
› wp_get_state_text_fill_reset ( $state_style )
| 参数: |
|
| 返回: |
|
| 定义在: |
|
| 文档: |
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.源码
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' );
}