W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2017

[csswg-drafts] [css-page] prefer pseudo-elements and nesting over at-rules

From: Zambonifofex via GitHub <sysbot+gh@w3.org>
Date: Sun, 29 Oct 2017 23:28:51 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-269447859-1509319730-sysbot+gh@w3.org>
Zambonifofex has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-page] prefer pseudo-elements and nesting over at-rules ==
Currently, the CSS Paged Media spec uses inner at-rules inside an outer `@page` at-rules to style [page-margin boxes](https://drafts.csswg.org/css-page/#margin-boxes).

I feel like using pseudo-elements to do such is much more consistent with the rest of the CSS syntax.

```CSS
@page :first::top-center
{
	content: "Document Title";
}
```

To avoid repetition, [nesting](https://tabatkins.github.io/specs/css-nesting/) could be allowed inside `@page` rules.

Nesting, beyond being useful for styling page-margin boxes, would help to avoid repetition more generally.

-----

Reusing other features of CSS leads to a more consistent experience for those trying to style page-margin boxes than trying to come up with a different approach to do what is already solved by other parts of the CSS spec and proposals.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1919 using your GitHub account
Received on Sunday, 29 October 2017 23:28:54 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:19 UTC