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

Compiling LESS with dvh adds an space to CSS causing invalid property value #415

Open
nullending opened this issue Jan 28, 2025 · 1 comment

Comments

@nullending
Copy link

nullending commented Jan 28, 2025

Describe the bug
When using the dvh property in LESS, after compiling to CSS it inserts a space between the number and the unit causing invalid CSS.

To Reproduce
With the follow LESS:

.test-class {
    max-height: 70dvh;
    overflow-y: hidden;
}

Compiles to this CSS which is invalid:

.test-class {
  max-height: 70 dvh;
  overflow-y: hidden;
}

Web browsers do not like the space between '70' and 'dvh'.

A workaround is to use an escape value such as:

.test-class {
    max-height: ~"70dvh";
    overflow-y: hidden;
}
@trullock
Copy link
Owner

this should be a straightforward fix, i bet dvh isnt a recognised unit

PRs welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants