Comments on: Quantity Queries are Very Easy with CSS :has() https://frontendmasters.com/blog/quantity-queries-are-very-easy-with-css-has/ Helping Your Journey to Senior Developer Thu, 21 Dec 2023 08:44:46 +0000 hourly 1 https://wordpress.org/?v=6.5.2 By: Manuel https://frontendmasters.com/blog/quantity-queries-are-very-easy-with-css-has/#comment-148 Thu, 21 Dec 2023 08:44:46 +0000 https://frontendmasters.com/blog/?p=239#comment-148 I created this demo when I discovered it for the first time: https://codepen.io/matuzo/pen/YzaoRLJ

Blog post: https://www.matuzo.at/blog/2022/counting-children/

]]>
By: Chris Coyier https://frontendmasters.com/blog/quantity-queries-are-very-easy-with-css-has/#comment-86 Fri, 15 Dec 2023 21:15:23 +0000 https://frontendmasters.com/blog/?p=239#comment-86 More recipes:

https://www.bram.us/2022/11/17/style-a-parent-element-based-on-its-number-of-children-using-css-has/

]]>
By: Chris Coyier https://frontendmasters.com/blog/quantity-queries-are-very-easy-with-css-has/#comment-80 Fri, 15 Dec 2023 17:15:51 +0000 https://frontendmasters.com/blog/?p=239#comment-80 Exact counts:

https://twitter.com/jordanpittman/status/1735342466855776634

]]>
By: D7460N https://frontendmasters.com/blog/quantity-queries-are-very-easy-with-css-has/#comment-75 Fri, 15 Dec 2023 14:52:36 +0000 https://frontendmasters.com/blog/?p=239#comment-75 Thanks for this post! Appreciate your great work.

:has() is the holy grail of native/passive/real-time detection of dynamic element changes, without slow scripting. What about content itself? Is it possible for :has(), in combination with :empty (?) to passively watch for, detect, and react to dynamic text changes? If so, quantity queries of dynamic elements are just the beginning!

Thanks again!

]]>
By: Chris Coyier https://frontendmasters.com/blog/quantity-queries-are-very-easy-with-css-has/#comment-42 Thu, 14 Dec 2023 22:19:01 +0000 https://frontendmasters.com/blog/?p=239#comment-42 Use case!

https://twitter.com/jeromepaulos/status/1638299886209605633

]]>