-
Notifications
You must be signed in to change notification settings - Fork 707
[css-text][text-spacing] Visual regressions of line-start at portals and news sites #9511
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
Comments
@kojiishi Thanks for reporting this. Real world experience here is very useful.
I am not sure I follow, as you also said that most people though that Maybe we do need a new value, but I wonder how much of this problem we can address using UA stylesheets, for example by setting |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
@frivoal's idea of augmenting the UA stylesheet to have fine-tuned defaults balancing compat and ideal rendering taken in account seems reasonable to me. Might be hard, but worth experimenting. |
Yes, it's acceptable, though not great. It doesn't change the visual of line-start from without the feature implemented, so no improvements on line-start, but it doesn't regress. In these examples screenshot of
Good idea. This is not easy though, as the problem is about web-compat of existing sites, and they use
|
I mean, adding UA stylesheet can't help improving the initial value due to web-compat, but adding |
The criticalness of regressions for existing content by changing the initial behavior vary by who you ask, this table shows the "worst - best" personal opinion range for each case from the Japanese discussion:
The "no trimming" option was more favored decades ago, but I think the trend is gradually moving towards Kobayashi-sensei said he will give more thoughts on each use cases, so this is preliminary. |
Thanks for summarizing the criticalness on each case. I'd like to add my opinion. I think the "Headline lists" with Also the "Body with <style>
p { margin: 0; text-indent: 1em; }
</style>
<p>「あいうえお」かきくけこさしすせそ「たちつてとなにぬねの」はひふへほまみむめもやゆよ。</p> The result of "No trimming at line-start" will be:
And the result of "space-first" will be:
I feel the result of "space-first" is much better than "No trimming at line-start". And I think there are more cases where |
Thank you @kojiishi for the summary. (update: I will take back the following part, as this is the style EBPAJ EPUB 3 File Creation Guide recommends) |
Related to my previous comment, is there a way to achieve the “one full-width” indentation style? The |
I personally don't agree, the table in #9511 (comment) is to pick up all voices, so updated. It was "the worst case list" but now updated to "the worst - best range list". I hope this looks better. |
How about e-Books? Or if you have suggestion, that helps. I agree the style sometimes happens in non-novels or non-e-Books sites, but IIUC it's considered "critical" for e-Books sites, no? |
Thanks! Now this table looks very good and interesting. In my feeling, all "Ok"s in the |
Done. |
Sorry, I will take back my original comment. As EBPAJ EPUB 3 File Creation Guide recommends using fullwidth character to indent, and removing it when the first character is a fullwidth bracket, I agree it will represent major part of novels. |
The "proper" way (clean separation of content and style) would be: text-spacing: trim-auto;
text-intent: 1em; /* or 1ic */
hanging-punctuation: first; browser support for
|
My understanding is that the effect achieved by this style is not specific to novels in theory, and could be desired by anyone. However, in practice, many novel EPUBs (and publications of the same content on the web) use this style because they are particular enough to try and work around the historical deficiencies of CSS (so they are prepared according to http://ebpaj.jp/counsel/guide), while other content that use this style is quite rare. But it does happen. Here is an example: For content prepared in this style, regardless of whether it is a novel or not, applying |
In the table of #9511 (comment), I'd say that for
|
@frivoal Thanks for the feedback. In this issue, I think I'd like to focus on how much each value can improve/regress if we change the initial value, so that we can reach a consensus on the initial value. IIUC, your point is about updating the CSS to get the desired results, is that right? It's a great discussion point and I wasn't aware of the need for Or if I'm mistaken, and it's relevant for changing the initial value behavior and how it improves/breaks existing content, can you clarify? |
I mentioned this here because @kidayasuo asked, and because I find it relevant to what is / isn't "ideal": once |
@kojiishi About "Existing implementations" of
That is, at that time (in 2018), Kinoppy already had implemented |
@frivoal Right, agree. The comparison table for "what each value can achieve" is very important for choosing the initial value. We want to choose the initial value that provides the best results in the widest use cases. Your and @kidayasuo's comments are very helpful for that. Another table is needed for choosing the initial value, to ensure "which value is safe to ship for existing content." With your comment, I started thinking about creating one table that contains both, but that'll likely be very complex, as we'll want to add comments a lot more to all other cells too. As you might agree, so many people have words to say for their favorite styles. When comparing "valuable" and "safe", I think we want to choose the one that is "the most valuable value within the safe values." If there's a consensus here, it will be 2 step process; filter by safety, then filter by valuableness. I created this table for the first step, because currently proposed initial value turned out to break portal sites in Japan, and the risk is beyond what our team can ship. So, to all, I'd like to suggest us to focus on the safety and web-compat first. If we find multiple safe values, we can discuss which value is the most appropriate for the initial value. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
I made a test file to compare trim-auto, space-first, and space-start (= no trimming at line-start) values of the text-spacing-trim property. HTML: text-spacing-trim-space-first-test.html You can test it with Vivliostyle which fully supports text-spacing-trim current spec. View with Vivliostyle Viewer: https://vivliostyle.org/viewer/#src=https://gist.github.com/MurakamiShinyu/ea7fdd45e655f97fb64545c444db9099 PDF (created with Vivliostyle CLI): text-spacing-trim-space-first-test.pdf Screenshots: |
I made a twitter poll on preference for default of line-start punctuation handling on CSS text-spacing. So far, the most preferred is A (trim at all line-start), the second is C (no trim at line-start), and the least preferred (about 20%) is B (trim at line-start except first line). Also some people gave comments saying:
I understood that it will be difficult to reach consensus on If we change the line-start default to |
It sounds like we have a possible resolution to this issue, after finding web compat problems with changing the default rendering to
This will resolve this issue and #9521. The reason to make this resolution is that: For
For
|
Automatic update from web-platform-tests Adjust syntax of text-spacing[-trim] to match CSSWG resolution See w3c/csswg-drafts#9511 -- Adjust behavior of existing tests to match CSS spec change See w3c/csswg-drafts#9511 -- wpt-commits: 028df8b0a1712346fe9cf95757d35b277031a167, b12ce07e54c644455dcf088584e586783e002871 wpt-pr: 43766
Automatic update from web-platform-tests Adjust syntax of text-spacing[-trim] to match CSSWG resolution See w3c/csswg-drafts#9511 -- Adjust behavior of existing tests to match CSS spec change See w3c/csswg-drafts#9511 -- wpt-commits: 028df8b0a1712346fe9cf95757d35b277031a167, b12ce07e54c644455dcf088584e586783e002871 wpt-pr: 43766
Automatic update from web-platform-tests Adjust syntax of text-spacing[-trim] to match CSSWG resolution See w3c/csswg-drafts#9511 -- Adjust behavior of existing tests to match CSS spec change See w3c/csswg-drafts#9511 -- wpt-commits: 028df8b0a1712346fe9cf95757d35b277031a167, b12ce07e54c644455dcf088584e586783e002871 wpt-pr: 43766 UltraBlame original commit: 691e2ee7a1d61dc28a1d13dd8c43b99bc4a4ab5d
Automatic update from web-platform-tests Adjust syntax of text-spacing[-trim] to match CSSWG resolution See w3c/csswg-drafts#9511 -- Adjust behavior of existing tests to match CSS spec change See w3c/csswg-drafts#9511 -- wpt-commits: 028df8b0a1712346fe9cf95757d35b277031a167, b12ce07e54c644455dcf088584e586783e002871 wpt-pr: 43766 UltraBlame original commit: 691e2ee7a1d61dc28a1d13dd8c43b99bc4a4ab5d
Automatic update from web-platform-tests Adjust syntax of text-spacing[-trim] to match CSSWG resolution See w3c/csswg-drafts#9511 -- Adjust behavior of existing tests to match CSS spec change See w3c/csswg-drafts#9511 -- wpt-commits: 028df8b0a1712346fe9cf95757d35b277031a167, b12ce07e54c644455dcf088584e586783e002871 wpt-pr: 43766 UltraBlame original commit: 691e2ee7a1d61dc28a1d13dd8c43b99bc4a4ab5d
Automatic update from web-platform-tests Adjust syntax of text-spacing[-trim] to match CSSWG resolution See w3c/csswg-drafts#9511 -- Adjust behavior of existing tests to match CSS spec change See w3c/csswg-drafts#9511 -- wpt-commits: 028df8b0a1712346fe9cf95757d35b277031a167, b12ce07e54c644455dcf088584e586783e002871 wpt-pr: 43766
Automatic update from web-platform-tests Adjust syntax of text-spacing[-trim] to match CSSWG resolution See w3c/csswg-drafts#9511 -- Adjust behavior of existing tests to match CSS spec change See w3c/csswg-drafts#9511 -- wpt-commits: 028df8b0a1712346fe9cf95757d35b277031a167, b12ce07e54c644455dcf088584e586783e002871 wpt-pr: 43766 UltraBlame original commit: 40dcf214814a53ef5aa2965ace4e2f5aeb99f183
Automatic update from web-platform-tests Adjust syntax of text-spacing[-trim] to match CSSWG resolution See w3c/csswg-drafts#9511 -- Adjust behavior of existing tests to match CSS spec change See w3c/csswg-drafts#9511 -- wpt-commits: 028df8b0a1712346fe9cf95757d35b277031a167, b12ce07e54c644455dcf088584e586783e002871 wpt-pr: 43766 UltraBlame original commit: 40dcf214814a53ef5aa2965ace4e2f5aeb99f183
Automatic update from web-platform-tests Adjust syntax of text-spacing[-trim] to match CSSWG resolution See w3c/csswg-drafts#9511 -- Adjust behavior of existing tests to match CSS spec change See w3c/csswg-drafts#9511 -- wpt-commits: 028df8b0a1712346fe9cf95757d35b277031a167, b12ce07e54c644455dcf088584e586783e002871 wpt-pr: 43766 UltraBlame original commit: 40dcf214814a53ef5aa2965ace4e2f5aeb99f183
This patch updates the `text-spacing` shorthand parsing: 1. Update the initial value and supported values as per the resolution at: w3c/csswg-drafts#9511 2. Change the logic to handle `normal` as both properties accept `normal` after the spec change above. 3. Fix the canonical order to match the [spec] (`spacing-trim` comes first). [spec]: https://drafts.csswg.org/css-text-4/#text-spacing-property Bug: 1463890, 1463891 Change-Id: I8a047f4b87ba728e2f577301b5a1fc3ce824341e
This patch updates the `text-spacing` shorthand parsing: 1. Update the initial value and supported values as per the resolution at: w3c/csswg-drafts#9511 2. Change the logic to handle `normal` as both properties accept `normal` after the spec change above. 3. Fix the canonical order to match the [spec] (`spacing-trim` comes first). Supported values of longhands are: * `text-autospace`: `normal`, `no-autospace`. * `text-spacing-trim`: `normal`, `trim-start`, `space-first`, `space-all`. The `text-spacing` shorthands support values above and `none`. [spec]: https://drafts.csswg.org/css-text-4/#text-spacing-property Bug: 1463890, 1463891 Change-Id: I8a047f4b87ba728e2f577301b5a1fc3ce824341e
This patch updates the `text-spacing` shorthand parsing: 1. Update the initial value and supported values as per the resolution at: w3c/csswg-drafts#9511 2. Change the logic to handle `normal` as both properties accept `normal` after the spec change above. 3. Fix the canonical order to match the [spec] (`spacing-trim` comes first). Current supported values of longhands are: * `text-autospace`: `normal`, `no-autospace`. * `text-spacing-trim`: `normal`, `trim-start`, `space-all`, `space-first`. The `text-spacing` shorthands support values above and `none`. [spec]: https://drafts.csswg.org/css-text-4/#text-spacing-property Bug: 1463890, 1463891 Change-Id: I8a047f4b87ba728e2f577301b5a1fc3ce824341e
This patch updates the `text-spacing` shorthand parsing: 1. Update the initial value and supported values as per the resolution at: w3c/csswg-drafts#9511 2. Change the logic to handle `normal` as both properties accept `normal` after the spec change above. 3. Fix the canonical order to match the [spec] (`spacing-trim` comes first). Current supported values of longhands are: * `text-autospace`: `normal`, `no-autospace`. * `text-spacing-trim`: `normal`, `trim-start`, `space-all`, `space-first`. The `text-spacing` shorthands support values above and `none`. [spec]: https://drafts.csswg.org/css-text-4/#text-spacing-property Bug: 1463890, 1463891 Change-Id: I8a047f4b87ba728e2f577301b5a1fc3ce824341e
This patch updates the `text-spacing` shorthand parsing: 1. Update the initial value and supported values as per the resolution at: w3c/csswg-drafts#9511 2. Change the logic to handle `normal` as both properties accept `normal` after the spec change above. 3. Fix the canonical order to match the [spec] (`spacing-trim` comes first). Current supported values of longhands are: * `text-autospace`: `normal`, `no-autospace`. * `text-spacing-trim`: `normal`, `trim-start`, `space-all`, `space-first`. The `text-spacing` shorthands support values above and `none`. [spec]: https://drafts.csswg.org/css-text-4/#text-spacing-property Bug: 1463890, 1463891 Change-Id: I8a047f4b87ba728e2f577301b5a1fc3ce824341e
This patch updates the `text-spacing` shorthand parsing: 1. Update the initial value and supported values as per the resolution at: w3c/csswg-drafts#9511 2. Change the logic to handle `normal` as both properties accept `normal` after the spec change above. 3. Fix the canonical order to match the [spec] (`spacing-trim` comes first). Current supported values of longhands are: * `text-autospace`: `normal`, `no-autospace`. * `text-spacing-trim`: `normal`, `trim-start`, `space-all`, `space-first`. The `text-spacing` shorthands support values above and `none`. [spec]: https://drafts.csswg.org/css-text-4/#text-spacing-property Bug: 1463890, 1463891 Change-Id: I8a047f4b87ba728e2f577301b5a1fc3ce824341e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5232448 Reviewed-by: Anders Hartvoll Ruud <[email protected]> Commit-Queue: Koji Ishii <[email protected]> Cr-Commit-Position: refs/heads/main@{#1251995}
This patch updates the `text-spacing` shorthand parsing: 1. Update the initial value and supported values as per the resolution at: w3c/csswg-drafts#9511 2. Change the logic to handle `normal` as both properties accept `normal` after the spec change above. 3. Fix the canonical order to match the [spec] (`spacing-trim` comes first). Current supported values of longhands are: * `text-autospace`: `normal`, `no-autospace`. * `text-spacing-trim`: `normal`, `trim-start`, `space-all`, `space-first`. The `text-spacing` shorthands support values above and `none`. [spec]: https://drafts.csswg.org/css-text-4/#text-spacing-property Bug: 1463890, 1463891 Change-Id: I8a047f4b87ba728e2f577301b5a1fc3ce824341e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5232448 Reviewed-by: Anders Hartvoll Ruud <[email protected]> Commit-Queue: Koji Ishii <[email protected]> Cr-Commit-Position: refs/heads/main@{#1251995}
This patch updates the `text-spacing` shorthand parsing: 1. Update the initial value and supported values as per the resolution at: w3c/csswg-drafts#9511 2. Change the logic to handle `normal` as both properties accept `normal` after the spec change above. 3. Fix the canonical order to match the [spec] (`spacing-trim` comes first). Current supported values of longhands are: * `text-autospace`: `normal`, `no-autospace`. * `text-spacing-trim`: `normal`, `trim-start`, `space-all`, `space-first`. The `text-spacing` shorthands support values above and `none`. [spec]: https://drafts.csswg.org/css-text-4/#text-spacing-property Bug: 1463890, 1463891 Change-Id: I8a047f4b87ba728e2f577301b5a1fc3ce824341e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5232448 Reviewed-by: Anders Hartvoll Ruud <[email protected]> Commit-Queue: Koji Ishii <[email protected]> Cr-Commit-Position: refs/heads/main@{#1251995}
…te `text-spacing` shorthand, a=testonly Automatic update from web-platform-tests [text-autospace][text-spacing-trim] Update `text-spacing` shorthand This patch updates the `text-spacing` shorthand parsing: 1. Update the initial value and supported values as per the resolution at: w3c/csswg-drafts#9511 2. Change the logic to handle `normal` as both properties accept `normal` after the spec change above. 3. Fix the canonical order to match the [spec] (`spacing-trim` comes first). Current supported values of longhands are: * `text-autospace`: `normal`, `no-autospace`. * `text-spacing-trim`: `normal`, `trim-start`, `space-all`, `space-first`. The `text-spacing` shorthands support values above and `none`. [spec]: https://drafts.csswg.org/css-text-4/#text-spacing-property Bug: 1463890, 1463891 Change-Id: I8a047f4b87ba728e2f577301b5a1fc3ce824341e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5232448 Reviewed-by: Anders Hartvoll Ruud <[email protected]> Commit-Queue: Koji Ishii <[email protected]> Cr-Commit-Position: refs/heads/main@{#1251995} -- wpt-commits: 2036f94ae33f010be2e3c994961d902dd56f47e5 wpt-pr: 44162
…te `text-spacing` shorthand, a=testonly Automatic update from web-platform-tests [text-autospace][text-spacing-trim] Update `text-spacing` shorthand This patch updates the `text-spacing` shorthand parsing: 1. Update the initial value and supported values as per the resolution at: w3c/csswg-drafts#9511 2. Change the logic to handle `normal` as both properties accept `normal` after the spec change above. 3. Fix the canonical order to match the [spec] (`spacing-trim` comes first). Current supported values of longhands are: * `text-autospace`: `normal`, `no-autospace`. * `text-spacing-trim`: `normal`, `trim-start`, `space-all`, `space-first`. The `text-spacing` shorthands support values above and `none`. [spec]: https://drafts.csswg.org/css-text-4/#text-spacing-property Bug: 1463890, 1463891 Change-Id: I8a047f4b87ba728e2f577301b5a1fc3ce824341e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5232448 Reviewed-by: Anders Hartvoll Ruud <andruudchromium.org> Commit-Queue: Koji Ishii <kojiichromium.org> Cr-Commit-Position: refs/heads/main{#1251995} -- wpt-commits: 2036f94ae33f010be2e3c994961d902dd56f47e5 wpt-pr: 44162 UltraBlame original commit: 4c40e63ee33115e08d1b3273c4a5762974847f17
…te `text-spacing` shorthand, a=testonly Automatic update from web-platform-tests [text-autospace][text-spacing-trim] Update `text-spacing` shorthand This patch updates the `text-spacing` shorthand parsing: 1. Update the initial value and supported values as per the resolution at: w3c/csswg-drafts#9511 2. Change the logic to handle `normal` as both properties accept `normal` after the spec change above. 3. Fix the canonical order to match the [spec] (`spacing-trim` comes first). Current supported values of longhands are: * `text-autospace`: `normal`, `no-autospace`. * `text-spacing-trim`: `normal`, `trim-start`, `space-all`, `space-first`. The `text-spacing` shorthands support values above and `none`. [spec]: https://drafts.csswg.org/css-text-4/#text-spacing-property Bug: 1463890, 1463891 Change-Id: I8a047f4b87ba728e2f577301b5a1fc3ce824341e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5232448 Reviewed-by: Anders Hartvoll Ruud <andruudchromium.org> Commit-Queue: Koji Ishii <kojiichromium.org> Cr-Commit-Position: refs/heads/main{#1251995} -- wpt-commits: 2036f94ae33f010be2e3c994961d902dd56f47e5 wpt-pr: 44162 UltraBlame original commit: 4c40e63ee33115e08d1b3273c4a5762974847f17
This patch updates the `text-spacing` shorthand parsing: 1. Update the initial value and supported values as per the resolution at: w3c/csswg-drafts#9511 2. Change the logic to handle `normal` as both properties accept `normal` after the spec change above. 3. Fix the canonical order to match the [spec] (`spacing-trim` comes first). Current supported values of longhands are: * `text-autospace`: `normal`, `no-autospace`. * `text-spacing-trim`: `normal`, `trim-start`, `space-all`, `space-first`. The `text-spacing` shorthands support values above and `none`. [spec]: https://drafts.csswg.org/css-text-4/#text-spacing-property Bug: 1463890, 1463891 Change-Id: I8a047f4b87ba728e2f577301b5a1fc3ce824341e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5232448 Reviewed-by: Anders Hartvoll Ruud <[email protected]> Commit-Queue: Koji Ishii <[email protected]> Cr-Commit-Position: refs/heads/main@{#1251995}
The current initial value of the
text-spacing-trim
property isspace-first
. This was chosen because the ideal valuetrim-auto
turned out to break novel sites at #2462.From dogfooding a prototype, the
space-first
turned out to regresss portal sites and news sites. The regressions were found at MSN Japan and Google News, occuring multiple times a day. Some consider this a minor visual regression, while others consider a critically blocking regression.To summairze a long Japanese discussion at JLTF:
trim-auto
is the ideal value for body text and headlines. Note, iOS 17/macOS Sonoma applies this style by default to their native controls.trim-auto
still breaks documents using a style used by some novels, as reported at [css-text-4] Propose 'text-spacing: space-first' (trim-start-except-first-line) as a normal behavior #2462, whilespace-first
doesn't.trim-auto
is ideal.space-first
is a) less ideal for body text, b) quite strange for headlines, and c) critically regresses headline lists seen in portal top pages, news sites, blog sites, etc. (note the criticalness is controversial, some people consider it's minor in all cases, while others think critically blocking.)From the feedback so far to the CSS prorotype, Android, and iOS, I think users/authors are particular about:
At this point, I can't find options other than defining a new value that doesn't trim line-start at all, and make it initial.
/cc @fantasai @frivoal @nt1m @vitorroriz @Clqsin45 @MurakamiShinyu @himorin @kidayasuo
The text was updated successfully, but these errors were encountered: