-
-
Notifications
You must be signed in to change notification settings - Fork 58
Support CSS text-spacing and hanging-punctuation properties #814
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Spec: CSS Text Module Level 4 / Character Class Spacing: the text-spacing property - Working Draft: https://www.w3.org/TR/css-text-4/#text-spacing-property - Editor' Draft: https://drafts.csswg.org/css-text-4/#text-spacing-property ``` Name: text-spacing Value: normal | none | auto | [[ trim-start | space-start | space-first ] || [ trim-end | space-end | allow-end ] || [ trim-adjacent | space-adjacent ] || no-compress || ideograph-alpha || ideograph-numeric || punctuation]; Initial: normal Inherited: yes ``` **Limitations and differences from the current CSS draft spec:** - `normal` is equivalent to `space-first trim-end trim-adjacent` **Note:** it was `space-start allow-end trim-adjacent` in the draft spec - `auto` is equivalent to `trim-first trim-end trim-adjacent ideograph-alpha ideograph-numeric` **Note:** `auto` is defined in the editor's draft as "The user agent chooses a set of typographically high quality spacing value." - `ideograph-alpha` and `ideograph-numeric` create 1/6em space. **Note:** the 1/4em space in the draft is considered too wide in many cases. - `allow-end` is treated as `trim-end` - `no-compress` and `punctuation` are ignored Resolves #595
|
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/vivliostyle/vivliostyle/6vrZMvRL6YNB3acAyMtobCRJnE2q |
|
Known bugs:
|
Spec: CSS Text Module Level 3 / §8.2.1 Hanging Punctuation: the hanging-punctuation property - Working Draft: https://www.w3.org/TR/css-text-3/#hanging-punctuation-property - Editor' Draft: https://drafts.csswg.org/css-text-3/#hanging-punctuation-property ``` Name: hanging-punctuation Value: none | [ first || [ force-end | allow-end ] || last ] Initial: none Inherited: yes ``` **Limitations and differences from the current CSS draft spec:** - `allow-end` is treated as `force-end` - Stops and commas allowed to hang are limited to U+3001, U+3002, U+FF0C, U+FF0E, U+FF61, U+FF64 [、。,.、。] - Not include ASCII comma and full stop, Arabic comma adn full stop, Small comma, etc. that are included in the draft spec.
hanging-punctuation test |
Using display:inline-block causes problem of text-decoration:underline broken when hanging-punctuation is enabled.
This was referenced Nov 13, 2021
Closed
MurakamiShinyu
added a commit
that referenced
this pull request
Feb 4, 2022
MurakamiShinyu
added a commit
that referenced
this pull request
Feb 4, 2022
MurakamiShinyu
added a commit
that referenced
this pull request
Feb 4, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
text-spacing
Spec: CSS Text Module Level 4 / §10.2 Character Class Spacing: the text-spacing property
Limitations and differences from the current CSS draft spec
normalis equivalent tospace-first trim-end trim-adjacentNote: it was
space-start allow-end trim-adjacentin the draft specautois equivalent totrim-start trim-end trim-adjacent ideograph-alpha ideograph-numericNote:
autois defined in the editor's draft as"The user agent chooses a set of typographically high quality spacing value."
ideograph-alphaandideograph-numericcreate 1/6em space.Note: the 1/4em space in the draft is considered too wide in many cases.
(update: fixed in The allow-end value of text-spacing and hanging-punctuation #818)allow-endis treated astrim-endno-compressandpunctuationare ignoredhanging-punctuation
Spec: CSS Text Module Level 3 / §8.2.1 Hanging Punctuation: the hanging-punctuation property
Limitations and differences from the current CSS draft spec
(update: fixed in The allow-end value of text-spacing and hanging-punctuation #818)allow-endis treated asforce-end