validator icon indicating copy to clipboard operation
validator copied to clipboard

Validator on max() and min()

Open AdornChoga opened this issue 3 years ago • 5 comments

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

AdornChoga avatar Feb 08 '22 18:02 AdornChoga

Any updates on this?

linusjf avatar Feb 15 '24 15:02 linusjf

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
  }
}

linusjf avatar Feb 16 '24 08:02 linusjf