forked from jupyterlab/jupyterlab
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adopt stylelint and apply initial rules (jupyterlab#11944)
* add stylelint, sort setup.cfg deps * enable fixing * revert setup.cfg changes * comment no-eol-whitespace to show a trivial fail * add stylelint:check to ci * enable stylelint cache * use stylelint to fix no-eol-whitespace * [stylelint] fix block-no-empty, ignore nbconvert-css * [stylelint] declaration-block-no-duplicate-properties * [stylelint] declaration-block-no-shorthand-property-overrides * [stylelint] no-duplicate-selectors * revert toolbar padding change * normalize formatting with stylelint(-config)-prettier * explicitly add recommended * [stylelint] no-invalid-position-at-import-rule * resolve, dedupe yarn.lock
- Loading branch information
Showing
24 changed files
with
551 additions
and
718 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# project files | ||
coverage/ | ||
.eslintcache | ||
.stylelintcache | ||
|
||
dev_mode/listings | ||
dev_mode/schemas | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
packages/nbconvert-css/style/index.css |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
$schema: https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/stylelintrc.json | ||
|
||
extends: | ||
- stylelint-config-recommended | ||
- stylelint-config-standard | ||
- stylelint-prettier/recommended | ||
|
||
rules: | ||
# TODO: fix all of these rules violated in stylelint-config-recommended | ||
no-descending-specificity: null | ||
# TODO: evaluate these rules violated in stylelint-config-standard | ||
alpha-value-notation: null | ||
at-rule-empty-line-before: null | ||
at-rule-no-vendor-prefix: null | ||
block-closing-brace-space-before: null | ||
block-opening-brace-space-after: null | ||
color-function-notation: null | ||
color-hex-length: null | ||
comment-empty-line-before: null | ||
comment-whitespace-inside: null | ||
custom-property-empty-line-before: null | ||
custom-property-pattern: null | ||
declaration-block-no-redundant-longhand-properties: null | ||
declaration-block-semicolon-newline-after: null | ||
declaration-block-single-line-max-declarations: null | ||
declaration-block-trailing-semicolon: null | ||
declaration-colon-newline-after: null | ||
declaration-empty-line-before: null | ||
function-url-quotes: null | ||
indentation: null | ||
keyframes-name-pattern: null | ||
length-zero-no-unit: null | ||
max-empty-lines: null | ||
max-line-length: null | ||
number-leading-zero: null | ||
number-max-precision: null | ||
property-no-vendor-prefix: null | ||
rule-empty-line-before: null | ||
selector-class-pattern: null | ||
selector-combinator-space-before: null | ||
selector-descendant-combinator-no-non-space: null | ||
selector-id-pattern: null | ||
selector-list-comma-newline-after: null | ||
selector-no-vendor-prefix: null | ||
selector-pseudo-element-colon-notation: null | ||
shorthand-property-no-redundant-values: null | ||
string-quotes: null | ||
value-keyword-case: null | ||
value-list-comma-newline-after: null | ||
value-no-vendor-prefix: null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
/*----------------------------------------------------------------------------- | ||
| Copyright (c) Jupyter Development Team. | ||
| Distributed under the terms of the Modified BSD License. | ||
|----------------------------------------------------------------------------*/ | ||
|
||
:root { | ||
--jp-private-menu-panel-height: 27px; | ||
} | ||
|
||
.lm-Widget.lm-mod-hidden { | ||
display: none !important; | ||
} | ||
|
||
body { | ||
font-family: var(--jp-ui-font-family); | ||
background: var(--jp-layout-color3); | ||
margin: 0; | ||
padding: 0; | ||
overflow: hidden; | ||
} | ||
|
||
.jp-LabShell { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
right: 0; | ||
bottom: 0; | ||
} | ||
|
||
.jp-LabShell.jp-mod-devMode { | ||
border-top: 4px solid red; | ||
} | ||
|
||
#jp-main-dock-panel { | ||
padding: 5px; | ||
} | ||
|
||
#jp-main-dock-panel[data-mode='single-document'] { | ||
padding: 0; | ||
} | ||
|
||
#jp-main-dock-panel[data-mode='single-document'] .jp-MainAreaWidget { | ||
border: none; | ||
} | ||
|
||
#jp-top-panel { | ||
border-bottom: var(--jp-border-width) solid var(--jp-border-color0); | ||
background: var(--jp-layout-color1); | ||
display: flex; | ||
min-height: var(--jp-private-menubar-height); | ||
overflow: visible; | ||
} | ||
|
||
#jp-menu-panel { | ||
min-height: var(--jp-private-menu-panel-height); | ||
background: var(--jp-layout-color1); | ||
} | ||
|
||
#jp-down-stack { | ||
border-bottom: var(--jp-border-width) solid var(--jp-border-color1); | ||
} | ||
|
||
.jp-LabShell[data-shell-mode='single-document'] #jp-top-panel { | ||
border-bottom: none; | ||
} | ||
|
||
.jp-LabShell[data-shell-mode='single-document'] #jp-menu-panel { | ||
padding-left: calc( | ||
var(--jp-private-sidebar-tab-width) + var(--jp-border-width) | ||
); | ||
border-bottom: var(--jp-border-width) solid var(--jp-border-color0); | ||
/* Adjust min-height so open menus show up in the right place */ | ||
min-height: calc( | ||
var(--jp-private-menu-panel-height) + var(--jp-border-width) | ||
); | ||
} | ||
|
||
#jp-bottom-panel { | ||
background: var(--jp-layout-color1); | ||
display: flex; | ||
} | ||
|
||
#jp-single-document-mode { | ||
margin: 0px 8px; | ||
display: flex; | ||
align-items: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.