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

Added a text-shadow and text-orientation: upright test #27770

Merged
merged 2 commits into from Sep 9, 2021

Conversation

TalbotG
Copy link
Contributor

@TalbotG TalbotG commented Feb 25, 2021

text-shadow-orientation-upright-001.html
reference/text-shadow-orientation-upright-001-ref.html

This test spun from
Issue 229211: text-shadow is drawn at the invalid position in vertical writing mode
on Chromium for Mac

The test and reference are coded in a way to elegantly work around subpixel positioning issue with Ahem font.

On my website:

http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s76-text-shadow-orientation-upright-001.html

http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/reference/text-shadow-orientation-upright-001-ref.html

@TalbotG TalbotG self-assigned this Feb 25, 2021
@TalbotG TalbotG removed the request for review from plinss February 25, 2021 00:44
@fantasai
Copy link
Contributor

fantasai commented Feb 25, 2021

I think your test is a bit more complicated than it needs to be again because you're trying to create a square. You could have, for example, used 4 different colored shadows off a single character and compared the result in vertical-rl to the same result in horizontal-tb. But the test is not incorrect.

Two options for you:

  • I can approve the test as-is. (Though I would recommend using green instead of purple and giving the div a red background.)
  • You can rewrite it using something like text-shadow: -1em 0 orange, 1em 0 blue, -1em purple, 1em yellow; margin: 1.5em against a single-character test div and, now that it's simpler and easier to understand, include a div for every writing mode combination.

@TalbotG
Copy link
Contributor Author

TalbotG commented Feb 25, 2021

4 different colored shadows off a single character and compared the result in vertical-rl to the same result in horizontal-tb

This flower-and-petals-like formation is indeed easier to understand and its design is more simple. I have created

http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s76-text-shadow-orientation-upright-002.html

http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/reference/text-shadow-orientation-upright-002-ref.html

and I will make the necessary github adjustments to this PR later today.

Copy link
Contributor

@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.

I'm a little bit concerned that the text will have anti-aliasing but the image reference won't, so probably a better reference would be to have a horizontal-mode copy of the text-shadow test code. But I'm not noticing any problems at the moment, so I will approve this and maybe the reference can be tweaked later if needed.

@fantasai fantasai merged commit f810df2 into web-platform-tests:master Sep 9, 2021
@TalbotG
Copy link
Contributor Author

TalbotG commented Oct 29, 2021

I'm a little bit concerned that the text will have anti-aliasing but the image reference won't, so probably a better reference would be to have a horizontal-mode copy of the text-shadow test code. But I'm not noticing any problems at the moment, so I will approve this and maybe the reference can be tweaked later if needed.

https://wpt.fyi/results/css/css-writing-modes/text-shadow-orientation-upright-001.html?label=experimental&label=master&aligned

There is indeed a failure in Edge 96 due to anti-aliasing but only in Edge 96. I will revisit the reference and implement your proposal later this fall: it is on my to-do-list now.

@TalbotG
Copy link
Contributor Author

TalbotG commented Aug 3, 2022

the text will have anti-aliasing but the image reference won't, so probably a better reference would be to have a horizontal-mode copy of the text-shadow test code.

I almost forgot about this. A proposed correction and improvement is now in PR35337

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.

None yet

2 participants