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

Fix false positives for hashes in URLs in color-no-invalid-hex #4034

Closed
ai opened this issue Apr 15, 2019 · 1 comment · Fixed by #4035
Closed

Fix false positives for hashes in URLs in color-no-invalid-hex #4034

ai opened this issue Apr 15, 2019 · 1 comment · Fixed by #4035
Labels
status: wip is being worked on by someone type: bug a problem with a feature or rule

Comments

@ai
Copy link
Member

ai commented Apr 15, 2019

Clearly describe the bug

fill=url(#a)is parsing wrong by color-no-invalid-hex

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

color-no-invalid-hex

What CSS is needed to reproduce the bug?

.invoice_logo {
  background-image: svg-load('../../icons/logo-color.svg', fill=url(#a));
}

What stylelint configuration is needed to reproduce the bug?

e.g.

{
  "extends": [
    "stylelint-config-standard",
    "stylelint-config-styled-components"
  ],
  "rules": {
    "declaration-block-trailing-semicolon": null,
    "selector-list-comma-newline-after": null,
    "declaration-empty-line-before": null,
    "at-rule-empty-line-before": null,
    "no-descending-specificity": null,
    "no-duplicate-selectors": null,
    "rule-empty-line-before": null,
    "at-rule-no-unknown": [
      true,
      {
        "ignoreAtRules": [
          "util"
        ]
      }
    ]
  }
}

Which version of stylelint are you using?

10.0.0

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

stylelint blocks/**/*.sss globals/**/*.css controllers/*.js components/*.js pages/**/*.js pages/*.js popups/**/*.js popups/*.js layout/*.js uibook/*.js

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

Standard CSS with postcss-inline-svg.

What did you expect to happen?

No warnings to be flagged.

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

globals/invoice/invoice.css
 19:69  ✖  Unexpected invalid hex color "#a"   color-no-invalid-hex
@jeddy3 jeddy3 changed the title False negative color-no-invalid-hex Fix false positives for hashes in URLs in color-no-invalid-hex Apr 15, 2019
@jeddy3 jeddy3 added status: wip is being worked on by someone type: bug a problem with a feature or rule labels Apr 15, 2019
@jeddy3
Copy link
Member

jeddy3 commented Apr 15, 2019

@ai Thanks for the report and for using the template.

I can reproduce this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: wip is being worked on by someone type: bug a problem with a feature or rule
Development

Successfully merging a pull request may close this issue.

2 participants