Skip to content

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

Merged
nex3 merged 3 commits intofeature.color-4from
strict-slash
May 10, 2024
Merged

[Color 4] Be stricter about slash-separated strings#3862
nex3 merged 3 commits intofeature.color-4from
strict-slash

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

* 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/).

Co-authored-by: Carlos (Goodwine) <2022649+Goodwine@users.noreply.github.com>
@nex3 nex3 merged commit e778899 into feature.color-4 May 10, 2024
@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.

2 participants