A workaround for hiding empty slots in Chromium (opens in new tab)

Named slots are one of web components’ biggest . Imagine a Button component with an optional icon; in Web Components we don’t need a separate Button and IconButton, a single Button component with will do. Or a card component with a handful of predefined slots for image, title, description, price, metadata, etc. Not 100 different cards… one card. Slots are a wonderful way to declaratively compose UI, but one shadow styling challenge that has vexed my team over the years is h...

Read the original article
Sign in to keep reading the full article.

Keyboard Shortcuts

Navigation

Next / previous post
j/k
Open post
oorEnter
Preview post
v

Post Actions

Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Save / unsave
s

Recommendations

Add interest / feed
Enter
Not interested
x

Go to

Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Discover
gb
Search
/

General

Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help