Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add support for space-separated RGB#58

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Qix- merged 5 commits intoQix-:masterfromJJC1138:rgb-space-notation
Nov 26, 2021

Conversation

@JJC1138
Copy link
Contributor

This is almost exactly the same as@htunnicliff's excellent PR#55, but just for the RGB case instead of HSL. It adds support for values like:

rgb(255 255 255)rgb(255 255 255 / 1)

The motivation for this was that Chrome's developer tools now uses that form of notation for RGB colors, and I got bitten by blindly copying and pasting one into my CSS 😅

@clytras
Copy link
Contributor

clytras commentedNov 25, 2021
edited
Loading

Thank you@JJC1138 for the awesome work!

Does the RE support alpha percentage likergb(0 255 38 / 7%)?

@Qix- please merge and release, we need this!

@JJC1138
Copy link
ContributorAuthor

Does the RE support alpha percentage likergb(0 255 38 / 7%)?

No, I'm afraid not. I thought that was disallowed bythe spec, but I see was wrong 😣 Sorry about that. I'm not using the library in my project anymore so I don't have an immediate need to work on that myself. You're very welcome to fork my branch to add support, of course.

@clytras
Copy link
Contributor

@JJC1138 I just fix it to work with alpha percentage and added more tests. Everything passes and it works.

Please check this PRJJC1138#1 and merge.

@JJC1138
Copy link
ContributorAuthor

Done. Thanks very much!

@Qix-Qix-force-pushed thergb-space-notation branch 2 times, most recently fromccbea79 toa6c9763CompareNovember 26, 2021 07:26
@Qix-Qix- merged commitf5fe5a8 intoQix-:masterNov 26, 2021
@Qix-
Copy link
Owner

Thanks :)

@Qix-
Copy link
Owner

Published as1.7.0.

@clytras
Copy link
Contributor

You're very welcome@Qix- , thank you for making this!

Now that I'm looking at it again, I think I should have usedparseFloat for the percentage instead ofparseInt. The spec says that it's a number, not an integer, thus it may have floating point numbers. What do you think?

@Qix-
Copy link
Owner

PR welcome. :)

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@JJC1138@clytras@Qix-

[8]ページ先頭

©2009-2025 Movatter.jp