fix: fix pre-commit hook

This commit is contained in:
fantasticit 2022-04-24 22:09:58 +08:00
parent 802273d887
commit e869f9a47a
20 changed files with 69 additions and 60 deletions

View File

@ -45,5 +45,5 @@
"stylelint-prettier": "^2.0.0", "stylelint-prettier": "^2.0.0",
"typescript": "^4.5.5" "typescript": "^4.5.5"
}, },
"pre-commit": "lint" "pre-commit": "format"
} }

View File

@ -1,11 +1,11 @@
.headerWrap { .headerWrap {
margin: 0 -24px;
position: relative; position: relative;
z-index: 1000; z-index: 1000;
display: flex; display: flex;
padding: 12px 24px;
margin: 0 -24px;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 12px 24px;
border-bottom: 1px solid var(--semi-color-border); border-bottom: 1px solid var(--semi-color-border);
> div { > div {
@ -16,9 +16,9 @@
} }
.contentWrap { .contentWrap {
margin: 0 -24px;
height: calc(100vh - 56px);
display: flex; display: flex;
height: calc(100vh - 56px);
margin: 0 -24px;
flex-wrap: nowrap; flex-wrap: nowrap;
> aside { > aside {
@ -30,18 +30,18 @@
overflow: auto; overflow: auto;
> ul { > ul {
margin: 0;
padding: 0; padding: 0;
margin: 0;
list-style: none; list-style: none;
> li { > li {
width: 100%; width: 100%;
padding: 12px 16px; padding: 12px 16px;
color: var(--semi-color-text-0);
font-size: 14px; font-size: 14px;
border-radius: var(--semi-border-radius-small); color: var(--semi-color-text-0);
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
border-radius: var(--semi-border-radius-small);
&:hover { &:hover {
background-color: var(--semi-color-primary-light-default); background-color: var(--semi-color-primary-light-default);
@ -56,10 +56,10 @@
} }
> main { > main {
flex: 1;
background-color: var(--semi-color-nav-bg);
padding: 24px 0; padding: 24px 0;
overflow: auto; overflow: auto;
background-color: var(--semi-color-nav-bg);
flex: 1;
.editorWrap { .editorWrap {
min-height: 100%; min-height: 100%;

View File

@ -103,5 +103,5 @@
} }
.docListTitle { .docListTitle {
margin: 12px 0.5rem; margin: 12px .5rem;
} }

View File

@ -27,7 +27,7 @@
.Resizer { .Resizer {
z-index: 1; z-index: 1;
opacity: 0.2; opacity: .2;
box-sizing: border-box; box-sizing: border-box;
background-clip: padding; background-clip: padding;
} }

View File

@ -10,23 +10,23 @@
> span:first-child { > span:first-child {
position: relative; position: relative;
display: block;
width: 18px; width: 18px;
height: 18px; height: 18px;
display: block;
border-radius: 2px 2px;
border: 1px solid #e8e8e8;
margin-right: 8px; margin-right: 8px;
border: 1px solid #e8e8e8;
border-radius: 2px;
&::after { &::after {
content: '';
display: block;
position: absolute; position: absolute;
top: 8px; top: 8px;
left: 0px; left: 0;
display: block;
width: 17px; width: 17px;
height: 0; height: 0;
border-bottom: 2px solid #ff5151; content: '';
transform: rotate(45deg); transform: rotate(45deg);
border-bottom: 2px solid #ff5151;
} }
} }
} }

View File

@ -1,8 +1,18 @@
.ProseMirror { .ProseMirror {
font-family: 'Chinese Quote', 'Segoe UI', Roboto, RobotoNum, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', font-family:
'Helvetica Neue', Helvetica, Arial, sans-serif; 'Chinese Quote',
'Segoe UI',
Roboto,
RobotoNum,
'PingFang SC',
'Hiragino Sans GB',
'Microsoft YaHei',
'Helvetica Neue',
Helvetica,
Arial,
sans-serif;
line-height: 1.74; line-height: 1.74;
letter-spacing: 0.008em; letter-spacing: .008em;
color: var(--semi-color-text-0); color: var(--semi-color-text-0);
word-break: break-word; word-break: break-word;
word-wrap: break-word; word-wrap: break-word;
@ -24,19 +34,19 @@
} }
p { p {
margin-top: 0.75rem; margin-top: .75rem;
margin-bottom: 0; margin-bottom: 0;
font-size: 1em; font-size: 1em;
font-weight: normal; font-weight: normal;
line-height: 1.714; line-height: 1.714;
letter-spacing: -0.005em; letter-spacing: -.005em;
} }
blockquote { blockquote {
box-sizing: border-box; box-sizing: border-box;
padding-left: 10px; padding-left: 10px;
border-left: 2px solid var(--semi-color-fill-2); border-left: 2px solid var(--semi-color-fill-2);
margin: 0.75rem 0; margin: .75rem 0;
} }
hr { hr {
@ -74,7 +84,7 @@
body[theme-mode='dark'] { body[theme-mode='dark'] {
.ProseMirror { .ProseMirror {
img { img {
opacity: 0.75; opacity: .75;
} }
} }
} }

View File

@ -2,7 +2,7 @@
code { code {
padding: 4px; padding: 4px;
font-family: Consolas, Menlo, Courier, monospace; font-family: Consolas, Menlo, Courier, monospace;
font-size: 0.875rem; font-size: .875rem;
line-height: 1.3; line-height: 1.3;
cursor: text; cursor: text;
background-color: var(--semi-color-fill-1); background-color: var(--semi-color-fill-1);
@ -25,7 +25,7 @@
padding: 0; padding: 0;
margin: 8px; margin: 8px;
overflow: auto; overflow: auto;
font-size: 0.875rem; font-size: .875rem;
line-height: 1.5rem; line-height: 1.5rem;
color: inherit; color: inherit;
white-space: pre; white-space: pre;

View File

@ -1,6 +1,6 @@
.mention { .mention {
color: #fff;
padding: 2px 6px; padding: 2px 6px;
color: #fff;
background-color: var(--semi-color-primary); background-color: var(--semi-color-primary);
border: 1px solid var(--semi-color-border); border: 1px solid var(--semi-color-border);
border-radius: 999em; border-radius: 999em;

View File

@ -1,4 +1,5 @@
/* 自定义节点样式 */ /* 自定义节点样式 */
/* stylelint-disable */
.ProseMirror { .ProseMirror {
.node-status { .node-status {
margin-right: 4px; margin-right: 4px;
@ -63,12 +64,12 @@
&:active { &:active {
&::after { &::after {
position: absolute; position: absolute;
content: '';
inset: 0;
pointer-events: none; pointer-events: none;
background-color: transparent; background-color: transparent;
border: 1px solid var(--node-hover-border-color) !important; border: 1px solid var(--node-hover-border-color) !important;
border-radius: var(--border-radius); border-radius: var(--border-radius);
content: '';
inset: 0;
} }
} }
} }

View File

@ -1,3 +1,4 @@
/* stylelint-disable */
.ProseMirror { .ProseMirror {
hr.selected-node { hr.selected-node {
background-color: var(--node-selected-border-color); background-color: var(--node-selected-border-color);
@ -48,10 +49,10 @@
&::after { &::after {
position: absolute; position: absolute;
pointer-events: none;
background-color: rgb(179 212 255 / 30%);
content: ''; content: '';
inset: 0; inset: 0;
pointer-events: none;
background-color: rgba(179, 212, 255, 0.3);
} }
} }
} }
@ -70,12 +71,12 @@
&::after { &::after {
position: absolute; position: absolute;
content: '';
inset: 0;
pointer-events: none; pointer-events: none;
background-color: rgba(179, 212, 255, 0.3); background-color: rgb(179 212 255 / 30%);
border: 1px solid var(--node-selected-border-color) !important; border: 1px solid var(--node-selected-border-color) !important;
border-radius: var(--border-radius); border-radius: var(--border-radius);
content: '';
inset: 0;
} }
} }
} }

View File

@ -1,15 +1,15 @@
.ProseMirror { .ProseMirror {
.tableWrapper { .tableWrapper {
margin: 0;
padding: 0; padding: 0;
margin: 0;
} }
table { table {
border-collapse: collapse;
overflow: hidden;
table-layout: fixed;
width: 100%; width: 100%;
margin: 0.75em 0 0; margin: 0.75em 0 0;
overflow: hidden;
border-collapse: collapse;
table-layout: fixed;
td, td,
th { th {
@ -55,12 +55,7 @@
} }
} }
.tableWrapper {
padding: 1rem 0;
overflow-x: auto;
}
.resize-cursor { .resize-cursor {
cursor: ew-resize; cursor: ew-resize;
cursor: col-resize; cursor: col-resize; /* stylelint-disable declaration-block-no-duplicate-properties */
} }

View File

@ -1,17 +1,20 @@
.ProseMirror { .ProseMirror {
--node-text-color: rgba(3, 3, 3, 0.8); --node-text-color: rgb(3 3 3 / 80%);
--node-hover-text-color: rgb(0 101 255); --node-hover-text-color: rgb(0 101 255);
/* 自定义节点 边框 */ /* 自定义节点 边框 */
--node-border-color: rgb(28 31 35 / 8%); --node-border-color: rgb(28 31 35 / 8%);
/* 自定义节点 hover */ /* 自定义节点 hover */
--node-hover-border-color: rgb(0 101 255); --node-hover-border-color: rgb(0 101 255);
/* 自定义节点选中 */ /* 自定义节点选中 */
--node-selected-border-color: rgb(0 101 255); --node-selected-border-color: rgb(0 101 255);
} }
body[theme-mode='dark'] { body[theme-mode='dark'] {
.ProseMirror { .ProseMirror {
--node-text-color: rgba(249, 249, 249, 0.8); --node-text-color: rgb(249 249 249 / 80%);
--node-border-color: rgb(255, 255, 255, 0.08); --node-border-color: rgb(255 255 255 / 8%);
} }
} }

View File

@ -1,9 +1,9 @@
.playerWrap { .playerWrap {
width: 100%;
display: flex; display: flex;
width: 100%;
padding: 12px;
justify-content: center; justify-content: center;
border-top: 1px solid var(--node-border-color); border-top: 1px solid var(--node-border-color);
padding: 12px;
> video { > video {
width: 100%; width: 100%;

View File

@ -18,8 +18,8 @@
} }
.react-pdf__Page canvas { .react-pdf__Page canvas {
max-width: 100%;
height: auto !important; height: auto !important;
max-width: 100%;
} }
.react-pdf__message { .react-pdf__message {
@ -29,9 +29,9 @@
} }
.paginationWrap { .paginationWrap {
display: flex;
margin-top: 1em; margin-top: 1em;
text-align: center; text-align: center;
display: flex;
justify-content: center; justify-content: center;
} }
} }

View File

@ -4,7 +4,7 @@
border-radius: var(--border-radius); border-radius: var(--border-radius);
p { p {
margin-top: 0.25em; margin-top: .25em;
} }
p:first-child { p:first-child {

View File

@ -1,6 +1,6 @@
.wrap { .wrap {
position: relative; position: relative;
margin-top: 0.75em; margin-top: .75em;
.handleWrap { .handleWrap {
display: flex; display: flex;

View File

@ -1,12 +1,11 @@
.wrap { .wrap {
display: flex;
height: 96px; height: 96px;
overflow: hidden; overflow: hidden;
line-height: 0; line-height: 0;
background-color: var(--semi-color-fill-0); background-color: var(--semi-color-fill-0);
border: 1px solid var(--node-border-color); border: 1px solid var(--node-border-color);
border-radius: var(--border-radius); border-radius: var(--border-radius);
display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
flex-direction: column; flex-direction: column;

View File

@ -1,6 +1,6 @@
.wrap { .wrap {
padding: 12px; padding: 12px;
margin-top: 0.75em; margin-top: .75em;
border: 1px solid var(--node-border-color); border: 1px solid var(--node-border-color);
border-radius: var(--border-radius); border-radius: var(--border-radius);

View File

@ -1,5 +1,5 @@
.wrap { .wrap {
margin-top: 0.75em; margin-top: .75em;
border-radius: var(--border-radius); border-radius: var(--border-radius);
.itemWrap { .itemWrap {

View File

@ -23,8 +23,8 @@
} }
.emptyWrap { .emptyWrap {
height: 100%;
display: flex; display: flex;
height: 100%;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }