Join the Webstudio community

Updated 11 months ago

support for min()

At a glance
The min() CSS function lets you set the smallest (most negative) value from a list of comma-separated expressions as the value of a CSS property value. The min() function can be used anywhere a <length>, <frequency>, <angle>, <time>, <percentage>, <number>, or <integer> is allowed.

Example use case:
Plain Text
width: min(1200px, 100% - 4rem);
O
D
7 comments
yes, we want all css functions to be supported, but generally they won't fit into style panel inputs, so they will go into either css editor or via variables
it also makes sense to be an expression, because those values shouldn't be hardcoded, you will want to use variables for them
you will probably want something like min(breakpoint1, 100% - spacing1)
yes exactly what I'm loooking for
having a set of css vars and then including those within min() would help me tremendously
Will get there in the next couple of month
Add a reply
Sign up and join the conversation on Discord