Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
0
54
Styling the Shadow Dom
Tiangle JS meetup talk about how to style the shadow DOM
Andres Galante
September 26, 2016
Tweet
Share
More Decks by Andres Galante
See All by Andres Galante
Make Something Great! Become an Open Source Contributor
andresgalante
0
200
Make Something Great: Become an Open Source Contributor
andresgalante
0
290
How to use CSS to make your App look amazing and be accessible on any device
andresgalante
0
64
Open source - JUG BA
andresgalante
0
68
Open source - QCon19
andresgalante
0
100
CSS - Media queries o tamanho não importa
andresgalante
0
80
Cosmos
andresgalante
0
100
PatternFly 4 variable system
andresgalante
0
100
Open source
andresgalante
3
85
Other Decks in Technology
See All in Technology
Ryzen NPUにおけるAI Engineプログラミング
anjn
0
150
MAP-7thplaceSolution
yukichi0403
2
240
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
5
47k
Noを伝える技術2025: 爆速合意形成のためのNICOフレームワーク速習 #pmconf2025
aki_iinuma
2
450
「え?!それ今ではHTMLだけでできるの!?」驚きの進化を遂げたモダンHTML
riyaamemiya
9
4.3k
生成AI・AIエージェント時代、データサイエンティストは何をする人なのか?そして、今学生であるあなたは何を学ぶべきか?
kuri8ive
2
1.2k
[続・営業向け 誰でも話せるOCI セールストーク] AWSよりOCIの優位性が分からない編(2025年11月21日開催)
oracle4engineer
PRO
1
220
インフラ室事例集
mixi_engineers
PRO
2
200
"なるべくスケジューリングしない" を実現する "PreferNoSchedule" taint
superbrothers
0
130
履歴テーブル、今回はこう作りました 〜 Delegated Types編 〜 / How We Built Our History Table This Time — With Delegated Types
moznion
15
9.2k
OpenShiftのBGPサポート - MetalLB+FRR-k8s編
orimanabu
0
140
Bakuraku Engineering Team Deck
layerx
PRO
11
4.7k
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
527
40k
The Invisible Side of Design
smashingmag
302
51k
Making Projects Easy
brettharned
120
6.5k
Documentation Writing (for coders)
carmenintech
76
5.2k
Embracing the Ebb and Flow
colly
88
4.9k
The Language of Interfaces
destraynor
162
25k
Six Lessons from altMBA
skipperchong
29
4.1k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
690
BBQ
matthewcrist
89
9.9k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.3k
Statistics for Hackers
jakevdp
799
230k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
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 :)