Uploaded May 2022 | Updated September 2026, 2 hours ago
Find out how can :has() parent selector help you simplify your code and avoid JavaScript entirely on practical, real-life examples.
You'll learn how to use :has() pseudo-class to enhance form validation, draw attention to an element, and tweak overall page styling based on a specific state of an input element.
π₯ Start Using color-scheme CSS Property: youtu.be/nQzRTsjBXfQ π₯
π¨ Codepen Demos
Form Validation: codepen.io/ZoranJambor/pen/oNEgEdb/3b2b0bdd78c3acaaacda0ce3a0b64184
Highlighting Elements: codepen.io/ZoranJambor/pen/OJQPwVZ/3991985b8e24ba70a20eadbe538850b6
Page-Wide Tweaks: codepen.io/ZoranJambor/pen/bGLNQVx/689b86a4ee34c036fa2030b6afd321cb
π Resources
Animated Grid Tracks with :has() by Michelle Barker β css-irl.info/animated-grid-tracks-with-has
CSS Parent Selector by Ahmad Shadeed β ishadeed.com/article/css-has-parent-selector
MDN Entry on :has() β developer.mozilla.org/en-US/docs/Web/CSS/:has
π Chapters
00:00 Intro
00:30 Enhancing form validation
03:53 Highlighting elements
06:40 Page-wide tweaks
09:34 Conclusion
Subscribe to CSS Weekly Newsletter:
π css-weekly.com
Keep up-to-date with CSS Weekly:
π Twitter: twitter.com/CSSWeekly
π Instagram: instagram.com/cssweekly
π Facebook: facebook.com/CSSWeekly
Keep up to date with what I'm up to:
π Blog: zoranjambor.com
π Twitter: twitter.com/zoranjambor
π LinkedIn: linkedin.com/in/zoranjambor
- Zoran Jambor
#css
Find out how can :has() parent selector help you simplify your code and avoid JavaScript entirely on practical, real-life examples.
You'll learn how to use :has() pseudo-class to enhance form validation, draw attention to an element, and tweak overall page styling based on a specific state of an input element.
π₯ Start Using color-scheme CSS Property: youtu.be/nQzRTsjBXfQ π₯
π¨ Codepen Demos
Form Validation: codepen.io/ZoranJambor/pen/oNEgEdb/3b2b0bdd78c3acaaacda0ce3a0b64184
Highlighting Elements: codepen.io/ZoranJambor/pen/OJQPwVZ/3991985b8e24ba70a20eadbe538850b6
Page-Wide Tweaks: codepen.io/ZoranJambor/pen/bGLNQVx/689b86a4ee34c036fa2030b6afd321cb
π Resources
Animated Grid Tracks with :has() by Michelle Barker β css-irl.info/animated-grid-tracks-with-has
CSS Parent Selector by Ahmad Shadeed β ishadeed.com/article/css-has-parent-selector
MDN Entry on :has() β developer.mozilla.org/en-US/docs/Web/CSS/:has
π Chapters
00:00 Intro
00:30 Enhancing form validation
03:53 Highlighting elements
06:40 Page-wide tweaks
09:34 Conclusion
Subscribe to CSS Weekly Newsletter:
π css-weekly.com
Keep up-to-date with CSS Weekly:
π Twitter: twitter.com/CSSWeekly
π Instagram: instagram.com/cssweekly
π Facebook: facebook.com/CSSWeekly
Keep up to date with what I'm up to:
π Blog: zoranjambor.com
π Twitter: twitter.com/zoranjambor
π LinkedIn: linkedin.com/in/zoranjambor
- Zoran Jambor
#css










