The CSS box-shadow property adds drop shadows to HTML elements, creating visual depth. By setting offsets, blur, spread radius, and color, designers control the shadow’s direction, softness, size, and shade, enhancing both Group and Image blocks.
Using theme.json, Powder accomplishes two things:
- Disables the WordPress default shadow presets.
- Introduces one shadow preset: Light.
Below is the relevant code found in theme.json
:
{
"settings": {
"shadow": {
"defaultPresets": false,
"presets": [
{
"name": "Light",
"shadow": "0 0 10px rgb(0, 0, 0, 0.1)",
"slug": "light"
}
]
}
}
}
This code yields a set of preset variables:
--wp--preset--shadow--light: 0 0 10px rgb(0, 0, 0, 0.1);
Box Shadow Example
Here is an example of a group block with box shadow applied:
“You can design and create, and build the most wonderful place in the world. But it takes people to make the dream a reality.”