Skip to content

Commit

Permalink
Fix: Allow px units in line-height values for the `declaration-pr…
Browse files Browse the repository at this point in the history
…operty-unit-whitelist` rule. (#140)
  • Loading branch information
ntwb committed May 31, 2020
1 parent 5d0ad4d commit 3674231
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/stylelint-config-wordpress/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# HEAD

- Added: `declaration-property-unit-whitelist` rule to enforce unitless `line-height` values.
- Added: `declaration-property-unit-whitelist` rule to allow `px` and exclude `%` and `em` units in `line-height` values.
- Changed: Relocated repo to https://github.com/WordPress-Coding-Standards.
- Fixed: Include CSS config `at-rule-empty-line-before` rules in SCSS config.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
background-image: url(images/bg.png);
font-family: "Helvetica Neue", sans-serif;
font-weight: 700;
line-height: 14px;
}

.class { /* Correct usage of zero values */
Expand Down
2 changes: 1 addition & 1 deletion packages/stylelint-config-wordpress/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports = {
"declaration-colon-space-after": "always-single-line",
"declaration-colon-space-before": "never",
"declaration-property-unit-whitelist": {
"line-height": [],
"line-height": ["px"],
},
"font-family-name-quotes": "always-where-recommended",
"font-weight-notation": [ "numeric", {
Expand Down

0 comments on commit 3674231

Please sign in to comment.