atomic-layout icon indicating copy to clipboard operation
atomic-layout copied to clipboard

ElementQuery

Open kettanaito opened this issue 7 years ago • 5 comments

What

Need to consider Element Queries non-standard feature.

Why

That is a brand new look at the components and their responsive behavior. I believe that in the conjuncture with the traditional media queries this could allow to create immersive responsive experiences.

How

  1. CSS Element Queries
  2. Alternative

Specification

See the Element Query API proposal.

kettanaito avatar May 11 '18 07:05 kettanaito

Worth looking into: Solving CSS container queries

kettanaito avatar Oct 28 '18 15:10 kettanaito

There is also a ResiveObserver supported in Chrome, and supposedly having a polyfill.

kettanaito avatar Nov 26 '18 21:11 kettanaito

To update this pending issue: I still cherish the idea of element (container) queries, and I find them a missing piece in the modern responsive layout development.

The primary question I have is the API for this feature, as a part of Atomic layout.

kettanaito avatar Feb 21 '19 12:02 kettanaito

API proposal

Here's a few thoughts on the Element Query API: https://gist.github.com/kettanaito/f315769267c31df2afc904dee291c5bc

I'd appreciate any feedback on the proposal. I think the last suggestion (to treat Element Query as a custom Responsive prop bound to a component) is the most versatile API yet.

kettanaito avatar Oct 17 '19 17:10 kettanaito

Interesting observer-based pattern from Envato:

kettanaito avatar Apr 14 '20 12:04 kettanaito