Skip to content

Commit 4a133ba

Browse files
fix(css): resolve invalid values and reformat with stylelint (#516)
1 parent e9873e2 commit 4a133ba

36 files changed

Lines changed: 342 additions & 342 deletions

File tree

.stylelintrc.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"extends": "stylelint-config-standard",
3+
"rules": {
4+
"selector-class-pattern": null,
5+
"selector-id-pattern": null,
6+
"font-family-no-missing-generic-family-keyword": null,
7+
"no-descending-specificity": null
8+
},
9+
"ignoreFiles": [
10+
"**/dist/**",
11+
"**/coverage/**"
12+
]
13+
}

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@
1313
},
1414
"scripts": {
1515
"lint": "eslint bin src test workspaces public",
16+
"lint:css": "stylelint \"**/*.css\"",
1617
"lint-fix": "npm run lint -- --fix",
1718
"prepublishOnly": "rimraf ./dist && npm run build && pkg-ok",
1819
"build": "node ./esbuild.config.js",
19-
"test": "npm run test-only && npm run lint",
20+
"test": "npm run test-only && npm run lint && npm run lint:css",
2021
"test-only": "glob -c \"node --no-warnings --test-concurrency 1 --test\" \"test/**/*.test.js\"",
2122
"coverage": "c8 --reporter=lcov npm run test"
2223
},
@@ -75,7 +76,9 @@
7576
"pkg-ok": "^3.0.0",
7677
"pretty-bytes": "^7.0.0",
7778
"rimraf": "^6.0.1",
78-
"server-destroy": "^1.0.1"
79+
"server-destroy": "^1.0.1",
80+
"stylelint": "^16.20.0",
81+
"stylelint-config-standard": "^38.0.0"
7982
},
8083
"dependencies": {
8184
"@nodesecure/documentation-ui": "^1.3.0",

public/components/bundlephobia/bundlephobia.css

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,28 @@ section#package-info div.bundlephobia>div {
1414
flex-direction: column;
1515
justify-content: center;
1616
align-items: center;
17-
box-shadow: 1px 1px 10px rgba(41, 103, 122, 0.3) inset;
17+
box-shadow: 1px 1px 10px rgb(41 103 122 / 30%) inset;
1818
}
1919

2020
section#package-info div.bundlephobia>div+div {
2121
margin-left: 10px;
2222
}
2323

2424
section#package-info div.bundlephobia>div>b {
25-
font-weight: 800px;
25+
font-weight: 800;
2626
color: var(--secondary);
2727
margin-bottom: 5px;
2828
font-size: 18px;
2929
}
30+
3031
section#package-info div.bundlephobia>div>b i {
31-
font-family: 'mononoki';
32+
font-family: mononoki;
3233
font-size: 14px;
3334
color: #fce12b;
3435
}
3536

3637
section#package-info div.bundlephobia>div>span {
3738
font-size: 12px;
38-
font-family: 'mononoki';
39+
font-family: mononoki;
3940
text-transform: uppercase;
4041
}

public/components/expandable/expandable.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ span.expandable {
44
justify-content: center !important;
55
height: 35px;
66
font-size: 13px;
7-
font-family: "mononoki";
7+
font-family: mononoki;
88
background: none;
99
color: #00B0FF;
10-
text-shadow: 1px 1px 1px rgba(20, 20, 20, 0.5);
10+
text-shadow: 1px 1px 1px rgb(20 20 20 / 50%);
1111
transition: all 0.2s linear;
1212
margin-top: 5px;
1313
}

public/components/file-box/file-box.css

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@
44
padding: 10px;
55
border-top: 2px solid #351ea7;
66
border-left: 2px solid #351ea7;
7-
background: -moz-linear-gradient(top, rgba(12, 15, 94, 0.27) 0%, rgba(0, 0, 0, 0) 100%);
8-
background: -webkit-linear-gradient(top, rgba(12, 15, 94, 0.27) 0%, rgba(0, 0, 0, 0) 100%);
9-
background: linear-gradient(to bottom, rgba(12, 15, 94, 0.27) 0%, rgba(0, 0, 0, 0) 100%);
7+
background: linear-gradient(to bottom, rgb(12 15 94 / 27%) 0%, rgb(0 0 0 / 0%) 100%);
108
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#450c0f5e', endColorstr='#00000000', GradientType=0);
119
border-radius: 4px;
12-
box-shadow: 1px 1px 10px rgba(18, 101, 109, 0.1);
10+
box-shadow: 1px 1px 10px rgb(18 101 109 / 10%);
1311
}
1412

1513
.box-file-info+.box-file-info {
@@ -32,24 +30,27 @@
3230
display: flex;
3331
align-items: center;
3432
justify-content: center;
35-
font-family: 'mononoki';
33+
font-family: mononoki;
3634
font-weight: bold;
3735
text-shadow: 2px 2px 10px #000;
3836
}
37+
3938
.box-file-info>.box-header>span.Critical {
4039
background: #d32f2f;
4140
}
41+
4242
.box-file-info>.box-header>span.Warning {
4343
background: #f08e26;
4444
}
45+
4546
.box-file-info>.box-header>span.Information {
4647
background: #0288d1ab;
4748
}
4849

4950
.box-file-info>.box-header>.box-title {
5051
font-size: 18px;
5152
font-variant: small-caps;
52-
font-family: "mononoki";
53+
font-family: mononoki;
5354
color: #FFF;
5455
font-weight: bold;
5556
letter-spacing: 1px;
@@ -122,7 +123,7 @@
122123
font-size: 12px;
123124
margin-top: 5px;
124125
color: var(--secondary);
125-
font-family: "mononoki";
126+
font-family: mononoki;
126127
word-break: break-all;
127128
}
128129

@@ -153,7 +154,7 @@
153154
height: 18px;
154155
margin-top: 10px;
155156
font-size: 14px;
156-
font-family: "system-ui";
157+
font-family: system-ui;
157158
display: flex;
158159
align-items: center;
159160
justify-content: center;

public/components/gauge/gauge.css

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@
1010
padding: 0 10px;
1111
border-radius: 4px;
1212
}
13+
1314
body.dark .gauge>.line {
1415
color: white;
1516
}
1617

1718
.gauge>.line.clickable:hover {
18-
background: linear-gradient(to bottom, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%);
19+
background: linear-gradient(to bottom, rgb(255 255 255 / 100%) 0%,rgb(255 255 255 / 0%) 100%);
1920
cursor: pointer;
2021
}
2122

@@ -38,9 +39,10 @@ body.dark .gauge>.line.clickable:hover {
3839
width: 30px;
3940
flex-shrink: 0;
4041
text-align: right;
41-
font-family: "mononoki";
42+
font-family: mononoki;
4243
color: var(--secondary-darker);
4344
}
45+
4446
.gauge>.line>.line--column.border-bottom {
4547
border-bottom: 1px solid #8080803d;
4648
padding-bottom: 5px;
@@ -65,21 +67,24 @@ body.dark .gauge>.line.clickable:hover {
6567
border-radius: 4px;
6668
overflow: hidden;
6769
}
70+
6871
.gauge .gauge--bar >.usage {
6972
height: inherit;
7073
background-color: var(--secondary-darker);
7174
}
7275

7376
.gauge .chip {
74-
font-family: "mononoki";
77+
font-family: mononoki;
7578
background: #8dabe536;
7679
border-radius: 8px;
7780
font-size: 14px;
7881
padding: 3px 5px;
7982
}
83+
8084
.gauge .chip:last-child {
8185
margin-right: 30px;
8286
}
87+
8388
.gauge .chip + .chip {
8489
margin-left: 10px;
8590
}

public/components/legend/legend.css

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,11 @@
44
bottom: 40px;
55
z-index: 30;
66
max-width: 692px;
7-
padding: 4px;
8-
border-radius: 0 0 0 1rem;
97
overflow: hidden;
108
transition: transform 0.3s;
119
display: none;
12-
flex-direction: column;
10+
flex-flow: column wrap;
1311
justify-content: right;
14-
flex-wrap: wrap;
1512
font-size: 14px;
1613
color: #030421;
1714
padding: 0 10px 10px 0;
@@ -33,7 +30,7 @@
3330
height: 15px;
3431
margin: 0 5px;
3532
border-radius: 50%;
36-
box-shadow: 0 0 10px rgba(0, 0, 0, 0.34);
33+
box-shadow: 0 0 10px rgb(0 0 0 / 34%);
3734
}
3835

3936
.legend {
@@ -47,7 +44,7 @@
4744
}
4845

4946
.legend-box:hover {
50-
border: 1px solid rgba(48, 56, 165, 0.6);
47+
border: 1px solid rgb(48 56 165 / 60%);
5148
}
5249

5350
.legend-box:hover > .legend {

public/components/locker/locker.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
}
4242

4343
#network-locker>p {
44-
font-family: "mononoki";
44+
font-family: mononoki;
4545
padding-right: 10px;
4646
display: flex;
4747
align-items: center;

public/components/navigation/navigation.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ nav#aside>ul li+li {
4040

4141
nav#aside>ul li:not(.active):hover {
4242
cursor: pointer;
43-
background: rgba(50, 200, 255, 0.085);
43+
background: rgb(50 200 255 / 8.5%);
4444
}
4545

46-
nav#aside>ul li.active:before {
46+
nav#aside>ul li.active::before {
4747
background: var(--secondary);
4848
position: absolute;
4949
left: 0;

public/components/package/header/header.css

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ div.package-header {
66

77
div.package-header>.package-name {
88
display: flex;
9-
font-family: "mononoki";
10-
text-shadow: 1px 1px 5px rgba(20, 20, 20, 0.5);
9+
font-family: mononoki;
10+
text-shadow: 1px 1px 5px rgb(20 20 20 / 50%);
1111
}
1212

1313
div.package-header>.package-name>.name {
@@ -35,6 +35,7 @@ div.package-header>.package-name>.info {
3535
border: none;
3636
margin-left: auto;
3737
cursor: pointer;
38+
3839
/* https://codepen.io/sosuke/pen/Pjoqqp */
3940
filter: invert(71%) sepia(22%) saturate(6942%) hue-rotate(149deg) brightness(101%) contrast(106%);
4041
}
@@ -54,7 +55,7 @@ div.package-header>.package-name>.info-menu>.info-menu-title {
5455
font-weight: bold;
5556
text-align: center;
5657
margin-bottom: 12px;
57-
color: rgb(39, 38, 38);
58+
color: rgb(39 38 38);
5859
}
5960

6061
div.package-header>.package-name>.info-menu>a {
@@ -105,11 +106,11 @@ div.package-header>ul.flags {
105106
position: absolute;
106107
z-index: 21;
107108
font-size: 13px;
108-
text-shadow: 1px 1px 1px rgba(20, 20, 20, 0.5);
109+
text-shadow: 1px 1px 1px rgb(20 20 20 / 50%);
109110
top: 150%;
110111
left: 50%;
111112
margin-left: -140px;
112-
font-family: "mononoki";
113+
font-family: mononoki;
113114
}
114115

115116
.flag-infobulle>span::after {
@@ -120,7 +121,7 @@ div.package-header>ul.flags {
120121
margin-left: -5px;
121122
border-width: 5px;
122123
border-style: solid;
123-
border-color: transparent transparent #000 transparent;
124+
border-color: transparent transparent #000;
124125
}
125126

126127
.flag-infobulle:hover span {
@@ -164,6 +165,7 @@ div.package-header>.links div>a {
164165
div.package-header>.links div>a:hover {
165166
text-decoration: underline;
166167
}
168+
167169
/**
168170
* LINKS END
169171
*/

0 commit comments

Comments
 (0)