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

[css-color] Should it be possible for UAs to limit the number of colors in contrast-color() #7559

Closed
SebastianZ opened this issue Aug 2, 2022 · 4 comments

Comments

@SebastianZ
Copy link
Contributor

Should there be a note in the spec. that user agents may limit the number of colors allowed in contrast-color() for performance reasons? And if so, should it define in which stage of evaluation (parsing, computed value or used value) those restrictions should be applied?

Related to this, are there already notes for other value lists like list-valued properties or gradient lists? And do user agents currently limit the number of values in such lists?

Sebastian

@LeaVerou
Copy link
Member

Has there been such an ask from implementors so far? If not, there's no reason to preemptively introduce this restriction.

@svgeesus
Copy link
Contributor

Are there similar limits on, for example, the number of backgrounds you can specify?

@tabatkins
Copy link
Member

There is not, no. We have minimum required limits that apply generically, but no specified maximums aside from a very small set of exceptions (the size of a grid, for example, has an allowed maximum).

@SebastianZ
Copy link
Contributor Author

We have minimum required limits that apply generically

That pointed me into the right direction. So thanks!
With only 20 repetitions required, it is actually already possible for UAs to (strictly) limit the number of colors.
And it also answers my question regarding other list-valued properties.

Sebastian

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

4 participants