Make WordPress Core


Ignore:
Timestamp:
02/01/2023 06:05:44 PM (3 years ago)
Author:
hellofromTonya
Message:

Themes: Add shadow presets support for theme.json.

Adds shadow presets support for theme.json within the WP_Theme_JSON by

  • Adding it to presets metadata and valid settings.
  • Defining the default shadow presets in Core's theme.json.

Includes PHPUnit tests.

References:

Follow-up to [54162], [52049], [50973].

Props madhudollu, mamaduka, oandregal, scruffian, hellofromTonya.
Fixes #57559.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/theme.json

    r54162 r55176  
    325325                }
    326326            }
     327        },
     328        "shadow": {
     329            "presets": [
     330                {
     331                    "name": "Natural",
     332                    "slug": "natural",
     333                    "shadow": "0 .2rem .3rem 0 rgba(0,0,0, 0.3), 0 .5rem .6rem 0 rgba(0,0,0, 0.4)"
     334                },
     335                {
     336                    "name": "Sharp",
     337                    "slug": "sharp",
     338                    "shadow": ".5rem .5rem 0 0 rgba(0,0,0, 0.4)"
     339                }
     340            ]
    327341        },
    328342        "spacing": {
Note: See TracChangeset for help on using the changeset viewer.