Skip to content

Commit 2452507

Browse files
Merge pull request #5242 from qburst/fix/scss-lint-issues
🚨 Fix SCSS Lint issues - Change @import to @use
2 parents e479fc3 + 7196d4b commit 2452507

File tree

7 files changed

+25
-18
lines changed

7 files changed

+25
-18
lines changed

.stylelintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
"rules": {
77
"at-rule-no-unknown": null,
8+
"at-rule-disallowed-list": ["import"],
89
"scss/at-rule-no-unknown": true,
910
"scss/dollar-variable-pattern": null,
1011
"scss/at-import-partial-extension": null,

docs-site/src/components/Examples/examples.scss

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
@use "helpers";
2+
13
.examples__navigation {
24
display: none;
35

4-
@include breakpoint(640px) {
6+
@include helpers.breakpoint(640px) {
57
width: 200px;
68
float: left;
79
display: block;
@@ -76,7 +78,7 @@
7678
overflow-x: auto;
7779
overflow-y: hidden;
7880

79-
@include breakpoint(768px) {
81+
@include helpers.breakpoint(768px) {
8082
width: 70%;
8183
border-top-right-radius: 4px;
8284
border-bottom-right-radius: 4px;
@@ -98,7 +100,7 @@
98100
}
99101
&__preview {
100102
padding: 20px;
101-
@include breakpoint(768px) {
103+
@include helpers.breakpoint(768px) {
102104
width: 30%;
103105
}
104106
@media (max-width: 768px) {

docs-site/src/components/Examples/breakpoint.scss renamed to docs-site/src/components/Examples/helpers.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@
33
@content;
44
}
55
}
6+
7+
%container-styling {
8+
max-width: 1100px;
9+
margin: 0 auto;
10+
}

docs-site/src/components/Examples/hero.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use "helpers" as *;
2+
13
.hero {
24
color: #fff;
35
background-color: #216ba5;

docs-site/src/components/Examples/style.scss

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
1-
@import "reset";
2-
@import "higlight";
3-
@import "breakpoint";
4-
@import "hero";
5-
@import "examples";
6-
7-
%container-styling {
8-
max-width: 1100px;
9-
margin: 0 auto;
10-
}
1+
@use "reset";
2+
@use "higlight";
3+
@use "helpers";
4+
@use "examples";
5+
@use "hero";
116

127
html,
138
body {
@@ -88,7 +83,7 @@ strong {
8883
}
8984

9085
.row {
91-
@include breakpoint(768px) {
86+
@include helpers.breakpoint(768px) {
9287
display: flex;
9388
}
9489
}

src/stylesheets/datepicker.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@use "sass:color";
2-
@import "variables.scss";
3-
@import "mixins.scss";
2+
@use "variables" as *;
3+
@use "mixins" as *;
44

55
.react-datepicker-wrapper {
66
display: inline-block;

src/stylesheets/mixins.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
@use "variables";
2+
13
%navigation-chevron {
2-
border-color: $datepicker__muted-color;
4+
border-color: variables.$datepicker__muted-color;
35
border-style: solid;
46
border-width: 3px 3px 0 0;
57
content: "";
@@ -11,7 +13,7 @@
1113

1214
&--disabled,
1315
&--disabled:hover {
14-
border-color: $datepicker__navigation-disabled-color;
16+
border-color: variables.$datepicker__navigation-disabled-color;
1517
cursor: default;
1618
}
1719
}

0 commit comments

Comments
 (0)