Skip to content

Commit

Permalink
Enable shorthands in declaration-strict-value linter (#27597)
Browse files Browse the repository at this point in the history
Enable [shorthand
matching](https://github.com/AndyOGo/stylelint-declaration-strict-value#expandshorthand)
in this lint rule and match color properties by regex. Patterns like
this will now fail lint:

```css
background: #123456;
border: 1px sold rgba(0,0,0,0);
```
  • Loading branch information
silverwind authored Oct 13, 2023
1 parent 3e9a379 commit 532f166
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .stylelintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ rules:
property-no-vendor-prefix: null
rule-empty-line-before: null
rule-selector-property-disallowed-list: null
scale-unlimited/declaration-strict-value: [[color, background-color, border-color, font-weight], {ignoreValues: /^(inherit|transparent|unset|initial|currentcolor|none)$/, ignoreFunctions: false, disableFix: true}]
scale-unlimited/declaration-strict-value: [[/color$/, font-weight], {ignoreValues: /^(inherit|transparent|unset|initial|currentcolor|none)$/, ignoreFunctions: false, disableFix: true, expandShorthand: true}]
selector-attribute-name-disallowed-list: null
selector-attribute-operator-allowed-list: null
selector-attribute-operator-disallowed-list: null
Expand Down
2 changes: 1 addition & 1 deletion web_src/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -1801,7 +1801,7 @@ a.ui.basic.label:hover {

table th[data-sortt-asc]:hover,
table th[data-sortt-desc]:hover {
background: rgba(0, 0, 0, 0.1) !important;
background: var(--color-hover) !important;
cursor: pointer !important;
}

Expand Down

0 comments on commit 532f166

Please sign in to comment.