Pretty simple question. Just need to know if you can use clamp() inside of scale()? Like this:
.element {
scale(clamp(100px, 10%, 300px));
}
This does not work. How can i do this?
Pretty simple question. Just need to know if you can use clamp() inside of scale()? Like this:
.element {
scale(clamp(100px, 10%, 300px));
}
This does not work. How can i do this?
Copyright © 2021 Jogjafile Inc.
This
is invalid in 2 ways. First of all there is no
scale()
what you mean istransform: scale()
. Second:scale()
works with number/float only (e.g. 0.5, 1, 2). So no,clamp()
is not possible.Edit:
What you could do is to use a css variable and media queries:
Edit:
Well you could actually make the
scale()
responsive by manipulating a css variable e.g.--scale
via js and using the computed font-size forclamp()
.