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

fix(placement): reuse TextColor/BackgroundColor for "AD" link #11540

Merged
merged 2 commits into from
Jul 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions client/src/ui/organisms/placement/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,24 @@ section.place {
width: 11rem;

.pong-note {
background-color: #fff6;
border: 1px solid #111a;
background-color: var(--place-new-side-color);
border: 1px solid var(--place-new-side-background);
border-radius: 0.25rem;
color: #fff;
color: var(--place-new-side-background);
font-size: 0.625rem;
margin: 0.5rem;
opacity: 0.4;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think opacity messes with contrast detection in Firefox's accessibility tools, but I don't see another way since relative colours don't have wide support (not sure why that page doesn't have a BCD table).

Copy link
Contributor Author

@caugner caugner Jul 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just checked and it looks like Firefox DevTools Accessibility Tools take the opacity into consideration, i.e. the opacity: 0.4 does not have enough contrast, but it's kind of by design. (Increasing to opacity: 0.8, for example, resolves the displayed Contrast issue.)

padding: 0 0.25rem;
position: absolute;
right: 0;
text-decoration: none;
text-decoration: underline;
text-transform: uppercase;
top: 0;
width: max-content;

&:hover {
background-color: #fff;
color: #111;
opacity: unset;
text-decoration: none;
}
}

Expand Down