A well-placed text shadow can make a hero heading pop off a photo, add depth to a bold headline or give a retro feel to a landing page. For years, adding one in WordPress meant opening the Additional CSS panel or editing a child theme. That is changing. With WordPress 7.2, text shadow becomes a native typography setting you can apply from the block editor, with presets that themes can define in theme.json.
In this guide you will learn how the new WordPress text shadow feature works, how to apply it to headings and paragraphs, how theme developers can create custom presets, and how to use shadows in a way that keeps your content readable, accessible and fast.
What Is a Text Shadow?
A text shadow is a copy of your text drawn behind the letters, usually offset a little and blurred. In CSS it comes from the text-shadow property, which accepts four parts:
- Horizontal offset: how far the shadow moves left or right.
- Vertical offset: how far it moves up or down.
- Blur radius: how soft the edge looks. Zero gives a crisp, graphic shadow.
- Colour: often a semi-transparent black or a brand colour.
For example, text-shadow: 0 2px 4px rgb(0 0 0 / 0.35); places a soft dark shadow just below the text. You can also stack several shadows separated by commas to create outlines, glows or layered retro effects.
It is worth separating this from the box shadow feature WordPress has offered since version 6.2. Box shadow applies to the whole block container, such as a button or a group, while text shadow follows the shape of each letter.
How Text Shadow Support Arrived in WordPress
Text shadow has been a frequently requested typography feature for a long time, and the WordPress project chose to deliver it in two careful steps.
Step one: theme.json styling in WordPress 7.1
WordPress 7.1 made a textShadow property available under styles.typography in theme.json, as described in the dev note Text Shadow Support in Global Styles. Theme authors could set a shadow globally, on specific blocks or on elements such as links, without a plugin or custom stylesheet. There was no editor interface yet, but the foundation was in place. Read our WordPress 7.1 features guide for the rest of that release.
Step two: editor controls and presets in WordPress 7.2
WordPress 7.2 completes the picture. Tracked in Trac ticket #65869 and described in a dev note by Aki Hamano, the release adds a Text shadow control in the block inspector, block support that any block can opt into, and preset settings in theme.json. WordPress 7.2 is scheduled for December 8, 2026. For the full list of changes, see our overview of WordPress 7.2 new features.

How to Add a Text Shadow in the Block Editor
In WordPress 7.2, the Paragraph and Heading blocks support text shadow out of the box. The control lives in the Typography panel and is hidden by default, in the same way as other less frequently used typography options such as letter spacing. Here is how to use it:
- Open a post, page or template and select a Paragraph or Heading block.
- In the block settings sidebar, find the Typography panel.
- Click the panel’s options menu (the three dots) and enable Text shadow.
- Pick a preset. WordPress ships with Light and Strong, and your theme may add more.
- Preview on desktop and mobile, then save.
Because the choice is stored as a preset slug rather than a hard-coded value, WordPress outputs a class such as has-strong-text-shadow on the block. That has a lovely side effect: if your theme later refines what “Strong” looks like, every block using it updates automatically.
Setting a site-wide shadow in Global Styles
If you want every heading on your site to share the same subtle shadow, set it once instead of block by block. Go to Appearance → Editor → Styles, open the typography settings for headings or a specific block type, and choose a text shadow there. This keeps your design consistent and makes future changes a one-click job. WordPress 7.2 also shows inherited Global Styles values in the block inspector, so you can see where a block’s shadow comes from.
Text Shadow in theme.json for Theme Developers
Block themes control text shadow through theme.json. There are two sides to it: styles, which apply shadows, and settings, which control the options users see.
Applying shadows with styles
Since WordPress 7.1, you can set textShadow under styles.typography at the root, for a block, or for an element. The value maps directly to the CSS text-shadow property, so any valid value works, including multiple comma-separated shadows:
{
"version": 3,
"styles": {
"elements": {
"h1": {
"typography": {
"textShadow": "0 2px 6px rgb(0 0 0 / 0.25)"
}
}
},
"blocks": {
"core/cover": {
"elements": {
"heading": {
"typography": {
"textShadow": "0 1px 3px rgb(0 0 0 / 0.6)"
}
}
}
}
}
}
}
This example gives every H1 a soft shadow and gives headings inside Cover blocks a slightly stronger shadow for better legibility over photos.
Controlling presets with settings
WordPress 7.2 adds three settings under settings.typography:
textShadowturns the text shadow interface on or off for users.textShadowPresetsregisters your theme’s own presets, each with a name and a slug.defaultTextShadowPresetsdecides whether WordPress’s default presets appear alongside yours.
Presets work much like colour palettes. A theme with a strong visual identity might define “Soft”, “Glow” and “Outline” presets that match its brand, and switch off the defaults so users choose only from on-brand options. Because preset values are output as a class name like has-{slug}-text-shadow rather than inline styles, your markup stays clean and easy to restyle. Check the WordPress 7.2 dev note and the Global Settings and Styles documentation for the exact preset object format before you ship.
Adding text shadow support to custom blocks
Blocks other than Paragraph and Heading can opt in through block.json by enabling supports.typography.textShadow:
{
"apiVersion": 3,
"name": "my-plugin/hero-title",
"supports": {
"typography": {
"textShadow": true
}
}
}
Your block then receives the same control and preset classes as core blocks, with no custom attribute handling required. If you build blocks with PHP, our guide to PHP-only blocks in WordPress shows how block supports fit into that workflow.
Design Tips: When Text Shadows Work Best
Like any design tool, text shadow shines when it has a clear purpose. Here are the situations where it adds the most value.
Headlines over images
The most practical use is improving legibility of white text on busy photos in Cover blocks and hero sections. A soft, dark shadow separates letters from the background without the heavy look of a full overlay. Combine it with a gentle overlay dim for the best result.
Display headings and brand moments
Large display headings can carry more playful shadows, such as a crisp offset shadow in a brand colour for a retro poster style. Keep these for short phrases where they have room to breathe.
Keep body text clean
For long paragraphs, shadows usually make reading harder rather than easier, especially at small sizes. A good rule of thumb is to reserve shadows for headings, short taglines and buttons, and leave body copy crisp.
Be consistent
Use one or two shadow styles across the whole site. Presets make this easy, and consistent styling is what makes a design feel intentional and professional.
Five Text Shadow Recipes to Try
If you are creating presets for a theme or experimenting with Global Styles, these tried-and-tested values make a great starting point. Each one maps directly to the CSS text-shadow property, so you can use them as textShadow values in theme.json.
1. Soft lift
0 1px 2px rgb(0 0 0 / 0.2) adds barely visible depth. It works on light backgrounds where you want headings to feel slightly raised without anyone consciously noticing a shadow.
2. Photo legibility
0 2px 8px rgb(0 0 0 / 0.55) is the workhorse for white headings on images. The larger blur creates a gentle dark halo that separates letters from busy backgrounds in Cover blocks and hero banners.
3. Retro offset
3px 3px 0 #ff6b35 uses no blur at all, giving a crisp, print-inspired duplicate in a brand colour. It suits bold display fonts and short headlines on event or product launch pages.
4. Gentle glow
0 0 12px rgb(255 255 255 / 0.6) creates a soft light halo, ideal for light text on dark gradients or for a calm, dreamy feel on wellness and creative sites.
5. Layered depth
1px 1px 0 #ccc, 2px 2px 0 #bbb, 3px 3px 0 #aaa stacks three crisp shadows to suggest a 3D extrusion. Because it is several shadows in one value, keep it for large headings where the effect has space to show.
A practical approach is to choose two of these that match your brand, name them clearly, for example “Subtle” and “Hero”, and register only those as presets. Fewer, well-named choices help editors make consistent decisions quickly, and they keep your design system easy to maintain as your site grows. If you also manage custom fonts, our guide to the WordPress Font Library pairs nicely with this, since shadows and typefaces should be chosen together.
Accessibility and Readability Considerations
Text shadow can help or hinder accessibility depending on how it is used. A few guidelines keep your content welcoming for everyone:
- Do not rely on the shadow for contrast. The text colour and background should meet contrast requirements on their own. Treat the shadow as an enhancement, not the thing that makes text readable.
- Avoid heavy blur on small text. Large blurred shadows can make letter shapes fuzzy for people with low vision.
- Test in dark mode and high contrast settings. A shadow that looks subtle on a light background may look very different elsewhere.
- Zoom in. Check your headings at 200% zoom, which is a common accessibility test.
Our WordPress accessibility WCAG 2.2 checklist covers contrast testing in more detail, and the W3C’s guidance on contrast minimum is the definitive reference.
Does Text Shadow Affect Performance?
Text shadows are drawn by the browser, so they add no images and no extra HTTP requests. For normal use on headings, the rendering cost is very small. Because presets output a class instead of repeated inline styles, the generated CSS also stays compact. Text shadows do not change layout dimensions either, so they will not contribute to layout shift; if that is a topic you are working on, see our guide to WordPress CLS optimization.
The one thing to watch is animation. Animating large, heavily blurred shadows on scroll can feel less smooth on older phones, so keep animated effects light.
Moving from Custom CSS to Native Text Shadow
If your site already uses text shadows via Additional CSS or a child theme stylesheet, WordPress 7.2 is a good moment to tidy up:
- List the selectors in your CSS that use
text-shadow. - Group them into a small set of styles and recreate those as presets or Global Styles in
theme.json. - Apply the presets to the relevant blocks or block types.
- Remove the old CSS and compare pages side by side on a staging copy.
The result is design that editors can see and adjust directly in the editor, which fits the broader no-code direction covered in our guide to responsive styling and hover states without CSS. If you are still on a classic theme, our classic to block theme migration guide explains how to move to theme.json.
Frequently Asked Questions
Which blocks support text shadow in WordPress 7.2?
Paragraph and Heading blocks support it by default. Other blocks, including custom ones, can opt in with supports.typography.textShadow in block.json.
Why can’t I see the Text shadow option?
It is hidden by default. Open the options menu on the Typography panel and enable it. If it still does not appear, your theme may have turned the setting off in theme.json.
Does it work with classic themes?
The block editor control relies on block supports and theme.json settings, so it works best with block themes and classic themes that include a theme.json file.
Can I try it before WordPress 7.2 is released?
Yes. Install a 7.2 beta or release candidate on a test site or in WordPress Playground, or use a recent version of the Gutenberg plugin on a staging copy. Avoid testing pre-release software on a live site.
Conclusion
Native text shadow is a small feature with a big everyday impact. Site owners get an easy way to make headings stand out, editors no longer need to touch CSS, and theme developers can offer polished, on-brand presets that stay consistent across a whole site. Start with the Light preset on a Cover block heading, keep body text clean, and test contrast as you go. With a little restraint, WordPress text shadow can add depth and personality to your designs while keeping them readable for every visitor.

Leave a Reply