Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Styling the Shadow Dom
Search
Andres Galante
September 26, 2016
Technology
62
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
230
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
85
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
110
Other Decks in Technology
See All in Technology
AI時代のエンジニアの情報発信〜個人の発信を組織の力に変える〜
ryo_kawamata
1
7.3k
生き様としてのSRE
hokkai7go
1
170
AWSを利用する上で知っておきたい名前解決の話 2026
nagisa53
2
490
セキュリティ専任チームなしで攻撃を先回りするSREが実践したSIEM on Amazon OpenSearch Service
cscengineer
PRO
0
160
素人でもできた!AIを使った短編小説創作入門
delhi09
PRO
0
310
FinOpsを導入してマルチプロダクトのコスト最適化を実現する
kworkdev
PRO
0
130
Lint の層を組み直した話
bengo4com
3
310
Claude Codeで作ったアプリを安全に公開する/Built with Claude Japan 2026
yoshidashingo
0
120
スマートロックを支えるFlutter × ネイティブ連携の実践 / Flutter and Native Integration in Practice: Powering Smart Locks
bitkey
PRO
0
150
The future of architectural work
ufried
0
160
Software Engineering in an AI-Driven World
erikjhordan_rey
0
110
In-Context Learning再入門。ICLの勾配降下的解釈の研究動向を追ってみる。
dai08srhg
1
250
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Building an army of robots
kneath
307
47k
Building Better People: How to give real-time feedback that sticks.
wjessup
371
20k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Six Lessons from altMBA
skipperchong
29
4.6k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
How to Think Like a Performance Engineer
csswizardry
28
2.9k
Skip the Path - Find Your Career Trail
mkilby
1
280
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
610
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.6k
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
Believing is Seeing
oripsolob
1
270
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 :)