-
Notifications
You must be signed in to change notification settings - Fork 693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-gcpm-3] page group example is incorrect and specificity of nth() is undefined #3524
Comments
As I'm investigating this, it seems that at least some implementations force a page break when a named page is invoked. The example works as expected in both PrinceXML and WeasyPrint without adding a page-break property. I think GCPM is wrong here. CSS Pages says that implementations introduce a forced page break if necessary:
I would propose deleting the text " that also has a forced break property applied" from GCPM. |
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 We have With your proposed change, the text is to read like this?
I think that may be problematic. Restarting the page group whenever you simply use the 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 To sum up: I don't think a change to the spec is warranted. But those examples could use a |
WeasyPrint does not break pages between consecutive blocks with the same <style>article { page: a } div { page: b }</style>
<article>a</article>
<div>b</div>
<div>b</div>
<article>a</article> gives:
Page groups are not supported by WeasyPrint.
I agree too.
👍
Looks good to me. |
[css-gcpm-3] add break-before properties to examples 13 and 14 per #3524
I've added break-before properties to the examples, and fixed the selector typos. |
This sounds terribly ungrateful - first, thank you for making the change! But You could go for However the intention is clear, which is the main thing. So thanks again. The specificity of nth() is still undefined (I should have opened a separate issue for this, but as we're here...). I'm almost certain no-one implements this yet (we do but aren't yet public) so you've got no compatibility issues to worry about. For reference, here's the text from css-page:
If you want
I think option 2 is wrong - this selector should certainly override :left or :right. Between the others I don't really have a strong opinion, except to say that it does need a decision before anyone can implement it with confidence. (and once decided, I'm more than happy to do a pull request with proposed wording Dave if it will help take the load off you) |
[css-gcmp-3] fix incorrect value for break-before per w3c#3524
The |
https://drafts.csswg.org/css-gcpm-3/#document-page-selectors has this to say on page groups:
But examples 13 and 14 immediately below that don't show a forced-break. Without this, neighbouring
div
elements with the samepage
attribute could be on the same page.To fix example 13:
div { page: A }
todiv { page: A; break-before: page }
To fix example 14:
div.Chapter { page: body; }
todiv.chapter { page: body; break-before: page }
(note case-change of "chapter")Also, the specificity of the "nth" selector is undefined. I presume :nth(5) is (0,1,0) and :nth(5 of A) is (1,1,0)?
The text was updated successfully, but these errors were encountered: