Skip to content

Commit 23bfcc6

Browse files
committed
Allow custom properties outside :root
This PR disables `custom-property-no-outside-root` which is being set by `stylelint-config-suitcss`, because we want to support using custom properties outside root and we no longer support IE11. Fixes #318
1 parent 7972d10 commit 23bfcc6

File tree

5 files changed

+6
-3
lines changed

5 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
- Updated `stylelint-config-standard-scss` to v13
55
- Updated `stylelint` peer dependency to v16
66
- Disabled `declaration-block-no-redundant-longhand-properties` (#407)
7+
- Disabled `suitcss/custom-property-no-outside-root` (#318)
78

89
# 9.0.0 - 2023-09-19
910

__tests__/order/invalid.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ a {
22
text-decoration: none;
33
color: red;
44
$scss-variable: red;
5-
// stylelint-disable-next-line suitcss/custom-property-no-outside-root
65
--custom-property: red;
76
@include block {
87
color: red;

__tests__/order/order.test.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ describe('stylelint-order', () => {
6060
});
6161

6262
it('flags warnings', () => {
63-
assert.equal(result.results[0].warnings.length, 4);
63+
assert.equal(result.results[0].warnings.length, 5);
6464
});
6565

6666
it('correct warning text', () => {
@@ -71,6 +71,7 @@ describe('stylelint-order', () => {
7171
'Expected blockless @include to come before rule (order/order)',
7272
'Expected an empty line before $-variable (scss/dollar-variable-empty-line-before)',
7373
'Expected color to come before text-decoration (order/properties-alphabetical-order)',
74+
'Expected empty line before custom property (custom-property-empty-line-before)',
7475
],
7576
);
7677
});
@@ -83,6 +84,7 @@ describe('stylelint-order', () => {
8384
'order/order',
8485
'scss/dollar-variable-empty-line-before',
8586
'order/properties-alphabetical-order',
87+
'custom-property-empty-line-before',
8688
],
8789
);
8890
});

__tests__/order/valid.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
a {
22
$scss-variable: red;
33

4-
// stylelint-disable-next-line suitcss/custom-property-no-outside-root
54
--custom-property: red;
65

76
@include mixin;

index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ module.exports = {
1717
'scss/at-mixin-pattern': null,
1818
'scss/dollar-variable-pattern': null,
1919
'scss/percent-placeholder-pattern': null,
20+
// these are being set in stylelint-suitcss, but we don't want them
21+
'suitcss/custom-property-no-outside-root': null, // #318
2022
// our rules from here on
2123
'at-rule-disallowed-list': [
2224
['extend', 'import'],

0 commit comments

Comments
 (0)