PluginProbe
Gutenberg / 24.1.0
Gutenberg v24.1.0
24.1.0 24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 All 404 releases
← All changes | build/scripts/style-engine/class-wp-style-engine-gutenberg.php +13 -7 23.9.1 → 24.1.0 View file →
@@ -339,9 +339,15 @@
339 339 'textShadow' => array(
340 340 'property_keys' => array(
341 341 'default' => 'text-shadow',
342 342 ),
343 + 'css_vars' => array(
344 + 'text-shadow' => '--wp--preset--text-shadow--$slug',
345 + ),
343 346 'path' => array( 'typography', 'textShadow' ),
347 + 'classnames' => array(
348 + 'has-$slug-text-shadow' => 'text-shadow',
349 + ),
344 350 ),
345 351 'textTransform' => array(
346 352 'property_keys' => array(
347 353 'default' => 'text-transform',
@@ -381,10 +387,10 @@
381 387
382 388 /**
383 389 * Util: Generates a CSS var string, e.g., var(--wp--preset--color--background) from a preset string such as `var:preset|space|50`.
384 390 *
385 - * @param string $style_value A single CSS preset value.
386 - * @param string[] $css_vars An associate array of CSS var patterns used to generate the var string.
391 + * @param string $style_value A single CSS preset value.
392 + * @param string[] $css_vars An associate array of CSS var patterns used to generate the var string.
387 393 *
388 394 * @return string The css var, or an empty string if no match for slug found.
389 395 */
390 396 protected static function get_css_var_value( $style_value, $css_vars ) {
@@ -403,9 +409,9 @@
403 409
404 410 /**
405 411 * Util: Checks whether an incoming block style value is valid.
406 412 *
407 - * @param string? $style_value A single css preset value.
413 + * @param string? $style_value A single css preset value.
408 414 *
409 415 * @return bool
410 416 */
411 417 protected static function is_valid_style_value( $style_value ) {
@@ -414,13 +420,13 @@
414 420
415 421 /**
416 422 * Stores a CSS rule using the provided CSS selector and CSS declarations.
417 423 *
418 - * @param string $store_name A valid store key.
419 - * @param string $css_selector When a selector is passed, the function will return a full CSS rule `$selector { ...rules }`, otherwise a concatenated string of properties and values.
424 + * @param string $store_name A valid store key.
425 + * @param string $css_selector When a selector is passed, the function will return a full CSS rule `$selector { ...rules }`, otherwise a concatenated string of properties and values.
420 426 * @param string[]|WP_Style_Engine_CSS_Declarations_Gutenberg $css_declarations An associative array of CSS definitions, e.g., array( "$property" => "$value", "$property" => "$value" ),
421 - * or a WP_Style_Engine_CSS_Declarations_Gutenberg object.
422 - * @param string $rules_group Optional. A parent CSS selector in the case of nested CSS, or a CSS nested @rule, such as `@media (min-width: 80rem)` or `@layer module`.
427 + * or a WP_Style_Engine_CSS_Declarations_Gutenberg object.
428 + * @param string $rules_group Optional. A parent CSS selector in the case of nested CSS, or a CSS nested @rule, such as `@media (min-width: 80rem)` or `@layer module`.
423 429 *
424 430 * @return void.
425 431 */
426 432 public static function store_css_rule( $store_name, $css_selector, $css_declarations, $rules_group = '' ) {