question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Document behaviour better for *-no-vendor-prefix

See original GitHub issue

Clearly describe the bug

Autofix creates false output in CSS-file

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

property-no-vendor-prefix

What code is needed to reproduce the bug?

.input,
.select {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition: height 0.1s ease;
  -moz-transition: height 0.1s ease;
  -o-transition: height 0.1s ease;
  transition: height 0.1s ease;
}

What Stylelint configuration is needed to reproduce the bug?

e.g.

{
  "rules": {
    "property-no-vendor-prefix": "true"
  }
}

Which version of Stylelint are you using?

e.g. 14.0.1

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

“CLI with npx stylelint "src/**/*.{css,sass,scss}" --fix

What did you expect to happen?

e.g. “No warnings to be flagged.”

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

.input,
.select {
	box-sizing: border-box;
	box-sizing: border-box;
	box-sizing: border-box;
	transition: height 0.1s ease;
	transition: height 0.1s ease;
	transition: height 0.1s ease;
	transition: height 0.1s ease;
}
151:2  ✖  Unexpected vendor-prefix "-webkit-box-sizing"  property-no-vendor-prefix
152:2  ✖  Unexpected vendor-prefix "-moz-box-sizing"     property-no-vendor-prefix
154:2  ✖  Unexpected vendor-prefix "-webkit-transition"  property-no-vendor-prefix
155:2  ✖  Unexpected vendor-prefix "-moz-transition"     property-no-vendor-prefix
156:2  ✖  Unexpected vendor-prefix "-o-transition"       property-no-vendor-prefix

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jeddy3commented, Oct 28, 2021

Let’s add the following to each of the *-no-vendor-prefix rule READMEs but change “properties” to the appropriate construct for the rule:

“The fix option can automatically fix all of the problems reported by this rule. However, it will not remove duplicate properties produced when the prefixes are removed. You can use Autoprefixer itself, with the add option off and the remove option on, in these situations.”

1reaction
alexander-akaitcommented, Oct 28, 2021

I think yes 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

value-no-vendor-prefix - Stylelint
Disallow vendor prefixes for values. This rule ignores non-standard vendor-prefixed values that aren't handled by Autoprefixer. The fix option can ...
Read more >
Vendor prefixes are not developer-friendly - Paul Irish
Any successful evangelization plan for prefixes relies on tools, but all tools prioritize the unprefixed state. prefix-free, compass, and css3 ...
Read more >
Why people use CSS vendor-prefix although the specs clearly ...
So as far as I found out, vendor-prefixes are for addressing different behaviors across browsers for experimental features, And there is no ...
Read more >
Backwards compatibility of flexbox - CSS - MDN Web Docs
At the time the method of creating experimental implementations was to use a vendor prefix. The idea of these prefixes was to allow ......
Read more >
What CSS prefixes should I use?
This page has one purpose: simply show what prefixes are needed for a newer CSS property. Need more information? Check the awesome Can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found