Skip to content
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

Add css functions to data types #6258

merged 4 commits into from Dec 3, 2021


Copy link

@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
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

1 participant