Skip to content

Instantly share code, notes, and snippets.

@celeryclub
Last active January 14, 2016 17:37
Show Gist options
  • Save celeryclub/562c8d520a8312a29819 to your computer and use it in GitHub Desktop.
Save celeryclub/562c8d520a8312a29819 to your computer and use it in GitHub Desktop.
Element Query talk

What are Element Queries?

  • Also called container queries
  • A way to change style based on element dimensions
  • Good for reusable components
  • They don't exist

The Problem with Element Queries

  • Circular dependencies
  • Parents affect size of children
  • Children affect size of parent (float, position: absolute)
  • Performance

The Future Solution

  • Viewport element - like an iframe
  • Its dimensions cannot be altered by its descendants

The Good Enough for Now Solution

Notes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment