Skip to content

[css-values] should clamp get simplified to min or max when possible? #4757

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
emilio opened this issue Feb 7, 2020 · 3 comments
Closed
Labels
css-values-4 Current Work

Comments

@emilio
Copy link
Collaborator

emilio commented Feb 7, 2020

That is, should clamp(10em, 11em, 1000px) be simplified to min(11em, 1000px) or such?

@emilio emilio added the css-values-4 Current Work label Feb 7, 2020
@Loirooriol
Copy link
Contributor

This seems worse than #4756. I think that magically changing the function would be confusing.
Would you special case clamp, or also max(10em, min(11em, 1000px))?

@emilio
Copy link
Collaborator Author

emilio commented Feb 7, 2020

Probably not, fair enough. Clamp seemed like an easy one because you know it has three arguments, unlike min / max which can have arbitrarily many.

Anyhow I'm just filing issues as I write code for stuff that I have decided not to do, btw. ;)

This simplification doesn't seem too complicated, but agreed it could be somewhat confusing.

@tabatkins
Copy link
Member

I would strongly prefer not to do this. ^_^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-values-4 Current Work
Projects
None yet
Development

No branches or pull requests

3 participants