Giter Site home page Giter Site logo

stylelint-no-indistinguishable-colors's People

Contributors

bryanjtc avatar carlosjeurissen avatar ierhyna avatar onlurking avatar tomkallen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

stylelint-no-indistinguishable-colors's Issues

Allow disabling the plugin

Please, allow passing false to plugin/stylelint-no-indistinguishable-colors rule to temporarily disable the plugin without removing the rule completely. This would allow for quick switching on and off during colors or during trying out new color combinations

Release new version with support to stylelint v14 and v15

In the latest version, 1.3.2, this package only lists 11, 12, 13 in peer dependencies. Can you create a release with the support for v14? I see the changes to support v14 were made 20 days ago, but they were never published in a new release.

Ignore alpha-values of colors

I have one color which is rgba(0, 0, 0, 0.25) and one which is rgba(0,0,0, 0.75).
If it's used as foreground color, and the background is white, their visual appearance is totally different, but the plugin complains:

Unexpected indistinguishable colors "rgba(0, 0, 0, 0.25)" and "rgba(0, 0, 0, 0.75)".

The problem is, that the colorguard library you are using, does not considers alpha values.
(from their documentation):

Currently, alpha transparency is just stripped from the colors. So rgb(0, 0, 0) exactly matches rgba(0,0,0,0.5).

If they are stripped of, they should be ignored at all, and not being shown as different.

Variables are not respected

I have this variable:

$shadow-box: 2px 2px 5px 1px $color-transparent-black;

That's what I receive as a warning:

client/scss/_variables.scss
 55:1  ✖  Unexpected indistinguishable   plugin/stylelint-no-indistinguishable-colors
          colors "black" and "rgb(0, 0,                                              
          0)".

Plugin Errors on color keywords in font family names like "Arial Black"

Since version 2.0.0, the following code:
font-family: Helvetica, "Arial Black", sans-serif;

Will cause Circular reference error with the following stacktrace:

at <input css RJ9aru>:72:5
at x (/[email protected]/node_modules/colorguard-processor/dist/index.js:36:3395)
at h (/[email protected]/node_modules/colorguard-processor/dist/index.js:36:2744)
at u (/[email protected]/node_modules/colorguard-processor/dist/index.js:37:222)
at /[email protected]/node_modules/colorguard-processor/dist/index.js:37:842
at Array.forEach (<anonymous>)
at /[email protected]/node_modules/colorguard-processor/dist/index.js:37:772
at Array.forEach (<anonymous>)
at /[email protected]/node_modules/colorguard-processor/dist/index.js:37:634
at /[email protected]/node_modules/postcss/lib/container.js:345:18
at /[email protected]/node_modules/postcss/lib/container.js:297:18

Seems somehow it recognises color names in font family names and result into errors.

This error was not present in v1.3.2.

npm-warning for "stylelint" peer dependency

Right now, npm throws a warning:

[email protected] requires a peer of stylelint@^11.1.1 but none is installed. You must install peer dependencies yourself.

Currently, stylelint 13.0.0 is the latest version.

I'm using:

"stylelint": "13.0.0",
"stylelint-no-indistinguishable-colors": "1.3.0",

Add option to ignore box-shadows

Somewhat similar to #4, this plugin (which is great btw) is throwing a warning for the following code:

box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12);

While I do want this warning when using those colors normally, in the case of custom shadows I think it's fairly common to have various shades that are quite similar.

It would be great to have an option to ignore box-shadows. (I could always move this code to a variable if #4 is solved first)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.