Skip to content

Conversation

@ddbeck
Copy link
Collaborator

@ddbeck ddbeck commented Aug 28, 2023

Corresponds to https://caniuse.com/css-page-break

This one is very messy. A quick tour of both the caniuse and MDN pages for these features suggests that the data here is out-of-date and/or disorganized. I'm fine with letting this feature through, but when we generate a status for it, I think we're in for some surprises and updating BCD.


This is a new feature. Here are some ideas for reviewing it:

  • Is this a recognizable web feature to web developers? (caniuse features are often made by request, so it's likely, but let's double check our work here.)
  • Is this a reasonable identifier for the feature?
  • Does this have a reasonable spec link?
  • Does this have a reasonable caniuse reference?
  • Are the mdn/browser-compat-data features plausible pieces of the feature as a whole?
  • Are any pieces missing?
  • Are any of the listed features later additions, part of a distinct sub feature, or otherwise excludable?

@ddbeck ddbeck added the feature definition Creating or defining new features or groups of features. label Aug 28, 2023
Copy link
Member

@tidoust tidoust left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels weird to have a feature about page break and to include values that are for multi-column breaks.

Also, no orphans and widows?

@foolip
Copy link
Collaborator

foolip commented Feb 23, 2024

@mstensho do you have thoughts on how to organize fragmentation features in a way that aligns with how web developers think about them and that roughly matches how browsers have evolved?

@mstensho
Copy link

The data there is certainly outdated, indeed. Chrome has supported the avoid value on break-before/break-after for some time already, for instance.

Treating the three CSS properties (break-after, break-before, break-inside) together makes sense. Caniuse refers to the CSS 2.1 page-break-* properties, though. Would be better to refer to the break-* properties.

The entry should be fragmentation type agnostic (printing / multicol), and should prefer referring to css-break (rather than css-multicol, css-page or CSS 2.1).

What about orphans and widows? There is an entry for the orphans property: https://caniuse.com/mdn-css_properties_orphans , but no corresponding one for widows. There is a common "CSS widows & orphans" entry, though: https://caniuse.com/mdn-css_properties_orphans . Should all of this be merged into one "breaking feature", or would that be considered "too big"?

@ddbeck
Copy link
Collaborator Author

ddbeck commented Mar 19, 2024

OK, I've made a few changes to this feature's ID, name, and description. That said, I have low confidence about what to name this. I couldn't find a lot of evidence that developers think about break- as a general thing, so I've tried my best here. It might be that we choose a "bad" name and wait for developer feedback to revise it.

@ddbeck ddbeck requested review from foolip and tidoust March 19, 2024 15:09
@ddbeck
Copy link
Collaborator Author

ddbeck commented Apr 18, 2024

@foolip asked me to generate the dist file, to see if it's reasonable—it was not. I've taken up a whole new approach: splitting page and column breaks. This tells a much more realistic story about you can and can't do with these properties.

@@ -0,0 +1,15 @@
name: Column breaks
description: The `break-after`, `break-before`, `break-inside` CSS properties control where columns start or end.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since break-after appears in the other description too, can you say something about the context this feature refers to? It's structurally similar to gap in grid and flex contexts, but I don't think we have good wording to copy from.

I think the context can be described as the use of columns or column-count.

@@ -0,0 +1,18 @@
name: Page breaks
description: The `break-after`, `break-before`, `break-inside` CSS properties (along with `page-break-` aliases) control where pages start and end. Also known as pagination or page breaking.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, I suspect there's no syntax to point to for context. But if this is only for printing, perhaps mention that?

@@ -0,0 +1,15 @@
name: Column breaks
description: In columnar layouts (created by the `columns` or `column-count` CSS properties), the `break-after`, `break-before`, `break-inside` properties control where columns start or end.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one does something a little funny, setting the context before describing the thing. It does make its description distinct from the other breaking feature though, which I think makes this in the spirit of the rule if not the letter of it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me!

@@ -0,0 +1,18 @@
name: Page breaks
description: The `break-after`, `break-before`, `break-inside` CSS properties (along with `page-break-` aliases) control where printed pages start and end. Also known as pagination or page breaking.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now specifies "printed" in the description.

@ddbeck ddbeck requested a review from foolip April 19, 2024 09:22
name: Page breaks
description: The `break-after`, `break-before`, `break-inside` CSS properties (along with `page-break-` aliases) control where printed pages start and end. Also known as pagination or page breaking.
spec: https://drafts.csswg.org/css-break-3/#breaking-controls
caniuse: css-page-break
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://caniuse.com/css-page-break says partial support across the board, except good old Presto of course. Can you add a comment about the difference and if there's anything we need TODO?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, this. Caniuse says everything is partially implemented. Some of this is just out-of-date (e.g., lack of support for break- properties)—I can open a PR against caniuse for that.

But because nothing is shown as being fully supported on caniuse except Presto, we can't be sure what Alexis meant by fully-supported. I've filed Fyrd/caniuse#7045.

The good news here is that I believe we still ought to show a positive status. If caniuse says partially supported, it's still equally partially implemented across all browsers. They seem to have the same set of limitations.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The good news here is that I believe we still ought to show a positive status. If caniuse says partially supported, it's still equally partially implemented across all browsers. They seem to have the same set of limitations.

I spoke too soon. 😞

Alexis tested this again and showed that the avoid value is not consistently supported by browsers. I submitted mdn/browser-compat-data#22987 to update the BCD and changed the list of compat keys here to match caniuse.

This makes me think that the multicolumn breaks might also be broken, but I couldn't actually find bugs to that effect, so I'm letting that stuff stand.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh my, things are rarely simple. I've reviewed and merged that PR.

@foolip
Copy link
Collaborator

foolip commented Apr 26, 2024

@mstensho do you think the state of this PR now makes sense, treating page breaks and column breaks as distinct features?

ddbeck added a commit to ddbeck/browser-compat-data that referenced this pull request May 2, 2024
This came up in the course of defining page break features in
web-features. caniuse reports partial support due to lack of support in
Safari and Firefox.

See also:

- web-platform-dx/web-features#331
- Fyrd/caniuse#7045 (comment)
- https://caniuse.com/css-page-break
foolip pushed a commit to mdn/browser-compat-data that referenced this pull request May 2, 2024
This came up in the course of defining page break features in
web-features. caniuse reports partial support due to lack of support in
Safari and Firefox.

See also:

- web-platform-dx/web-features#331
- Fyrd/caniuse#7045 (comment)
- https://caniuse.com/css-page-break
@mstensho
Copy link

mstensho commented May 2, 2024

@mstensho do you think the state of this PR now makes sense, treating page breaks and column breaks as distinct features?

Works for me.

@foolip
Copy link
Collaborator

foolip commented May 2, 2024

Thanks @mstensho! @ddbeck can you apply the directory rename and merge this?

@ddbeck ddbeck merged commit 6170bec into web-platform-dx:main May 2, 2024
@ddbeck ddbeck deleted the 2023-08-28-add-feature-3-page-break branch May 2, 2024 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature definition Creating or defining new features or groups of features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants