TechFeed
  • playlist_add_check Channels

Style a parent element based on its number of children using CSS :has()
CRANK

Leverage CSS :has() and :nth-child() to style a parent based on the number of children it has.

bram.us 4 months ago
Related Topics: CSS
arrow_back
open_in_new Open page
https://www.bram.us/2022/11/17/style-a-parent-element-based-on-its-number-of-children-using-css-has/
1 comments
  • 木達 一仁
    @kazuhito_kidachi
    4 months ago

    Style a parent element based on its number of children using CSS :has() zpr.io/MdA8MYTGvcCr

  • Blog
  • Frequently Asked Questions
  • Feedback
  • Terms of service
  • Privacy Policy
  • Posting guidelines
  • Special thanks
  • About Company
© 2023 TechFeed Inc.