A workaround for hiding empty slots in Chromium

· · June 19, 2026, 5:07 a.m.
Summary
This blog post discusses a workaround for addressing an issue in Chromium where empty slots in web components cause unwanted gaps in layout. It details the use of the :scope selector as a solution, showing how it can effectively hide empty slots and collapse gaps across different browsers. The author shares personal experiences and insights into CSS tricks, noting both the challenges and the final successful approach while providing examples and explanations.
AUTHOR
Sponsored
Zulip logo Zulip
Organized team chat for people who take work seriously. Topic-based threading keeps conversations focused.
Try Zulip
Become a sponsor →