Re: [csswg-drafts] [css-contain-3] Container Queries and DOM-APIs like querySelector (#6215)

Making querySelector dependent on layout means it will synchronously need to make layout up-to-date like getBoundingClientRect, offsetWidth, etc. That can be a performance foot-gun of the type that was the reason for introducing APIs like IntersectionObserver and ResizeObserver. If matchContainer() or similar would solve your problem, I think that would be a better way.


-- 
GitHub Notification of comment by lilles
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6215#issuecomment-830290057 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 30 April 2021 18:44:39 UTC