Skip to content

Commit b29838e

Browse files
authored
Patch - CSS and JS optimization: Stylelint SCSS rules (#2524)
* fix: font-family-name-quotes * fix: function-url-quotes * fix: length-zero-no-unit * fix: property-no-vendor-prefix * fix: color-hex-length * fix: comment-empty-line-before * fix: declaration-empty-line-before * fix: rule-empty-line-before * fix: scss/at-mixin-argumentless-call-parentheses * fix: scss/dollar-variable-empty-line-before * fix: scss/double-slash-comment-empty-line-before * fix: scss/double-slash-comment-whitespace-inside * fix: scss/load-no-partial-leading-underscore * fix: selector-attribute-quotes * fix: selector-type-no-unknown * fix: shorthand-property-no-redundant-values * build: add CI job for CSS/SCSS linting * build: bump stylelint-config-standard-scss * fix: color-function-alias-notation * chore: ignore break-word issue
1 parent 222606b commit b29838e

File tree

79 files changed

+471
-341
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+471
-341
lines changed

.github/workflows/lint-css.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: CSS Linting
2+
on:
3+
push:
4+
branches-ignore:
5+
- "dependabot/**"
6+
paths:
7+
- "package*.json"
8+
- "Gruntfile.coffee"
9+
- "stylelint.config.js"
10+
- "**/*.css"
11+
- "**/*.scss"
12+
- ".github/workflows/lint-css.yml"
13+
14+
pull_request:
15+
paths:
16+
- "package*.json"
17+
- "Gruntfile.coffee"
18+
- "stylelint.config.js"
19+
- "**/*.css"
20+
- "**/*.scss"
21+
- ".github/workflows/lint-css.yml"
22+
23+
jobs:
24+
lint-css:
25+
runs-on: ubuntu-latest
26+
27+
steps:
28+
- name: Clone repository
29+
uses: actions/checkout@v4
30+
31+
- name: Set up Node.js
32+
uses: actions/setup-node@v4
33+
with:
34+
cache: npm
35+
36+
- name: Install Grunt
37+
run: npm i -g grunt-cli --force
38+
39+
- name: Install npm dependencies
40+
run: npm ci
41+
42+
- name: Stylelint
43+
run: grunt stylelint

common/list/_lists.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
* - views/_screen-xs-max
1616
*/
1717
.list-responsive {
18-
1918
> li {
2019
float: left;
2120
padding-right: 5px;
@@ -30,6 +29,7 @@
3029
content: " ";
3130
display: table;
3231
}
32+
3333
&:after {
3434
clear: both;
3535
}
@@ -42,7 +42,7 @@
4242
* - _screen-md-min
4343
* - _screen-lg-min
4444
*/
45-
ul[class*=list-col] {
45+
ul[class*="list-col"] {
4646
display: flex;
4747
flex-wrap: wrap;
4848
list-style: none;

common/scaffolding/_base.scss

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

1111
h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6
1212
{
13-
@include defaults-alternative-font-family();
13+
@include defaults-alternative-font-family;
14+
1415
font-variant-ligatures: no-common-ligatures;
1516
font-weight: $bold-weight;
1617
}

common/spacing/_base.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,22 @@
3535

3636
// Auto margins
3737
.m-auto { margin: auto !important; }
38+
3839
.mt-auto,
3940
.my-auto {
4041
margin-top: auto !important;
4142
}
43+
4244
.mr-auto,
4345
.mx-auto {
4446
margin-right: auto !important;
4547
}
48+
4649
.mb-auto,
4750
.my-auto {
4851
margin-bottom: auto !important;
4952
}
53+
5054
.ml-auto,
5155
.mx-auto {
5256
margin-left: auto !important;

common/spacing/_screen-lg-min.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,22 @@
2929

3030
// Auto margins
3131
.m-lg-auto { margin: auto !important; }
32+
3233
.mt-lg-auto,
3334
.my-lg-auto {
3435
margin-top: auto !important;
3536
}
37+
3638
.mr-lg-auto,
3739
.mx-lg-auto {
3840
margin-right: auto !important;
3941
}
42+
4043
.mb-lg-auto,
4144
.my-lg-auto {
4245
margin-bottom: auto !important;
4346
}
47+
4448
.ml-lg-auto,
4549
.mx-lg-auto {
4650
margin-left: auto !important;

common/spacing/_screen-md-min.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,22 @@
2929

3030
// Auto margins
3131
.m-md-auto { margin: auto !important; }
32+
3233
.mt-md-auto,
3334
.my-md-auto {
3435
margin-top: auto !important;
3536
}
37+
3638
.mr-md-auto,
3739
.mx-md-auto {
3840
margin-right: auto !important;
3941
}
42+
4043
.mb-md-auto,
4144
.my-md-auto {
4245
margin-bottom: auto !important;
4346
}
47+
4448
.ml-md-auto,
4549
.mx-md-auto {
4650
margin-left: auto !important;

common/spacing/_screen-sm-min.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,22 @@
2929

3030
// Auto margins
3131
.m-sm-auto { margin: auto !important; }
32+
3233
.mt-sm-auto,
3334
.my-sm-auto {
3435
margin-top: auto !important;
3536
}
37+
3638
.mr-sm-auto,
3739
.mx-sm-auto {
3840
margin-right: auto !important;
3941
}
42+
4043
.mb-sm-auto,
4144
.my-sm-auto {
4245
margin-bottom: auto !important;
4346
}
47+
4448
.ml-sm-auto,
4549
.mx-sm-auto {
4650
margin-left: auto !important;

common/text-level-modifiers/_base.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
// Font heading
88
.fnt-hdng {
9-
@include defaults-alternative-font-family();
9+
@include defaults-alternative-font-family;
1010
}
1111

1212
.lead {

components/_base.scss

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Template pages styles
33
*/
44

5-
.whtwedo { //used on the topics template
5+
.whtwedo { // used on the topics template
66

77
p {
88
font-weight: 700;
@@ -11,24 +11,21 @@
1111
}
1212

1313
ul {
14-
1514
>li {
1615
margin-bottom: 10px;
1716
}
1817
}
1918
}
2019

21-
.lnkbx { //used on topics and theme for well in right column
20+
.lnkbx { // used on topics and theme for well in right column
2221

2322
>ul {
24-
2523
>li {
2624
margin-bottom: 10px;
2725
}
2826
}
2927

3028
dl {
31-
3229
a {
3330
overflow-wrap: break-word;
3431
word-break: break-all;
@@ -51,7 +48,6 @@
5148

5249
.gc-crprt {
5350
ul {
54-
5551
&:nth-child(1) {
5652
list-style: outside none none;
5753
margin: 0;
@@ -68,7 +64,6 @@
6864
}
6965

7066
.col-md-8 {
71-
7267
.col-md-4 {
7368
margin-bottom: 15px;
7469
}
@@ -83,7 +78,6 @@
8378
.gc-orgnztn { // Class added to main
8479

8580
.gc-rms-lngth {
86-
8781
img {
8882
margin-bottom: 30px;
8983
}
@@ -95,7 +89,6 @@
9589
*/
9690

9791
.gc-theme {
98-
9992
.profile {
10093
margin-bottom: 25px;
10194
}
@@ -109,7 +102,6 @@
109102
.lnkbx { // Contact definition list
110103

111104
dl {
112-
113105
dt,
114106
dd {
115107
border: 0;
@@ -122,7 +114,6 @@
122114
*/
123115

124116
.gc-advnc-srvc {
125-
126117
.col-md-8 {
127118
h2 {
128119
&:first-child {

components/_base2.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
* Main content area
33
*/
44
main {
5-
65
.subtitle {
76
color: #555;
87
font-size: 1em;
@@ -26,7 +25,6 @@ main {
2625
}
2726

2827
.gc-rms-lngth {
29-
3028
img {
3129
background-color: #fff;
3230
border: solid 1px $wbGray;

0 commit comments

Comments
 (0)