Skip to content

Conversation

@RobinMalfait
Copy link
Member

@RobinMalfait RobinMalfait commented Dec 3, 2021

This PR adds min, max and clamp as css functions to data types.
This allows us to also write more "modern" arbitrary values, e.g.:

<div class="text-[min(10vh,100px)]"></div>

Which results in:

.text-\[min\(10vh\2c 100px\)\] {
  font-size: min(10vh, 100px);
}

Before this PR, this code wouldn't even be generated, if you wanted this to be generated then you had to force the length: data type for example:

<div class="text-[length:min(10vh,100px)]"></div>

@RobinMalfait RobinMalfait merged commit 078186a into master Dec 3, 2021
@RobinMalfait RobinMalfait deleted the add-length-data-type-functions branch December 3, 2021 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants