wagtail / stylelint-config-wagtail

Shareable stylelint config for CSS and SCSS, following Wagtail’s code style.
https://www.npmjs.com/package/@wagtail/stylelint-config-wagtail
MIT License
11 stars 4 forks source link

Linting rule to prevent forced-color-adjust usage #32

Closed thibaudcolas closed 1 year ago

thibaudcolas commented 2 years ago

Follow-up to the Contrast Themes GSoC project. There are a number of cases where we started using forced-color-adjust in Wagtail’s stylesheets.

In all but one of those cases, the property is used incorrectly, leading to issues for end users in high-contrast mode. I believe we should disallow all usage of forced-color-adjust, as there are very few cases where it’s the correct approach (the only one being if the exact color being used is so important that it should always be used, at the expense of the legibility / contrast of the content).