Skip to content

Commit 6fdaecc

Browse files
authored
Merge pull request #1057 from coreui/refactor-update-sass-to-1.97.0
Refactor update sass to 1.97.0
2 parents 878199f + f780852 commit 6fdaecc

28 files changed

+562
-462
lines changed

package-lock.json

Lines changed: 367 additions & 350 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,25 +112,25 @@
112112
"@rollup/plugin-node-resolve": "^16.0.3",
113113
"@rollup/plugin-replace": "^6.0.3",
114114
"@stackblitz/sdk": "^1.11.0",
115-
"autoprefixer": "^10.4.22",
115+
"autoprefixer": "^10.4.23",
116116
"bootstrap": "^5.3.8",
117117
"bundlewatch": "^0.4.1",
118118
"clean-css-cli": "^5.6.3",
119119
"clipboard": "^2.0.11",
120120
"cross-env": "^10.1.0",
121-
"eslint": "^9.39.1",
121+
"eslint": "^9.39.2",
122122
"eslint-config-xo": "0.49.0",
123123
"eslint-plugin-html": "^8.1.3",
124124
"eslint-plugin-import": "^2.32.0",
125125
"eslint-plugin-unicorn": "^62.0.0",
126-
"find-unused-sass-variables": "^6.1.0",
126+
"find-unused-sass-variables": "^6.1.1",
127127
"globals": "^16.5.0",
128128
"globby": "^16.0.0",
129129
"hammer-simulator": "0.0.1",
130130
"html-entities": "^2.6.0",
131131
"hugo-bin": "^0.149.2",
132132
"ip": "^2.0.1",
133-
"jasmine": "^5.12.0",
133+
"jasmine": "^5.13.0",
134134
"jquery": "^3.7.1",
135135
"karma": "^6.4.4",
136136
"karma-browserstack-launcher": "1.6.0",
@@ -148,12 +148,12 @@
148148
"postcss-cli": "^11.0.1",
149149
"postcss-combine-duplicated-selectors": "^10.0.3",
150150
"rimraf": "^6.1.2",
151-
"rollup": "^4.53.3",
151+
"rollup": "^4.53.5",
152152
"rollup-plugin-istanbul": "^5.0.0",
153-
"sass-embedded": "^1.93.3",
154-
"sass-true": "^10.0.0",
153+
"sass-embedded": "^1.97.0",
154+
"sass-true": "^10.1.0",
155155
"shelljs": "^0.10.0",
156-
"stylelint": "^16.26.0",
156+
"stylelint": "^16.26.1",
157157
"stylelint-config-twbs-bootstrap": "^16.1.0",
158158
"terser": "5.44.1",
159159
"vnu-jar": "25.11.25"

scss/_buttons.scss

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@
4040
line-height: var(--#{$prefix}btn-line-height);
4141
color: var(--#{$prefix}btn-color);
4242
text-align: center;
43-
text-decoration: if($link-decoration == none, null, none);
43+
text-decoration: if(not sass($link-decoration == none): none);
4444
white-space: $btn-white-space;
4545
vertical-align: middle;
46-
cursor: if($enable-button-pointers, pointer, null);
46+
// stylelint-disable-next-line scss/at-function-named-arguments
47+
cursor: if(sass($enable-button-pointers): pointer);
4748
user-select: none;
4849
border: var(--#{$prefix}btn-border-width) solid var(--#{$prefix}btn-border-color);
4950
@include border-radius(var(--#{$prefix}btn-border-radius));
@@ -53,7 +54,8 @@
5354

5455
&:hover {
5556
color: var(--#{$prefix}btn-hover-color);
56-
text-decoration: if($link-hover-decoration == underline, none, null);
57+
// stylelint-disable-next-line scss/at-function-named-arguments
58+
text-decoration: if(sass($link-hover-decoration == underline): none);
5759
background-color: var(--#{$prefix}btn-hover-bg);
5860
border-color: var(--#{$prefix}btn-hover-border-color);
5961
}
@@ -97,7 +99,8 @@
9799
color: var(--#{$prefix}btn-active-color);
98100
background-color: var(--#{$prefix}btn-active-bg);
99101
// Remove CSS gradients if they're enabled
100-
background-image: if($enable-gradients, none, null);
102+
// stylelint-disable-next-line scss/at-function-named-arguments
103+
background-image: if(sass($enable-gradients): none);
101104
border-color: var(--#{$prefix}btn-active-border-color);
102105
@include box-shadow(var(--#{$prefix}btn-active-shadow));
103106

@@ -126,7 +129,8 @@
126129
color: var(--#{$prefix}btn-disabled-color);
127130
pointer-events: none;
128131
background-color: var(--#{$prefix}btn-disabled-bg);
129-
background-image: if($enable-gradients, none, null);
132+
// stylelint-disable-next-line scss/at-function-named-arguments
133+
background-image: if(sass($enable-gradients): none);
130134
border-color: var(--#{$prefix}btn-disabled-border-color);
131135
opacity: var(--#{$prefix}btn-disabled-opacity);
132136
@include box-shadow(none);

scss/_card.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@
9696

9797
.card-link {
9898
&:hover {
99-
text-decoration: if($link-hover-decoration == underline, none, null);
99+
// stylelint-disable-next-line scss/at-function-named-arguments
100+
text-decoration: if(sass($link-hover-decoration == underline): none);
100101
}
101102

102103
+ .card-link {

scss/_carousel.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,13 @@
123123
}
124124
.carousel-control-prev {
125125
left: 0;
126-
background-image: if($enable-gradients, linear-gradient(90deg, rgba($black, .25), rgba($black, .001)), null);
126+
// stylelint-disable-next-line scss/at-function-named-arguments
127+
background-image: if(sass($enable-gradients): linear-gradient(90deg, rgba($black, .25), rgba($black, .001)));
127128
}
128129
.carousel-control-next {
129130
right: 0;
130-
background-image: if($enable-gradients, linear-gradient(270deg, rgba($black, .25), rgba($black, .001)), null);
131+
// stylelint-disable-next-line scss/at-function-named-arguments
132+
background-image: if(sass($enable-gradients): linear-gradient(270deg, rgba($black, .25), rgba($black, .001)));
131133
}
132134

133135
// Icons for within

scss/_dropdown.scss

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@
189189
font-weight: $font-weight-normal;
190190
color: var(--#{$prefix}dropdown-link-color);
191191
text-align: inherit; // For `<button>`s
192-
text-decoration: if($link-decoration == none, null, none);
192+
text-decoration: if(not sass($link-decoration == none): none);
193193
white-space: nowrap; // prevent links from randomly breaking onto new lines
194194
background-color: transparent; // For `<button>`s
195195
border: 0; // For `<button>`s
@@ -198,7 +198,8 @@
198198
&:hover,
199199
&:focus {
200200
color: var(--#{$prefix}dropdown-link-hover-color);
201-
text-decoration: if($link-hover-decoration == underline, none, null);
201+
// stylelint-disable-next-line scss/at-function-named-arguments
202+
text-decoration: if(sass($link-hover-decoration == underline): none);
202203
@include gradient-bg(var(--#{$prefix}dropdown-link-hover-bg));
203204
}
204205

@@ -215,7 +216,8 @@
215216
pointer-events: none;
216217
background-color: transparent;
217218
// Remove CSS gradients if they're enabled
218-
background-image: if($enable-gradients, none, null);
219+
// stylelint-disable-next-line scss/at-function-named-arguments
220+
background-image: if(sass($enable-gradients): none);
219221
}
220222
}
221223

scss/_header.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,14 @@
8989
margin-inline-end: $header-brand-margin-end;
9090
@include font-size($header-brand-font-size);
9191
color: var(--#{$prefix}header-brand-color);
92-
text-decoration: if($link-decoration == none, null, none);
92+
text-decoration: if(not sass($link-decoration == none): none);
9393
white-space: nowrap;
9494

9595
&:hover,
9696
&:focus {
9797
color: var(--#{$prefix}header-brand-hover-color);
98-
text-decoration: if($link-hover-decoration == underline, none, null);
98+
// stylelint-disable-next-line scss/at-function-named-arguments
99+
text-decoration: if(sass($link-hover-decoration == underline): none);
99100
}
100101
}
101102

scss/_list-group.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
display: block;
5858
padding: var(--#{$prefix}list-group-item-padding-y) var(--#{$prefix}list-group-item-padding-x);
5959
color: var(--#{$prefix}list-group-color);
60-
text-decoration: if($link-decoration == none, null, none);
60+
text-decoration: if(not sass($link-decoration == none): none);
6161
background-color: var(--#{$prefix}list-group-bg);
6262
border: var(--#{$prefix}list-group-border-width) solid var(--#{$prefix}list-group-border-color);
6363

scss/_maps.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ $utilities-border-subtle: (
181181

182182
$utilities-links-underline: map-loop($utilities-colors, rgba-css-var, "$prefix", "$key", "link-underline") !default;
183183

184-
$negative-spacers: if($enable-negative-margins, negativify-map($spacers), null) !default;
184+
// stylelint-disable-next-line scss/at-function-named-arguments
185+
$negative-spacers: if(sass($enable-negative-margins): negativify-map($spacers)) !default;
185186

186187
$gutters: $spacers !default;

scss/_modal.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@
217217
// scss-docs-start modal-fullscreen-loop
218218
@each $breakpoint in map.keys($grid-breakpoints) {
219219
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
220-
$postfix: if($infix != "", $infix + "-down", "");
220+
// stylelint-disable-next-line scss/at-function-named-arguments
221+
$postfix: if(sass($infix != ""): $infix + "-down"; else: "");
221222

222223
@include media-breakpoint-down($breakpoint) {
223224
.modal-fullscreen#{$postfix} {

0 commit comments

Comments
 (0)