Re: [csswg-drafts] [css-gcpm-3] page group example is incorrect and specificity of nth() is undefined (#3524)

I don't think the the current wording is problematic - we've implemented it as currently specced, so I know it's possible to do (with bugs, but they're all ours). My reason for opening this issue was purely the lack of a visible forced break in the examples!

But I can see why it might look like a problem if we presume `page` _always_ forces a page break. I don't think it's either necessary or correct to do this.

We have `break-before: page` if we want to force a page break, and as [example 28](https://drafts.csswg.org/css-page-3/#example-8e43e846) explicitly states, there are cases where multiple elements need to be on a landscape page but not each on _their own_ landscape page. So I agree that the CSS-Pages definition is preferred, and I think Prince and WeasyPrint behaviour is incorrect in this instance. A page break is only necessary if explicit, i.e. with `break-before: page`, or if the current page is not of the correct type.

With your proposed change, the text is to read like this?

> When the page property is applied to an element, a page group is created. The page group is the collection of all pages created by an instance of that element. When a new instance of the element is rendered, a new page group is started.

I think that may be problematic. Restarting the page group whenever you simply use the `page` property makes things ambiguous. For example:

```css
table { page: landscape }

<table id="table1"> ... </table>
<table id="table2"> ... </table>
...
<table id="table95"> ... </table>
```

With this change to the text, you'd be restarting the page group for each table, and with multiple items specifying `page` potentially on the same page, it gets complex. For example, if "table1" ended halfway through the second page and "table2" started immediately after on the same page, is that page the first page in the "landscape" group or the second?

To sum up: I don't think a change to the spec is warranted. But those examples could use a `break-before: page`


-- 
GitHub Notification of comment by faceless2
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3524#issuecomment-591014091 using your GitHub account

Received on Tuesday, 25 February 2020 19:02:13 UTC