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 +35 -7 23.0.1 → 24.1.0 View file →
@@ -227,8 +227,23 @@
227 227 'css_vars' => array(
228 228 'dimension' => '--wp--preset--dimension--$slug',
229 229 ),
230 230 ),
231 + 'minWidth' => array(
232 + 'property_keys' => array(
233 + 'default' => 'min-width',
234 + ),
235 + 'path' => array( 'dimensions', 'minWidth' ),
236 + 'css_vars' => array(
237 + 'dimension' => '--wp--preset--dimension--$slug',
238 + ),
239 + ),
240 + 'objectFit' => array(
241 + 'property_keys' => array(
242 + 'default' => 'object-fit',
243 + ),
244 + 'path' => array( 'dimensions', 'objectFit' ),
245 + ),
231 246 'width' => array(
232 247 'property_keys' => array(
233 248 'default' => 'width',
234 249 ),
@@ -320,8 +335,20 @@
320 335 'default' => 'text-indent',
321 336 ),
322 337 'path' => array( 'typography', 'textIndent' ),
323 338 ),
339 + 'textShadow' => array(
340 + 'property_keys' => array(
341 + 'default' => 'text-shadow',
342 + ),
343 + 'css_vars' => array(
344 + 'text-shadow' => '--wp--preset--text-shadow--$slug',
345 + ),
346 + 'path' => array( 'typography', 'textShadow' ),
347 + 'classnames' => array(
348 + 'has-$slug-text-shadow' => 'text-shadow',
349 + ),
350 + ),
324 351 'textTransform' => array(
325 352 'property_keys' => array(
326 353 'default' => 'text-transform',
327 354 ),
@@ -360,10 +387,10 @@
360 387
361 388 /**
362 389 * Util: Generates a CSS var string, e.g., var(--wp--preset--color--background) from a preset string such as `var:preset|space|50`.
363 390 *
364 - * @param string $style_value A single CSS preset value.
365 - * @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.
366 393 *
367 394 * @return string The css var, or an empty string if no match for slug found.
368 395 */
369 396 protected static function get_css_var_value( $style_value, $css_vars ) {
@@ -382,9 +409,9 @@
382 409
383 410 /**
384 411 * Util: Checks whether an incoming block style value is valid.
385 412 *
386 - * @param string? $style_value A single css preset value.
413 + * @param string? $style_value A single css preset value.
387 414 *
388 415 * @return bool
389 416 */
390 417 protected static function is_valid_style_value( $style_value ) {
@@ -393,12 +420,13 @@
393 420
394 421 /**
395 422 * Stores a CSS rule using the provided CSS selector and CSS declarations.
396 423 *
397 - * @param string $store_name A valid store key.
398 - * @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.
399 - * @param string[] $css_declarations An associative array of CSS definitions, e.g., array( "$property" => "$value", "$property" => "$value" ).
400 - * @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`.
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.
426 + * @param string[]|WP_Style_Engine_CSS_Declarations_Gutenberg $css_declarations An associative array of CSS definitions, e.g., array( "$property" => "$value", "$property" => "$value" ),
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`.
401 429 *
402 430 * @return void.
403 431 */
404 432 public static function store_css_rule( $store_name, $css_selector, $css_declarations, $rules_group = '' ) {