~/talk

Container Queries: The next step towards a truly modular CSS

Talkat Frontmania 2022 · on Wednesday, 2022-10-05· [css, web-platform]
slides:none on file

Container Queries let CSS adapt a component to its ancestor size using container-type: size and named containers with @container so an element queries an ancestor not itself and supports multi level rules. Use container relative units like cqw for sizing. Browsers ship support in Chrome 105 Edge and Safari 16 and a polyfill exists but that polyfill relies on ResizeObserver and can cause a flash of unstyled content. Practical examples include responsive newsletter modules, mini shopping carts and adaptive inline SVG logos.

AI-written summary · about

  1. 0:00Introduction and problem setup
  2. 3:16Limitations of media queries
  3. 5:45Configuration options and JavaScript issues
  4. 8:54What are container queries
  5. 11:04CSS containment explained
  6. 13:34Container query syntax and examples
  7. 16:43Browser support and polyfills
  8. 18:10Future container features
  9. 20:03Refactoring widgets with container queries
  10. 22:34Newsletter component demo
  11. 23:56Shopping cart component demo
  12. 25:00Container relative units
  13. 26:29SVG and responsive logos
  14. 28:20Summary and future of container queries
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.