Skip to content
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-text] Editorial nit for example 8 #5024

Closed
r12a opened this issue Apr 29, 2020 · 12 comments
Closed

[css-text] Editorial nit for example 8 #5024

r12a opened this issue Apr 29, 2020 · 12 comments
Assignees

Comments

@r12a
Copy link
Contributor

r12a commented Apr 29, 2020

4.1.3. Segment Break Transformation Rules
https://drafts.csswg.org/css-text-3/#line-break-transform

Example 8.
I think the line break after the first line of the Chinese example is unfortunate, because the untrained eye won't be able to immediately detect that the line-break wasn't turned into a space (line ends with ,). Why not pull 在 up onto the first line?

@frivoal frivoal added the css-text-3 Current Work label May 4, 2020
@frivoal
Copy link
Collaborator

frivoal commented May 4, 2020

On the one hand, you're right that it's not visually obvious there's not an extra space for people who don't know that this punctuation sign is a wide one. On the other hand, this example demonstrates that the segment break transformation works fine with punctuation marks at the end of the line, and making the change you suggest would loose that.

@r12a
Copy link
Contributor Author

r12a commented May 4, 2020

Yes, i figured that was why you did it, but it seemed to me that the disadvantage for most readers outweighted the advantage for those with enough awareness to interpret correctly what was happening.

@frivoal
Copy link
Collaborator

frivoal commented May 6, 2020

Maybe we can replace the with a ? Since it is a centered punctuation mark, there's no risk that it looks like a space got injected, and we can still demostrate that you can line break around punctuation. The phrasing is less natural, but the text still makes sense.

@r12a
Copy link
Contributor Author

r12a commented May 6, 2020

Mmm. It's not centred in Simplified Chinese, only Traditional, eg. go here and select a SC font. (You may find this table useful)

Also, this doesn't currently work as expected with all punctuation. For example, if you swap the with a you get a space after. :(

Btw, there's also a typo in the flattened version: missing 写.

@r12a
Copy link
Contributor Author

r12a commented May 6, 2020

Also, the markup for the example doesn't have a lang attribute:

<figure>
<pre>这个段落是呢么长,
在一行写不行。最好
用三行写。
</pre>
     <p>这个段落是呢么长,在一行不行。最好用三行写。</p>

These being han characters, that may lead to some unpredictable results for readers, because different browsers apply different fonts by default - could be SC, TC, or JA.

@frivoal
Copy link
Collaborator

frivoal commented May 9, 2020

Btw, there's also a typo in the flattened version: missing 写.

and

Also, the markup for the example doesn't have a lang attribute

Fixed: 3fc4268

@frivoal frivoal self-assigned this May 25, 2020
@frivoal
Copy link
Collaborator

frivoal commented May 25, 2020

@fantasai and @kojiishi, what do you think?

@fantasai
Copy link
Collaborator

I think having the example handle punctuation is good; the second line already shows the case between two Letters.

For example, if you swap the , with a ⁈ you get a space after. :(

@r12a, If you want to discuss this comment, please file it separately. We do already have a related discussion in #5017 But a few points to note: we've been asked by some implementers to keep things block-by-block since this code is "hot", and we've been asked to avoid switching behavior based on language (which has bad implications for both perf and portability).

@frivoal
Copy link
Collaborator

frivoal commented Jun 3, 2020

So, other than the fixes already made and mentioned in #5024 (comment), the proposal would be to close this with no change, the rationale being that while it may not be immediately visually obvious to the non trained eye what's going on, trained/careful eyes will understand, and it is better for the example to cover this situation than not.

@r12a is that acceptable to you?

@r12a
Copy link
Contributor Author

r12a commented Jun 3, 2020

For example, if you swap the , with a ⁈ you get a space after. :(

@r12a, If you want to discuss this comment, please file it separately. We do already have a related discussion in #5017

I was just trying to say that

we can still demostrate that you can line break around punctuation

is only true for some punctuation.

@r12a
Copy link
Contributor Author

r12a commented Jun 3, 2020

Then my suggestion would be to replace the zh-Hans language tag with zh-Hant. That will produce a centred punctuation, which still makes the point but is (slightly) less open to the possible misunderstanding we started with.

I'd be happier if you made that change, but i leave it up to you.

@frivoal
Copy link
Collaborator

frivoal commented Jun 4, 2020

Switching to zh-Hant seems like a reasonable compromise, I'll do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants