highlightjs / highlightjs/highlight.js
Improve checkTheme script
- Dominant language
- JavaScript
- Stars
- 25k
- Forks
- 3.8k
- Avg merge
- 11h 35m
- Merged PRs (30d)
- 3
Description
See also: https://github.com/highlightjs/highlight.js/pull/3402#discussion_r765491600
> We have some themes that use rgba(), will .hex() work on those values?
---
Two notes on this one:
1. Some styles use `background-color` to differentiate the background for specific elements. I think we should add support for checking `background-color` for WCAG contrast.
https://github.com/highlightjs/highlight.js/blob/0bf3adeecd5ba76cef8ee843e38722089b232da1/src/styles/foundation.css#L74-L77
2. Should we have a minimum Node defined somewhere for dev environments? Optional chaining was added in Node 14 and our `package.json` requires Node 12+ (correctly so, for our users).
_Originally posted by @allejo in https://github.com/highlightjs/highlight.js/pull/3402#discussion_r765487222_
Contributor guide
Assessment
This issue has not been assessed yet.