Skip to content

[css-text-4] Add word-boundary-detection and word-boundary-expansion #4153

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

Merged
merged 7 commits into from
Aug 30, 2019

Conversation

frivoal
Copy link
Collaborator

@frivoal frivoal commented Jul 27, 2019

No description provided.

@frivoal frivoal requested a review from fantasai July 27, 2019 21:41
@frivoal frivoal self-assigned this Jul 27, 2019
This matches the proposed behavior for selectors 4
(see w3c#4212)
Copy link
Collaborator

@fantasai fantasai left a comment

Choose a reason for hiding this comment

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

Minor comments. Overall looks OK. Didn't double-check the examples. Feel free to merge if you think you've addressed comments adequately or otherwise want to handle them as follow-up issues.

A <dfn data-dfn-for='' data-dfn-type=dfn>virtual word boundary</dfn> is similar to the presence
of the ZERO WIDTH SPACE (U+200B) character:
it introduces a [=soft wrap opportunity=]
and is affected by the 'word-boundary-expansion' property;
Copy link
Collaborator

Choose a reason for hiding this comment

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

End sentence.

and is affected by the 'word-boundary-expansion' property;
its presence has no effect on text shaping,
nor on 'word-spacing'.
However, its insertion must have no effect on the underlying content,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Inserting [=virtual word boundaries=] must have ...

with both the [=content language=] and <<lang>>
<i>canonicalized</i> and converted to <i>extlang form</i>
as per section 4.5 of [[!RFC5646]],
then the [=used value=] is ''word-boundary-detection/manual'',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this be normal?

(see [[BCP47]]).
If the UA does not support word-boundary detection
for <em>all</em> languages represented by the specified range,
it must reject that value at parse-time.
Copy link
Collaborator

Choose a reason for hiding this comment

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

"rejected at parse-time" is not the right terminology. You want to say it's invalid. E.g.

If the UA does not support word-boundary detection for all languages represented by the specified language range, that specified value is invalid (and will cause the declaration to be ignored).

or

Only <<lang>> values for which the UA has support of all languages represented by the specified range are valid.

or somesuch.

between a [=typographic letter unit=]
and a subsequent [=typographic character unit=] from the [[!UNICODE]] Pe or Pf classes,
or between a [=typographic letter unit=]
and a preceeding [=typographic character unit=] from the [[!UNICODE]] Ps or Pi classes,
Copy link
Collaborator

Choose a reason for hiding this comment

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

IIRC Pf/Pi classes are characters that are sometimes used as opening and sometimes used as closing, so this might not be quite correct.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point. I've though some more about it, and derived updated rules from UAX14 line breaking classes, rather than directly from unicode general categories.

</dl>

The User Agent must not replace
instances of U+200B imediately preceding or following
Copy link
Collaborator

Choose a reason for hiding this comment

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

immediately

Set character-based virtual-word-boundary prohibitions based on UAX 14
classes rather than unicode General Caterogies.
@frivoal frivoal merged commit c68be21 into w3c:master Aug 30, 2019
@frivoal frivoal deleted the expansion branch August 30, 2019 12:13
@frivoal
Copy link
Collaborator Author

frivoal commented Aug 30, 2019

Ok, I've addressed your comments and merged. The largest change I made was in response to your comment about Pi an Pf. Thinking about it, not only did I agree, but I though this section would work out better using UAX14 line breaking classes than unicode general categories. See 87a4192

If you think that's actually a step back, let me know (here or in a new issue), and I'll revert to what it was prior to that, with Pi and Pf removed.

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

Successfully merging this pull request may close these issues.

2 participants