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-4] How to handle <string> in text-align? #9386

Closed
cdoublev opened this issue Sep 20, 2023 · 2 comments
Closed

[css-text-4] How to handle <string> in text-align? #9386

cdoublev opened this issue Sep 20, 2023 · 2 comments

Comments

@cdoublev
Copy link
Collaborator

cdoublev commented Sep 20, 2023

Should it set text-align-all?

Name: text-align
Value: start | end | left | right | center | <string> | justify | match-parent | justify-all

This shorthand property sets the text-align-all and text-align-last properties [...]. Values other than justify-all or match-parent are assigned to text-align-all and reset text-align-last to auto.

https://drafts.csswg.org/css-text-4/#propdef-text-align

None of the longhands accept <string>.

@Loirooriol
Copy link
Contributor

The quote implies that text-align-all needs to accept <string>.
text-align-last might accept it too, but it wouldn't make much sense to me.

frivoal added a commit to frivoal/csswg-drafts that referenced this issue Oct 20, 2023
This had been forgotten in the edit that introduced it to the shorthand.

See w3c#9386
@frivoal
Copy link
Collaborator

frivoal commented Oct 20, 2023

RIght. This is clearly a spec bug. Values in shorthand with no correspondence in longhands don't make sense.

The intent is clear from this sentence:

Values other than justify-all or match-parent are assigned to text-align-all and reset text-align-last to auto.

<string> needs to be added to text-align-all. Did so in 8475bad

@frivoal frivoal closed this as completed Oct 20, 2023
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