Problem/Motivation
Follow-up to #2865971: Use stylelint as opposed to csslint in core. Configure the color-hex-case to be consistent with https://www.drupal.org/docs/develop/standards/css/css-coding-standards
From the CSS Formatting Guidelines:
When hex values are used for colors, use lowercase. Colors may be expressed with any valid CSS value, such as hex value, color keyword, rgb() or rgba(). Note that IE8 does not support all color syntaxes and will require a fallback value.
Proposed resolution
Brief instructions on running stylelint - you'll need npm...
All the commands below take place in DRUPAL_ROOT/core
To install stylelint
npm install
This will install Drupal 8's npm dependencies of which stylelint is one.
To run it on all core css files. Apply this issue's patch and do the following command from DRUPAL_ROOT/core
npm run lint:css
Remaining tasks
User interface changes
None
API changes
None
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 2939940-3.patch | 15.89 KB | bmx269 |
Comments
Comment #2
joelpittetComment #3
bmx269 commentedPatch for testing.
Comment #4
joelpittetUsed
git diff --color-wordsto see the changes were only the hex case changes for this one.Then ran the linter with and without the CSS changes to make sure we caught all the cases.
Thanks @bmx269 and @alexpott!
Comment #5
alexpottUpdate commit credit.
Comment #6
alexpottCommitted 66f7227 and pushed to 8.6.x. Thanks!
Cherrypicked back to 8.5.x by ignoring the umami theme. Committed bb9c5a2 and pushed to 8.5.x. Thanks!