Skip to content

Allow rgb(R G B / A) notation #405

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

Closed
jhard opened this issue Nov 11, 2022 · 1 comment
Closed

Allow rgb(R G B / A) notation #405

jhard opened this issue Nov 11, 2022 · 1 comment

Comments

@jhard
Copy link

jhard commented Nov 11, 2022

it's valid to write a color value as rgb(R G B / A), see MDN.

I've tackled this with a simple approach, converting it to rgba during parsing and recognizing this notation with a regexp on a peek, see this commit: jhard@a477cb4

I'm a monkey and I'm terrible at git and github (and PHP, some will say, and they're not wrong). If this approach is up to your standards, I'd be happy to create a pull request (I might need some hand-holding and encouragement, but I've done this before). If there's a better approach than using a regexp and peek, I might be able to do that, too.

It would change the CSS: rgb(R G B / A) goes in, rgba(R, G, B, A) is rendered out, I'm not sure what your policy on that is. If you don't like the conversion to rgba, I understand.

Thanks for your time!

@JakeQZ
Copy link
Collaborator

JakeQZ commented Jan 20, 2025

Hi @jhard,

Many apologies for the extremely long delay in getting back to you on this. There are only three active maintainers of this repository, who do it in their spare time, which is often not available.

The same issue has been reported in #755 and we are working towards supporting the CSS Color Module Level 4 syntax.

I'd be happy to create a pull request (I might need some hand-holding and encouragement, but I've done this before).

We absolutely welcome PRs, and would happily hold your hand through the process. Some people get a bit peeved when we request changes during code review, though from what you've written, it doesn't seem like you would.

Feel free to see if you may be able to submit a PR related to #755. Closing as duplicate of that.

@JakeQZ JakeQZ closed this as completed Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants