Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Jonathan Schofield
Jonathan Schofield
@urlyman@mastodon.social  ·  activity timestamp 3 days ago

#css
Just realised I can use :has on the parent of a focus/hovered link.

Which is handy when there’s an absolutely positioned element that’s a child of a parent that has been translate(d), cos that transform screws up the z-index stacking order.

So one can fix with things like:

.parent:has(a:focus, a:hover) {
z-index: 1;
}

https://codepen.io/urlyman/pen/yyJRzRp?editors=1000

  • Copy link
  • Flag this post
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.2-alpha.23 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct