Skip to content

Commit cef1e99

Browse files
committed
Stylelint fixes
1 parent 1744487 commit cef1e99

File tree

3 files changed

+73
-24
lines changed

3 files changed

+73
-24
lines changed

.stylelintrc.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
$schema: https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/stylelintrc.json
2+
3+
extends:
4+
- stylelint-config-recommended
5+
- stylelint-config-standard
6+
- stylelint-prettier/recommended
7+
8+
plugins:
9+
- stylelint-csstree-validator
10+
11+
rules:
12+
import-notation: null
13+
# TODO: fix all of these rules violated in stylelint-config-recommended
14+
no-descending-specificity: null
15+
# this fixer is incompatible with the copyright headers
16+
comment-whitespace-inside: null
17+
# these fixers assume use of `autoprefixer`: we _don't_ use any CSS preprocessors
18+
property-no-vendor-prefix: null
19+
selector-no-vendor-prefix: null
20+
value-no-vendor-prefix: null
21+
# these fixers doesn't work well with variables
22+
alpha-value-notation: null
23+
color-function-notation: null
24+
# TODO: evaluate these unfixable rules violated in stylelint-config-standard
25+
custom-property-pattern: null
26+
declaration-block-no-redundant-longhand-properties: null
27+
function-linear-gradient-no-nonstandard-direction: null
28+
function-url-quotes: null
29+
keyframes-name-pattern: null
30+
number-max-precision: null
31+
selector-class-pattern: null
32+
selector-id-pattern: null
33+
selector-pseudo-class-no-unknown: null
34+
selector-pseudo-element-no-unknown: null
35+
selector-not-notation: null
36+
# disallow use of more than one bare HTML tag like `div span` to avoid performance regression,
37+
# while allowing compounded HTML tags like `button.jp-Button`
38+
selector-max-type:
39+
- 1
40+
- ignore: "compounded"
41+
# matching complex selectors is expensive
42+
selector-max-class: 4
43+
# TODO: decrease max-compound to 3
44+
selector-max-compound-selectors: 4
45+
# TODO: decrease to 0
46+
selector-max-universal: 1
47+
csstree/validator: true

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"prettier:base": "prettier \"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}\"",
5151
"prettier:check": "jlpm prettier:base --check",
5252
"stylelint": "jlpm stylelint:check --fix",
53-
"stylelint:check": "stylelint --cache \"style/**/*.css\"",
53+
"stylelint:check": "stylelint --config .stylelintrc.yaml --cache \"style/**/*.css\"",
5454
"test": "jlpm run test:firefox",
5555
"test:chrome": "karma start --browsers=Chrome tests/karma.conf.js",
5656
"test:debug": "karma start --browsers=Chrome --singleRun=false --debug=true tests/karma.conf.js",

style/base.css

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
11
.jupyterlab-sidecar {
2-
background: var(--jp-layout-color0);
3-
display: flex;
4-
}
2+
background: var(--jp-layout-color0);
3+
display: flex;
4+
}
55

6-
.jupyterlab-sidecar .jp-OutputPrompt.jp-OutputArea-prompt {
7-
display: none;
8-
}
6+
.jupyterlab-sidecar .jp-OutputPrompt.jp-OutputArea-prompt {
7+
display: none;
8+
}
99

10-
.jupyterlab-sidecar > .jp-OutputArea-child {
11-
flex: 1;
12-
}
10+
.jupyterlab-sidecar > .jp-OutputArea-child {
11+
flex: 1;
12+
}
1313

14-
.jp-SideBar.jp-mod-right .p-TabBar-tabCloseIcon, .jp-SideBar.jp-mod-right .lm-TabBar-tabCloseIcon {
15-
padding: 4px 0px 4px 4px;
16-
background-size: 16px;
17-
height: 16px;
18-
width: 16px;
19-
background-image: var(--jp-icon-close);
20-
background-position: center;
21-
background-repeat: no-repeat;
22-
align-self: center;
23-
}
14+
.jp-SideBar.jp-mod-right .p-TabBar-tabCloseIcon,
15+
.jp-SideBar.jp-mod-right .lm-TabBar-tabCloseIcon {
16+
padding: 4px 0px 4px 4px;
17+
background-size: 16px;
18+
height: 16px;
19+
width: 16px;
20+
background-image: var(--jp-icon-close);
21+
background-position: center;
22+
background-repeat: no-repeat;
23+
align-self: center;
24+
}
2425

25-
.jp-SideBar.jp-mod-right .p-TabBar-tabCloseIcon:hover, .jp-SideBar.jp-mod-right .lm-TabBar-tabCloseIcon:hover {
26-
background-size: 16px;
27-
background-image: var(--jp-icon-inverse-close-circle);
28-
}
26+
.jp-SideBar.jp-mod-right .p-TabBar-tabCloseIcon:hover,
27+
.jp-SideBar.jp-mod-right .lm-TabBar-tabCloseIcon:hover {
28+
background-size: 16px;
29+
background-image: var(--jp-icon-inverse-close-circle);
30+
}

0 commit comments

Comments
 (0)