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

Unable to parse RGBA no comma alpha value in percentage. #257

Open
deadlyjack opened this issue Jul 8, 2023 · 4 comments
Open

Unable to parse RGBA no comma alpha value in percentage. #257

deadlyjack opened this issue Jul 8, 2023 · 4 comments

Comments

@deadlyjack
Copy link

Unable to parse rgba(0 0 0 26%) color where it is a valid color and should be parsed. When passed the same color value including it comma or alpha value as ratio it is parsed correctly.

@Qix-
Copy link
Owner

Qix- commented Jul 8, 2023

Are you sure this is a valid part of the spec?

@deadlyjack
Copy link
Author

Yes I'm sure.

Here is specification of rgb(a) color on MDN

<rgb()> = 
  rgb( [ <percentage> | none ]{3} [ / [ <alpha-value> | none ] ]? )  |
  rgb( [ <number> | none ]{3} [ / [ <alpha-value> | none ] ]? )  

<alpha-value> = 
  <number>      |
  <percentage>  

@Qix-
Copy link
Owner

Qix- commented Jul 9, 2023

Ah it's a new syntax change, fun. PR is welcome, both syntaxes need to be supported.

@deadlyjack
Copy link
Author

Sure. Thanks for replying 🙂

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

No branches or pull requests

2 participants