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