One of the whole points of the Shadow DOM is that it provides encapsulation. No styles out, no styles in. But there are ways “through” the Shadow DOM, and one of them that is pretty cool and useful is using CSS custom properties on particular elements/properties.
CARVIEW |
Select Language
HTTP/2 301
date: Sun, 12 Oct 2025 13:09:19 GMT
content-type: text/html; charset=UTF-8
location: https://css-tricks.com/videos/190-css-custom-properties-penetrate-the-shadow-dom/
server: cloudflare
expires: Wed, 11 Jan 1984 05:00:00 GMT
cache-control: no-cache, must-revalidate, max-age=0, no-store, private, s-maxage=2592000
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
strict-transport-security: max-age=31536000
x-redirect-by: WordPress
age: 0
x-cache: MISS
cf-cache-status: DYNAMIC
cf-ray: 98d6d4b598a7755c-BLR
HTTP/2 200
date: Sun, 12 Oct 2025 13:09:19 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
vary: Accept-Encoding
vary: Accept-Encoding
referrer-policy: strict-origin-when-cross-origin
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
strict-transport-security: max-age=31536000
link: ; rel="https://api.w.org/", ; rel="alternate"; title="JSON"; type="application/json", ; rel=shortlink
cache-provider: CLOUDWAYS-CACHE-DC
last-modified: Sun, 12 Oct 2025 13:09:19 GMT
cache-control: max-age=0, s-maxage=2592000
expires: Sun, 12 Oct 2025 13:09:19 GMT
age: 0
x-cache: MISS
cf-cache-status: DYNAMIC
content-encoding: gzip
cf-ray: 98d6d4bb19b7755c-BLR
#190: CSS Custom Properties Penetrate the Shadow DOM | CSS-Tricks
Skip to main content
Video Screencasts → #190: CSS Custom Properties Penetrate the Shadow DOM
#190: CSS Custom Properties Penetrate the Shadow DOM
Chris Coyier
on
Get affordable and hassle-free WordPress hosting plans with Cloudways — start your free trial today.
Psst! Create a DigitalOcean account and get $200 in free credit for cloud-based hosting and services.
This comment thread is closed. If you have important information to share, please contact us.