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 positive for SVG fragment identifiers in color-hex-length #2806

bobbor opened this Issue Aug 11, 2017 · 1 comment


3 participants

bobbor commented Aug 11, 2017

Describe the issue. Is it a bug or a feature request (new rule, new option, etc.)?

when using svg fragment identifiers in an background url, stylelint would suggest long/short color-variations on this identifer

Which rule, if any, is this issue related to?


What CSS is needed to reproduce this issue?

b {
  background: url(my.svg#view);

What stylelint configuration is needed to reproduce this issue?

  "rules": {
    "color-hex-length": "long"

Which version of stylelint are you using?


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

CLI with stylelint *./src/**/*.pcss

Does your issue relate to non-standard syntax (e.g. SCSS, nesting, etc.)?


What did you expect to happen?

No warnings to be flagged. Fragment identifiers should be ignored

What actually happened (e.g. what warnings or errors you are getting)?

The following warnings were flagged:

Expected "#view" to be "#vviieeww"   color-hex-length

This comment has been minimized.


ntwb commented Aug 12, 2017

Fixed via 4412f83

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