-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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] Test text-align: match-parent on the root element #30175
Conversation
fb5229b
to
eae5a5a
Compare
@zcorpan There's already a test for this: css/css-text/text-align/text-align-match-parent-root-rtl.html It was in mozilla vendor-imports then was moved to the main test suite. |
Wait, I guess not, this tests the computed style. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test name could clarify that it's about the computed value.
7694a91
to
94c54b0
Compare
@nt1m thanks, fixed. |
Maybe this could be named "text-align-match-parent-root-rtl-computed.html" to be consistent with the text-align-match-parent-root-rtl.html test. Regarding the test that was renamed to "match-parent-001.html", can things be consistent with the rest of the match-parent tests: https://wpt.fyi/results/css/css-text/text-align?label=master&label=experimental&aligned&q=text-align-match-parent- ? The other tests could be renamed. |
Co-authored-by: Florian Rivoal <[email protected]>
If I understand correctly, a used value of 'direction: rtl' on the root element is propagated to the ICB per https://drafts.csswg.org/css-writing-modes-3/#icb
Then, https://drafts.csswg.org/css-text/#valdef-text-align-match-parent says
The initial value of text-align is 'start', so I guess the inherited value for the root element has to be 'start'. Therefore, it looks at the 'direction' of the ICB, which is propagated from the root element, and is thus 'rtl'. Therefore text-align should compute to 'right'.