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

No validation when rgb/rgba/hsl colors are used #325

Closed
acherkashin opened this issue Nov 2, 2023 · 3 comments
Closed

No validation when rgb/rgba/hsl colors are used #325

acherkashin opened this issue Nov 2, 2023 · 3 comments

Comments

@acherkashin
Copy link

I use the following stylelint configuration

module.exports = {
  plugins: ['stylelint-declaration-strict-value'],
  files: ['**/*.css'],
  rules: {
    'scale-unlimited/declaration-strict-value': [
      ['color', 'background-color', 'font-size', 'font-weight', 'font-family', 'border-color'],
      {
        ignoreValues: ['currentColor', 'unset', 'inherit', 'initial', 'transparent'],
      },
    ],
  },
};

Everything works fine, for hex colors, font-weight, font-size and so on.

But when I use rgb/rgba/hsl functions to set up color, I don't see any validations.

image
@AndyOGo
Copy link
Owner

AndyOGo commented Nov 6, 2023

@acherkashin
Please try to configure ignoreFunctions

@acherkashin
Copy link
Author

@AndyOGo

I set up ignoreFunctions to false and now it works.

image image

But when I use variable inside drop-shadow function, I still have validation.

image

I understand, it happens because we need to use variable for whole value of filter property, but is there way to now show this validation when at least part of the value contain variable like in my case?

@AndyOGo
Copy link
Owner

AndyOGo commented Nov 7, 2023

@acherkashin
Variables as function parameters are not supported.

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

No branches or pull requests

2 participants