-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Empty values are not parsable. #3737
Comments
This is unusual usage and I don't think it should be supported. Less is not necessarily intended to be a 100% super-set of CSS, but is more a super-set of good CSS, or basically standards-based CSS. This is a similar view from other members of the community. #3731 |
It's one thing for it to be "unusual" usage - but empty values like that aren't just a weird misuse of something like:
This is more like "for properties prefixed with Less should (imo of course) even be able to produce these values but it can't even output them. I'm not really expecting it to be a superset of CSS, just that in-spec CSS features are supported. I've run into issues with this before trying to make empty custom properties. At the time I solved it by hucking in extremely unlikely values like |
I need to Learn how to huck All social learn me how |
Hucking is very much like chucking but with the slight nuance that it is less effortful. It is a subtlety best known for its usage in the Midwest (a distinct cultural region of The United States of America). Consider an example like the above In most situations I find hucking to be perfectly adequate behavior. |
This is a valid bug. |
Hello there, This bug still exists.
Too bad we can't isolate BS5 ! |
Unrecognised input. I encounter the similar problem too, help!!! // src/output.wxss
*, ::before, ::after {
--tw-pan-x: ;
--tw-pan-y: ;
--tw-pinch-zoom: ;
--tw-scroll-snap-strictness: proximity;
}
|
Sorry for the delay, I'll take a look at this issue this weekend. |
#4294 should resolve this issue. I will support requests for revisions until the fix is merged. |
@WangZhenHao if your issue is urgent you can try https://github.com/puckowski/less.js/releases/tag/4.2.1.2 which is Less.js 4.2.1 with fixes for: |
Thanks, Love you!! |
To reproduce:
Current behavior:
Valid CSS yields a ParseError.
Empty values are a valid part of the CSS specification; it's how a custom property to an empty value.
Expected behavior:
I'd expect empty values on custom properties to be included in the output CSS file. This should only be true for custom properties (prefixed with `--``) as empty values like that are NOT valid for normal CSS properties.
Environment information:
less
version: lessc 4.1.3 (Less Compiler) [JavaScript]npx
version: 8.3.0nodejs
version: v14.18.2operating system
: Linux (PopOS)Terminal Output
Other Comments
Obligatory "Why are you doing that?" answer because not including that tends to yield tangential discussions on bug reports. The project uses some custom LESS for legacy reasons, and also includes ForkAwesome. The generated
tailwind.css
file, along with the customless
files and theforkawesome.css
file are all combined withlessc
and the minified with the clean-css plugin. This way there is only one CSS payload to pull.In any case, since values for custom properties like
--foo: ;
are valid CSS, I'd expect thelessc
parser to not implode when encountering such values.The text was updated successfully, but these errors were encountered: