- From: programmer5000.com via GitHub <sysbot+gh@w3.org>
- Date: Mon, 06 Feb 2017 16:00:06 +0000
- To: public-css-archive@w3.org
programmer5000-com has just created a new issue for
https://github.com/w3c/csswg-drafts:
== CSS pseudo-selector for h1-h6? ==
I frequently find myself writing CSS like this:
```CSS
h1, h2, h3, h4, h5, h6{
...
}
```
It annoys me that I have to type `h1, h2, h3, h4, h5, h6` so much. But
it gets worse:
```CSS
article h1, article h2, article h3, article h4, article h5, article
h6{
...
}
```
or even
```CSS
article h1.bold:hover, article h2.bold:hover, article h3.bold:hover,
article h4.bold:hover, article h5.bold:hover, article h6.bold:hover{
...
}
```
Wouldn't it be nice to just type
```CSS
:heading{
...
}
```
or
```CSS
article :heading{
...
}
```
or
```CSS
article :heading.bold:hover{
...
}
```
`:heading` just matches h1-h6. It would be easy to implement for
browser vendors and easy to polyfill. But extremely helpful.
# Having a heading selector like `:heading` would be AWESOME!
Please view or discuss this issue at
https://github.com/w3c/csswg-drafts/issues/1008 using your GitHub
account
Received on Monday, 6 February 2017 16:00:12 UTC