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

Old luminance coefficient in code #1835

Closed
gabalafou opened this issue May 27, 2024 · 2 comments · Fixed by #1837
Closed

Old luminance coefficient in code #1835

gabalafou opened this issue May 27, 2024 · 2 comments · Fixed by #1837

Comments

@gabalafou
Copy link
Collaborator

gabalafou commented May 27, 2024

Comes from WCAG definition. This Stylelint rule is meant for CSS style rules, not SCSS functions, so the lint failure for this line is definitely a false positive.

However, @trallard, note:

Before May 2021 the value of 0.04045 in the definition was different (0.03928). It was taken from an older version of the specification and has been updated. It has no practical effect on the calculations in the context of these guidelines.
https://www.w3.org/TR/WCAG22/#dfn-relative-luminance

Originally posted by @gabalafou in #1823 (comment)

@trallard
Copy link
Collaborator

So we only need to update the scss functions right?

@gabalafou
Copy link
Collaborator Author

Given the text of WCAG 2.2, I don't think we actually have to do anything, but as a matter of hygiene, aligning more closely with the spec, all that needs to be done is to swap 0.03928 with 0.04045, which I've done in #1837.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants