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

refactor(postcss-merge-longhand): remove css-color-names dep #1230

Merged
merged 1 commit into from
Nov 13, 2021

Conversation

ludofischer
Copy link
Collaborator

css-color-names is a JSON file with a mapping from color name to hex:

  1. we don't use the hex code
  2. CSS4 color spec says color names are not recommended,
    so unlikely new color names will be added
  3. even if we need to add a color, it is easier to add it ourselves
    than to open a PR upstream
  4. css-color-names sources the color names from w3schools instead of the spec
  5. css-color-names is not future-proof because it exports a JSON file

css-color-names is a JSON file with a mapping from color name to hex:

1. we don't use the hex code
2. CSS4 color spec says color names are not recommended,
   so unlikely new color names will be added
3. even if we need to add a color, it is easier to add it ourselves
   than to open a PR upstream
4. css-color-names sources the color names from w3schools instead of the spec
5. css-color-names is not future-proof because it exports a JSON file
'white',
'whitesmoke',
'yellow',
'yellowgreen',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There are 148 colors (150 - 1 comment line - 1 export line) as expected.

@codecov-commenter
Copy link

Codecov Report

Merging #1230 (35792c4) into master (a519ff5) will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1230      +/-   ##
==========================================
- Coverage   96.54%   96.54%   -0.01%     
==========================================
  Files         116      116              
  Lines        3616     3615       -1     
  Branches     1064     1064              
==========================================
- Hits         3491     3490       -1     
  Misses        117      117              
  Partials        8        8              
Impacted Files Coverage Δ
...ages/postcss-merge-longhand/src/lib/validateWsc.js 96.77% <ø> (-0.11%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a519ff5...35792c4. Read the comment docs.

@ludofischer ludofischer merged commit 0717282 into master Nov 13, 2021
@ludofischer ludofischer deleted the remove-color-names branch November 13, 2021 15:50
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 this pull request may close these issues.

None yet

3 participants