Create a Direction Aware Hover Effect Using CSS :has() Selector @CSSWeekly
Create a Direction Aware Hover Effect Using CSS :has() Selector  @CSSWeekly
Uploaded March 2023 | Updated September 2026, 2 hours ago
A practical guide on how you can build a pure-CSS direction-aware hover effect for your navigation menu bar using :has() pseudo-class.

πŸ”— Links
Codepen Demo: codepen.io/ZoranJambor/full/zYJowBQ
In-Depth Guide to CSS Logical Properties: youtu.be/cV9JhEV4Ll0
Switch to HSL Color Format: youtu.be/VInSzHOeFkE
CSS Stickers: stickers.css-weekly.com
In-Depth Guide to CSS Parent Selector :has(): youtu.be/OqLquBs-bEg
Use @supports At-Rule for Feature Detection in CSS: youtu.be/9iH3z6M6FOI

πŸ“– Chapters
00:00 A note on `:has()` pseudo-class
00:20 HTML & CSS setup for the navigation element
01:03 How to create an animated background slide-up hover effect
04:47 How to create a direction-aware background slide effect using only CSS
09:18 A note on `:has()` support and `@supports` at-rule

Get better with the best linting tools Prettier & Stylelint:
πŸ”₯ Mastering Prettier & Stylelint: masteringlinting.com

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
Create a Direction Aware Hover Effect Using CSS :has() SelectorAnimate HTML Details & Summary Elements Using Pure CSSHow to Easily Create Modern, CSS-First Forms in WordPressHow to set up a local testing server using Serve NPM package #codingShould you support Internet Explorer in 2022 and beyond?CSS4 Is Coming (Not a Clickbait)5 Things I Learned From the 2021 State of JavaScript SurveyCSS Tip: Easily Deal With Layout Shifts Caused by ScrollbarsLevel Up Your VS Code Workflow: Start Using ProfilesVS Code Tips - Collapse All Sidebar FoldersFrontend News #5: ChatGPT CSS, Custom Range SlidersDynamic SVG Section Separators
CSS Weekly |

Create a Direction Aware Hover Effect Using CSS :has() Selector

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER