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

feat(preset-wind): add svh, lvh and dvh values to default theme #3469

Merged
merged 4 commits into from
Jan 2, 2024

Conversation

navorite
Copy link
Contributor

@navorite navorite commented Dec 28, 2023

this adds svh, lvh and dvh as default values to height, min-height, max-height rules to improve compatibility with TailwindCSS v3.4.0

Tailwind Ref: https://tailwindcss.com/blog/tailwindcss-v3-4#dynamic-viewport-units

@navorite navorite requested a review from antfu as a code owner December 28, 2023 16:40
Copy link

netlify bot commented Dec 28, 2023

Deploy Preview for unocss ready!

Name Link
🔨 Latest commit b2445fb
🔍 Latest deploy log https://app.netlify.com/sites/unocss/deploys/659372ae04216f0008e3c4a8
😎 Deploy Preview https://deploy-preview-3469--unocss.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@navorite navorite changed the title feat: add svh, lvh and dvh values to default theme feat(preset-mini): add svh, lvh and dvh values to default theme Dec 28, 2023
@chu121su12
Copy link
Collaborator

vh units are already supported. Maybe we can adjust its usage in the size rules?

@navorite
Copy link
Contributor Author

navorite commented Dec 29, 2023

vh units are already supported. Maybe we can adjust its usage in the size rules?

This adds the default rules of dynamic viewport height, not the values (which as you mentioned already exist), meaning min-height-dvh will generate min-height: 100dvh, which was just added in Tailwindv3.4.0. Note that this does not add size-min-height-dvh support intentionally. It is just for Tailwind compatibility, nothing more.

Support for values like min-h-100dvh already exists in sizes, so there is no reason to add these rules in sizes (unless we want to support size-min-height-dvh rules, but then, why not just use min-height-dvh).

@chu121su12
Copy link
Collaborator

Then I think it is better to add this to the preset-wind instead

@navorite navorite changed the title feat(preset-mini): add svh, lvh and dvh values to default theme feat(preset-wind): add svh, lvh and dvh values to default theme Dec 29, 2023
@navorite
Copy link
Contributor Author

Then I think it is better to add this to the preset-wind instead

Done. I think that makes more sense.

@antfu antfu added the tailwind-misaglin Misalignment with Tailwind label Jan 2, 2024
@antfu antfu enabled auto-merge January 2, 2024 02:11
@antfu antfu added this pull request to the merge queue Jan 2, 2024
Merged via the queue into unocss:main with commit 7ec12cc Jan 2, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tailwind-misaglin Misalignment with Tailwind
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants