JS Party: JavaScript, CSS, Web Development

A very !important lesson

Nov 11, 2022
Ask episode
AI Snips
Chapters
Transcript
Episode notes
ADVICE

Using @import with Cascade Layers

  • Developers should use @import in CSS now due to cascade layers.
  • This method allows importing third-party scripts into specific cascade layers, unlike the link tag.
ADVICE

Understanding Relative Selectors

  • Learn relative selectors like ':has()', often mistaken for parent selectors.
  • These go beyond parent-child relationships, allowing styling based on sibling elements and their types.
ANECDOTE

William Sonoma Navigation Example

  • Estelle Weyl improved William Sonoma's navigation bar using ':focus-within'.
  • This pseudo-class opens dropdown menus when the navigation bar gains focus, improving accessibility.
Get the Snipd Podcast app to discover more snips from this episode
Get the app