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

Validator on max() and min() #27

Open
AdornChoga opened this issue Feb 8, 2022 · 2 comments
Open

Validator on max() and min() #27

AdornChoga opened this issue Feb 8, 2022 · 2 comments

Comments

@AdornChoga
Copy link

CSStree-validator flags errors on usage of max() and min() on font-sizes and widths. Could you please explain why?

@linusjf
Copy link

linusjf commented Feb 15, 2024

Any updates on this?

@linusjf
Copy link

linusjf commented Feb 16, 2024

Workaround:

.stylelintrc.json

{
  "extends": "stylelint-config-standard-scss",
  "plugins": [
    "stylelint-csstree-validator"
  ],
  "rules": {
    "csstree/validator": {
      "properties": {
        "font-size": "| min(<length-percentage>, <length-percentage>) | max(<length-percentage>, <length-percentage>)",
        "width": "| min(<length-percentage>, <length-percentage>) | max(<length-percentage>, <length-percentage>)"
      }
    },
    "media-feature-range-notation": "prefix",
    "selector-class-pattern": null
  }
}

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

No branches or pull requests

2 participants