Skip to content

cmin / cmax unit support

Compare
Choose a tag to compare
@ZeeCoder ZeeCoder released this 27 Feb 13:21
· 324 commits to master since this release

Now you can write "1cminpx", which turns to "10px" if the container's width and height are the following: 1000x2000.
Since 1000 is smaller, and 1% of that is 10.
"px" is then is attached as a suffix finally giving us "10px".

This works with any other unit too, so this is possible:
1cminem => 10em
1cmax% => 20%
etc.