Ibbit
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
rssMB to Coding BlogsEnglish · 22 days ago

CSS supports nested selectors now!

jvns.ca

external-link
message-square
0
link
fedilink
2
external-link

CSS supports nested selectors now!

jvns.ca

rssMB to Coding BlogsEnglish · 22 days ago
message-square
0
link
fedilink
CSS supports nested selectors now!

I just learned that CSS now supports nested selectors! So I can write something like this and it works without using a preprocessor like SCSS:

.cal-link { right: -18px; top: -6px; @media (max-width: 800px) { right: 0; top: -4px; } }

Here’s the caniuse page for more on browser support.

MDN says there are some limitations around using it with pseudo-elements like ::before though.


From Julia Evans: TIL via this RSS feed

alert-triangle
You must log in or # to comment.

Coding Blogs

coding_blogs

Subscribe from Remote Instance

You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !coding_blogs@ibbit.at
lock
Community locked: only moderators can create posts. You can still comment on posts.
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1 user / day
  • 7 users / week
  • 14 users / month
  • 19 users / 6 months
  • 1 local subscriber
  • 14 subscribers
  • 152 Posts
  • 0 Comments
  • Modlog
  • mods:
  • admin
  • rss
  • paywall
  • BE: 0.19.12
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org