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

False negatives for length-zero-no-unit #5558

Closed
ncroll opened this issue Sep 22, 2021 · 1 comment
Closed

False negatives for length-zero-no-unit #5558

ncroll opened this issue Sep 22, 2021 · 1 comment

Comments

@ncroll
Copy link

ncroll commented Sep 22, 2021

Clearly describe the bug

The length-zero-no-unit lint gives false negatives in a couple of scenarios related to flexbox.

Which rule, if any, is the bug related to?

length-zero-no-unit

What code is needed to reproduce the bug?

This fails even though the units are needed to disambiguate that we're using the shorthand for flex-basis:

.foo {
  flex: 0px; 
}

This fails even though units are required on flex-basis for IE 11 support:

.bar {
  flex: 1 1 0px;
}

What stylelint configuration is needed to reproduce the bug?

e.g.

{
  "rules": {
    "length-zero-no-unit": true
  }
}

Which version of stylelint are you using?

e.g. 13.11.0

How are you running stylelint: CLI, PostCSS plugin, Node.js API?

Node.js API

Does the bug relate to non-standard syntax (e.g. SCSS, Less etc.)?

No

What did you expect to happen?

No warnings to be flagged.

What actually happened (e.g. what warnings or errors did you get)?

e.g. "The following warnings were flagged:"

test.scss
test.scss: line 7, col 14 - Unexpected unit (length-zero-no-unit)
@ybiquitous
Copy link
Member

@ncroll Thanks for reporting the issue. This has been resolved via #5315. Can you try the v14 branch, please?

@jeddy3 jeddy3 closed this as completed Sep 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants