Style Headings using the CSS :heading pseudo-class

8 months ago by codeinabox to c/css

Use the :heading pseudo-class to style all headings (h1-h6) with a single CSS rule. Reduce repetition in design systems and component libraries while maintaining consistency.
lambalicious 4 points 8 months ago

Isn't :heading literally not supported anywhere?

path: 0 22181631, hotness: undefined, score: 4, children: 6
briggsyj 3 points 8 months ago path: 0 22181631 22182072, hotness: undefined, score: 3, children: 0
codeinabox 1 point 8 months ago

Well spotted, the article states:

The :heading pseudo-class is currently available in nightly builds only. You can test it now in:

  • Firefox Nightly (behind a flag)
  • Safari Technology Preview
path: 0 22181631 22183364, hotness: undefined, score: 1, children: 4
lambalicious 1 point 8 months ago

Yeah it's pretty weird.

I'm getting the impression this sub is getting spammed with Google-promoting or nothing-burger posts these last few weeks.

path: 0 22181631 22183364 22184339, hotness: undefined, score: 1, children: 3
codeinabox 2 points 8 months ago

Do you mean features only currently available in Chrome?

path: 0 22181631 22183364 22184339 22185257, hotness: undefined, score: 2, children: 2
lambalicious 1 point 8 months ago

Same difference. GoogleCSS, if you'd want to be brief.

path: 0 22181631 22183364 22184339 22185257 22189831, hotness: undefined, score: 1, children: 1
geoff 2 points 8 months ago

I love this so much.

path: 0 22182059, hotness: undefined, score: 2, children: 0
css
css

@programming.dev

login for more options
847
363
73

go to feed...