-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Missing CSS viewport units in build #15841
Comments
Seems to be working for me in a super simple Astro project I spun up. Could you provide a project that reproduces the unexpected behavior please? It would be super helpful for us to debug. |
I am toggling styles via the script tag in a astro component. While using The css class const mobileMenuButton = document.querySelector(
"[data-mobile-menu-button]",
);
const mobileMenuButtonIcon = document.querySelector(
"[data-mobile-menu-button-icon]",
);
const defaultStyles = "hidden h-full w-full flex-1 shrink-0 flex-col divide-y overflow-y-auto ring-0 lg:flex lg:w-max lg:flex-row lg:items-center lg:divide-y-0 lg:overflow-visible lg:pb-0";
// Toggling styles with h-dvh
const isOpen = "absolute left-0 top-0 mt-16 flex h-dvh border-t bg-white px-4 shadow-lg w-full flex-1 shrink-0 flex-col divide-y overflow-y-auto ring-0 lg:flex lg:w-max lg:flex-row lg:items-center lg:divide-y-0 lg:overflow-visible lg:pb-0";
mobileMenuButton?.addEventListener("click", () => {
const navigationList = document.querySelector("[data-navigation-list]");
mobileMenuButtonIcon?.classList.toggle("ph-list");
mobileMenuButtonIcon?.classList.toggle("ph-x");
if (navigationList) {
navigationList.className = navigationList.className === isOpen ? defaultStyles : isOpen;
return;
}
}); |
Could you provide a project that has that code that reproduces the unexpected behavior please? |
|
В моём случае проблема была из-за --spacing-4.5: 18px;
--spacing-5.5: 22px; |
If you use a backslash, then everything works. --spacing-4\.5: 18px;
--spacing-5\.5: 22px; |
Please take a look at https://github.com/danielluca/missing-dvh |
If you use post css, the class is generated, so you can create a bug fix task in the vite plugin. |
It seems like none of the unique class names in the |
I wonder if this is at all related to #15794 where classes from components are somehow being missed? |
What version of Tailwind CSS are you using?
For example: v4.0.0
What build tool (or framework if it abstracts the build tool) are you using?
For example: astro 5.1.9, tailwindcss/vite 4.0.0
What version of Node.js are you using?
For example: v18.19.0
What browser are you using?
For example: Chrome, Safari, Firefox
What operating system are you using?
For example: macOS, iOS
Describe your issue
Utilities with viewport units like h-dvh or h-[90dvh] are missing in the build. Using them in development is no problem.
The text was updated successfully, but these errors were encountered: