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

[Color 4] Be stricter about slash-separated strings #3862

Merged
merged 3 commits into from
May 10, 2024
Merged

Conversation

nex3
Copy link
Contributor

@nex3 nex3 commented May 10, 2024

No description provided.

@nex3 nex3 requested a review from Goodwine May 10, 2024 00:19
accepted/color-4-new-spaces.md Outdated Show resolved Hide resolved
@@ -1141,26 +1141,17 @@ The procedure is:
* Let `split-last` be the result calling `string.split()` with the last
element of `input` as the string to split, and `/` as the separator.

* If `split-last` has two items, and one or both items are an unquoted
string that's case-insensitively equal to 'none':
* If `split-last` doesn't have exactly two items, throw an error.
Copy link
Member

@Goodwine Goodwine May 10, 2024

Choose a reason for hiding this comment

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

Is this meant to deal with the following case?

rgba(1 2 calc(var(--x)/var(--x))/var(--x))

IIUC by this point components == [1, 2] and split-last == [calc(var(--x), var(--x)), var(--x)] which would fail, however I think it should technically be permitted 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, that's an interesting point. I think you're right that allowing that is more important than disallowing rgb(1 2 3 a/b/c/).

accepted/color-4-new-spaces.md Outdated Show resolved Hide resolved
Co-authored-by: Carlos (Goodwine) <2022649+Goodwine@users.noreply.github.com>
@nex3 nex3 merged commit e778899 into feature.color-4 May 10, 2024
9 checks passed
@nex3 nex3 deleted the strict-slash branch May 10, 2024 21:27
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

2 participants