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
0
57
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
210
Make Something Great: Become an Open Source Contributor
andresgalante
0
300
How to use CSS to make your App look amazing and be accessible on any device
andresgalante
0
74
Open source - JUG BA
andresgalante
0
79
Open source - QCon19
andresgalante
0
110
CSS - Media queries o tamanho não importa
andresgalante
0
93
Cosmos
andresgalante
0
110
PatternFly 4 variable system
andresgalante
0
110
Open source
andresgalante
3
92
Other Decks in Technology
See All in Technology
わたしがセキュアにAWSを使えるわけないじゃん、ムリムリ!(※ムリじゃなかった!?)
cmusudakeisuke
1
500
情シスのための生成AI実践ガイド2026 / Generative AI Practical Guide for Business Technology 2026
glidenote
0
190
JAWSDAYS2026_A-6_現場SEが語る 回せるセキュリティ運用~設計で可視化、AIで加速する「楽に回る」運用設計のコツ~
shoki_hata
0
3k
OCHaCafe S11 #2 コンテナ時代の次の一手:Wasm 最前線
oracle4engineer
PRO
1
100
JAWS DAYS 2026 ExaWizards_20260307
exawizards
0
410
Claude Code 2026年 最新アップデート
oikon48
10
7.8k
JAWS Days 2026 楽しく学ぼう! 認証認可 入門/20260307-jaws-days-novice-lane-auth
opelab
10
1.8k
DevOpsエージェントで実現する!! AWS Well-Architected(W-A) を実現するシステム設計 / 20260307 Masaki Okuda
shift_evolve
PRO
3
560
Dr. Werner Vogelsの14年のキーノートから紐解くエンジニアリング組織への処方箋@JAWS DAYS 2026
p0n
1
130
元エンジニアPdM、IDEが恋しすぎてCursorに全業務を集約したら、スライド作成まで爆速になった話
doiko123
1
590
[2026-03-07]あの日諦めたスクラムの答えを僕達はまだ探している。〜守ることと、諦めることと、それでも前に進むチームの話〜
tosite
0
180
vLLM Community Meetup Tokyo #3 オープニングトーク
jpishikawa
0
320
Featured
See All Featured
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
230
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.1k
SEO for Brand Visibility & Recognition
aleyda
0
4.3k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.7k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
64
53k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
140
Chasing Engaging Ingredients in Design
codingconduct
0
140
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
The Cult of Friendly URLs
andyhume
79
6.8k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
160
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 :)