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",
"typescript": "^4.5.5"
},
"pre-commit": "lint"
"pre-commit": "format"
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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