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

Support modern CSS color notations #133

Merged
merged 1 commit into from
May 14, 2021
Merged

Conversation

omgovich
Copy link
Owner

@omgovich omgovich commented May 14, 2021

Library's parsers were improved to support more CSS color formats and units.

// Percentage syntax
"rgb(100% 50% 25%)"

// Valid angular units ("deg", "grad", "rad" and "turn")
"hsl(100grad, 50%, 50%)"
"hsl(0.25turn, 50%, 50%)"

// Modern space and slash separated syntax 
"rgba(100% 50% 25% / 99%)"
"hsla(90 50% 50% / 10%)"

// Optional leading zero
"rgb(.99% .1% .5% / .6%)"
"hsla(.2rad, .99%, .5%, .25)"

@omgovich omgovich force-pushed the improvement/notations branch from 67b9631 to 683da01 Compare May 14, 2021 14:45
@codecov-commenter
Copy link

codecov-commenter commented May 14, 2021

Codecov Report

Merging #133 (683da01) into master (c9b3a32) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #133   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           33        33           
  Lines          422       428    +6     
  Branches        53        57    +4     
=========================================
+ Hits           422       428    +6     
Impacted Files Coverage Δ
src/utils/convert.ts 100.00% <100.00%> (ø)

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 c9b3a32...683da01. Read the comment docs.

@github-actions
Copy link

Size Change: +126 B (+3%)

Total Size: 4.21 kB

Filename Size Change
dist/index.module.js 4.21 kB +126 B (+3%)

compressed-size-action

@omgovich omgovich merged commit dccd7e8 into master May 14, 2021
@omgovich omgovich deleted the improvement/notations branch May 14, 2021 14:48
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.

2 participants