Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Styling the Shadow Dom
Search
Andres Galante
September 26, 2016
Technology
59
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Styling the Shadow Dom
Tiangle JS meetup talk about how to style the shadow DOM
Andres Galante
September 26, 2016
More Decks by Andres Galante
See All by Andres Galante
Make Something Great! Become an Open Source Contributor
andresgalante
0
220
Make Something Great: Become an Open Source Contributor
andresgalante
0
310
How to use CSS to make your App look amazing and be accessible on any device
andresgalante
0
89
Open source - JUG BA
andresgalante
0
84
Open source - QCon19
andresgalante
0
120
CSS - Media queries o tamanho não importa
andresgalante
0
110
Cosmos
andresgalante
0
130
PatternFly 4 variable system
andresgalante
0
120
Open source
andresgalante
3
100
Other Decks in Technology
See All in Technology
Beyond the Hype: Practical AI for Your Oracle Database with MCP
thatjeffsmith
1
260
IoTハンズオンの舞台裏
shirouz
2
130
生成AIのテナント制御とシャドーMCP対策 | AIを"止めずに"、情報を守る
yukun
0
120
AI活用の現在地、 ちゃんと見えてますか?/XPfest-2026
visional_engineering_and_design
0
150
[RSJ26] Building a VLA Model Based on Self-Distilled Classification
keio_smilab
PRO
0
190
プロダクト思考 × 基盤思考を AIで実現する Compound Engineering
tkc66buzz
1
260
From Vanilla Kubernetes to a Batteries-Included Platform: Developer Experience at 1,300+ Clusters
yosshi_
0
480
grill-me(grilling):AI駆動開発を超助けてくれるSkill / grill me
mathbullet
0
110
Bet AI Day 2026丨AIによって本質に戻るシステムリスク管理
layerx
PRO
0
910
深夜のクラウド懺悔室 1:29:300 or 1:0:0
kazzpapa3
0
170
Tab5をRubyで動くパソコンにする
kishima
1
190
全員がプロダクトへ向き合う組織を持続成長させるために——組織づくりのフライホイールと4象限 / The Flywheel Model and Four Quadrants for Organizational Design
hiro_torii
3
830
Featured
See All Featured
So, you think you're a good person
axbom
PRO
2
2.1k
Exploring anti-patterns in Rails
aemeredith
3
490
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.1k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.8k
A Soul's Torment
seathinner
7
3.5k
We Have a Design System, Now What?
morganepeng
55
8.3k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
220
Writing Fast Ruby
sferik
630
63k
4 Signs Your Business is Dying
shpigford
187
23k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.1k
Balancing Empowerment & Direction
lara
6
1.3k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.3k
Transcript
@andresgalante Shadow Dom
None
Shadow Dom
Heads Up
1. Never trust an Argentinean designer writing code.
1. Never trust an Argentinean designer writing code.
2. I am a Shadow Dom rookie
Shadow Dom
Custom elements + Shadow DOM = Self contained HTML, CSS
and JS
None
None
CSS
The Shadow DOM
The ShadowRoot A shadow root is a document fragment that
gets attached to a “host” element.
Light DOM + Shadow DOM = Composed DOM
<slot> Placeholders inside your component that users can fill with
their own markup.
How to style the ShadowDOM
None
None
None
None
None
CSS selectors from the outer page don’t apply inside your
component. Styles defined inside don’t bleed out. They’re scoped to the host element.
:host(<selector>) selector Allows you to target the host if it
matches a <selector>.
::host-context(<selector>) selector Matches the component if it or any of
its ancestors matches <selector>.
:slotted(<compound-selector>) selector Matches nodes that are distributed into a <slot>
Styling a component from the outside.
Style hooks using CSS custom properties CSS variables and mixins
Access Card Demo Putting everything together
None
Can we use it?
maybe
Thanks :)