Skip to content

Commit

Permalink
refactor: add stylelint processor
Browse files Browse the repository at this point in the history
  • Loading branch information
xyhp915 committed Dec 7, 2020
1 parent 0217142 commit 7c7ce3d
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 21 deletions.
23 changes: 23 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"extends": [
"stylelint-config-standard"
],
"rules": {
"at-rule-no-unknown": [
true,
{
"ignoreAtRules": [
"tailwind",
"apply",
"variants",
"responsive",
"screen"
]
}
],
"declaration-block-trailing-semicolon": null,
"no-descending-specificity": null,
"declaration-empty-line-before": null,
"block-no-empty": null
}
}
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
"postcss-nested": "^5.0.1",
"purgecss": "3.0.0",
"shadow-cljs": "2.8.81",
"stylelint": "^13.8.0",
"stylelint-config-standard": "^20.0.0",
"tailwindcss": "2.0.1"
},
"scripts": {
Expand All @@ -28,6 +30,7 @@
"clean": "gulp clean",
"test": "run-s cljs:test cljs:run-test",
"report": "run-s cljs:report",
"style:lint": "stylelint \"src/**/*.css\" ",
"gulp:watch": "gulp watch",
"gulp:build": "cross-env NODE_ENV=production gulp build",
"cljs:watch": "clojure -M:cljs watch app publishing",
Expand Down
12 changes: 6 additions & 6 deletions src/main/frontend/components/block.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,36 +32,36 @@
margin: 0 auto;

img {
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 10px 10px -5px rgba(0, 0, 0, .04);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
}

.ls-block h1 {
font-size: 2em;
margin: .67em 0;
margin: 0.67em 0;
}

.ls-block h2 {
font-size: 1.5em;
margin: .75em 0;
margin: 0.75em 0;
}

.ls-block h3 {
font-size: 1.17em;
margin: .83em 0;
margin: 0.83em 0;
}

.ls-block h4 {
margin: 1.12em 0;
}

.ls-block h5 {
font-size: .83em;
font-size: 0.83em;
margin: 1.5em 0;
}

.ls-block h6 {
font-size: .75em;
font-size: 0.75em;
margin: 1.67em 0;
}

Expand Down
8 changes: 4 additions & 4 deletions src/main/frontend/components/editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
padding: 0;
}

.non-block-editor textarea, pre {
.non-block-editor textarea,
pre {
display: block;
padding: 0.5rem;
box-shadow: 0 0 0 1px rgba(0, 0, 0, .02);
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.02);
border-radius: 4px;
}

.non-block-editor textarea {
background: #F6F8FA;
background: #f6f8fa;
background: var(--ls-secondary-background-color);
}

3 changes: 1 addition & 2 deletions src/main/frontend/components/header.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.cp__header {
@apply shadow z-10 h-12 pr-4;

position: relative;
display: flex;
align-items: center;
Expand Down Expand Up @@ -62,4 +61,4 @@
.cp__right-menu-button {
display: block;
}
}
}
16 changes: 9 additions & 7 deletions src/main/frontend/components/sidebar.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@

.cp__sidebar-help {
@apply font-bold fixed bottom-4
rounded-full h-8 w-8 flex items-center justify-center font-bold
opacity-70 hover:opacity-100;
rounded-full h-8 w-8 flex items-center justify-center font-bold
opacity-70 hover:opacity-100;

user-select: none;
cursor: help;
Expand All @@ -77,7 +77,7 @@
z-index: 9;

box-sizing: border-box;
background-color: var(--ls-secondary-background-color, #D8E1E8);
background-color: var(--ls-secondary-background-color, #d8e1e8);
padding-bottom: 48px;

&-inner {
Expand Down Expand Up @@ -110,12 +110,14 @@
margin-top: 0;
}

.non-block-editor textarea, pre, pre.code {
.non-block-editor textarea,
pre,
pre.code {
background: var(--ls-right-sidebar-code-bg-color);
}

pre.CodeMirror-line {
background: #FFFFFF;
background: #fff;
}

.references {
Expand All @@ -134,8 +136,8 @@
}

.close {
transform: scale(.8);
transition: transform .1s;
transform: scale(0.8);
transition: transform 0.1s;

&:hover {
transform: scale(1);
Expand Down
2 changes: 0 additions & 2 deletions src/main/frontend/ui.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/* auto complete */
#ui__ac {

&-inner {
max-height: 400px;
overflow-x: hidden;
Expand Down

0 comments on commit 7c7ce3d

Please sign in to comment.