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] Japanese text (in #jp-title-break) in Example 24 is unreadable, with dark color-scheme #11099

Closed
dholbert opened this issue Oct 28, 2024 · 3 comments

Comments

@dholbert
Copy link
Member

dholbert commented Oct 28, 2024

If you view https://drafts.csswg.org/css-text-4/#jp-title-break with a dark color-scheme-preference in your browser, the Japanese text in the example is barely readable (light-gray-on-white-background).

This is because that section sets background while letting the default color be inherited through; and if you do that, you end up with a light color in a dark-color-scheme.

Here's the relevant style rule in the markup for this page -- note that we're setting background but not setting color:

<div class="example" id=jp-title-break>
<style>
#jp-title-break td samp,
#jp-title-break td pre {
font-size: 1.5em;
width: 6em;
line-height: 2;
padding: 0.5em 1em;
display: block;
margin: auto;
border: solid gray 1px;
background: white;

We perhaps want to add color:black or similar, just before background:white, so that we're not at the mercy of the inherited color-scheme-defined text-color here (which may or may not be hardcoded white background).

@dholbert
Copy link
Member Author

(This is similar to speced/bikeshed#2922 which is about img alt-text being unreadable due to a similar background:white rule that Bikeshed itself applies behind images. Though in that bug, the unreadable alt-text eventually gets replaced with an image [assuming things work out properly], so it's a bit less noticeable.)

@dholbert
Copy link
Member Author

dholbert commented Oct 28, 2024

Here's a screenshot of the first box within css-text-4 example 24, showing how this looks right now, when you view this page in a dark color-scheme (regardless of browser):
image

@frivoal
Copy link
Collaborator

frivoal commented Oct 29, 2024

Thanks! fixed.

@frivoal frivoal added the Testing Unnecessary Memory aid - issue doesn't require tests label Oct 29, 2024
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

2 participants