Skip to content

Commit 3caad8c

Browse files
committed
build: use stylelint
1 parent 26d0b1f commit 3caad8c

13 files changed

+1623
-370
lines changed

Diff for: .github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ jobs:
2828
- name: Install Node.js dependencies
2929
run: npm install
3030

31-
- name: Run tests
31+
- name: Run Lint
3232
shell: bash
33-
run: npm test
33+
run: npm lint
3434

3535
- name: Jekyll Build
3636
run: bundle exec jekyll build

Diff for: .gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ _site
1010
.jekyll-metadata
1111
vendor
1212
.bundle
13+
14+
.stylelintcache

Diff for: .stylelintignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
css/font-awesome.min.css
2+
3+
_site

Diff for: .stylelintrc.mjs

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
export default {
3+
extends: ['stylelint-config-standard'],
4+
plugins: ['stylelint-order'],
5+
rules: {
6+
// Enforces the order of the CSS properties to be in alphabetical order
7+
'order/properties-alphabetical-order': true,
8+
'no-descending-specificity': null,
9+
// Disables the Level-4 Media Queries; Since they're more exotic and less known
10+
'media-feature-range-notation': 'prefix',
11+
},
12+
};

Diff for: css/langs/th.css

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
}
55

66
#description .description {
7-
position: relative;
8-
top: -5px;
9-
font: 100 4.1em "TH SarabunNew", "Helvetica Neue", "Open Sans", sans-serif;
107
color: #aeaeae;
8+
font: 100 4.1em "TH SarabunNew", "Helvetica Neue", "Open Sans", sans-serif;
119
line-height: .87;
1210
margin: unset;
11+
position: relative;
12+
top: -5px;
1313
}
1414

1515
/* Non-English pages use pre and code tags for code blocks */
1616
.non-en-doc .page pre[class*="language-"] {
17-
padding-top: 10px !important;
1817
padding-bottom: 10px !important;
18+
padding-top: 10px !important;
1919
}

Diff for: css/search.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
}
77

88
.algolia-autocomplete {
9-
min-width: 12em;
109
max-width: 12em;
10+
min-width: 12em;
1111
top: -0.2em;
1212
}
1313

Diff for: css/sintax.css

+8-4
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
.highlight table pre { margin: 0; }
2525

2626
.highlight, .highlight .w {
27-
color: #24292f;
2827
background-color: var(--code-bg);
28+
color: #24292f;
2929
}
3030

3131
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kp, .highlight .kr, .highlight .kt, .highlight .kv {
@@ -37,8 +37,8 @@
3737
}
3838

3939
.highlight .gd {
40-
color: var(--red-darker);
4140
background-color: #ffebe9;
41+
color: var(--red-darker);
4242
}
4343

4444
.highlight .nb,
@@ -57,8 +57,8 @@
5757
}
5858

5959
.highlight .ges {
60-
font-weight: bold;
6160
font-style: italic;
61+
font-weight: bold;
6262
}
6363

6464
.highlight .l,
@@ -95,20 +95,24 @@
9595
.highlight .gh {
9696
font-weight: bold;
9797
}
98+
9899
.highlight .gu {
99100
font-weight: bold;
100101
}
102+
101103
.highlight .s, .highlight .sa, .highlight .sc, .highlight .sd, .highlight .se, .highlight .sh, .highlight .sx, .highlight .ss {
102104
color: var(--blue-darker);
103105
}
106+
104107
.highlight .nd, .highlight .nf, .highlight .fm {
105108
color: var(--pupple);
106109
}
107110

108111
.highlight .err {
109-
color: #f6f8fa;
110112
background-color: #82071e;
113+
color: #f6f8fa;
111114
}
115+
112116
.highlight .c,
113117
.highlight .gl
114118
.highlight .ch,

0 commit comments

Comments
 (0)