From 98eef5f1728fe53af2202d604a7b0a5051814e7e Mon Sep 17 00:00:00 2001 From: Igor Lobanov Date: Mon, 31 Oct 2022 14:39:35 +0100 Subject: [PATCH] lint --- src/components/Editor/styles/Editor.scss | 37 ++++++++---------- src/components/Editor/styles/Error.scss | 1 + src/components/Editor/styles/Sidebar.scss | 47 +++++++++++------------ 3 files changed, 39 insertions(+), 46 deletions(-) diff --git a/src/components/Editor/styles/Editor.scss b/src/components/Editor/styles/Editor.scss index d735bb7d..c50360db 100644 --- a/src/components/Editor/styles/Editor.scss +++ b/src/components/Editor/styles/Editor.scss @@ -7,7 +7,7 @@ padding-top: 1em; a { - color: rgb(0, 100, 200); + color: rgb(0 100 200); text-decoration: none; } @@ -16,7 +16,7 @@ } a:visited { - color: rgb(0, 80, 160); + color: rgb(0 80 160); } } @@ -32,7 +32,7 @@ textarea { font-size: inherit; -webkit-padding: 0.4em 0; padding: 0.4em; - margin: 0 0 0.5em 0; + margin: 0 0 0.5em; box-sizing: border-box; border: 1px solid #ccc; border-radius: 2px; @@ -66,7 +66,7 @@ button:focus { position: relative; word-wrap: break-word; white-space: pre-wrap; - -webkit-font-variant-ligatures: none; + font-variant-ligatures: none; font-variant-ligatures: none; outline: none; margin: 1em 1em 1em 0; @@ -121,12 +121,14 @@ button:focus { blockquote { border-left: 2px solid; @include font-size(1.6rem); + margin: 1.5em 0; padding-left: 1.6em; } } .ProseMirror-menuitem { + display: flex; font-size: small; &:hover { @@ -157,15 +159,10 @@ button:focus { } .ProseMirror-tooltip .ProseMirror-menu { - width: -webkit-fit-content; width: fit-content; white-space: pre; } -.ProseMirror-menuitem { - display: flex; -} - .ProseMirror-menuseparator { border-right: 1px solid #ddd; } @@ -189,11 +186,11 @@ button:focus { position: relative; } -.ProseMirror-menu-dropdown:after { +.ProseMirror-menu-dropdown::after { content: ''; border-left: 4px solid transparent; border-right: 4px solid transparent; - border-top: 4px solid currentColor; + border-top: 4px solid currentcolor; opacity: 0.6; position: absolute; right: 4px; @@ -211,6 +208,7 @@ button:focus { .ProseMirror-menu-dropdown-menu { z-index: 15; + /* min-width: 6em; */ } @@ -228,11 +226,11 @@ button:focus { margin-right: -4px; } -.ProseMirror-menu-submenu-label:after { +.ProseMirror-menu-submenu-label::after { content: ''; border-top: 4px solid transparent; border-bottom: 4px solid transparent; - border-left: 4px solid currentColor; + border-left: 4px solid currentcolor; opacity: 0.6; position: absolute; right: 4px; @@ -273,7 +271,6 @@ button:focus { border-bottom: 1px solid silver; background: white; z-index: 10; - -moz-box-sizing: border-box; box-sizing: border-box; overflow: visible; } @@ -288,7 +285,7 @@ button:focus { } .ProseMirror-icon svg { - fill: currentColor; + fill: currentcolor; height: 1em; } @@ -308,10 +305,6 @@ button:focus { background: transparent; } -.ProseMirror-hideselection *::-moz-selection { - background: transparent; -} - .ProseMirror-hideselection { caret-color: transparent; } @@ -325,7 +318,7 @@ li.ProseMirror-selectednode { outline: none; } -li.ProseMirror-selectednode:after { +li.ProseMirror-selectednode::after { content: ''; position: absolute; left: -32px; @@ -355,7 +348,7 @@ li.ProseMirror-selectednode:after { .ProseMirror-prompt { background: #fff; - box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25); + box-shadow: 0 4px 10px rgb(0 0 0 / 25%); font-size: 0.7em; position: absolute; } @@ -400,7 +393,7 @@ li.ProseMirror-selectednode:after { .tooltip { background: #fff; - box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25); + box-shadow: 0 4px 10px rgb(0 0 0 / 25%); color: #000; display: flex; position: absolute; diff --git a/src/components/Editor/styles/Error.scss b/src/components/Editor/styles/Error.scss index 1a8973d6..8b777fc0 100644 --- a/src/components/Editor/styles/Error.scss +++ b/src/components/Editor/styles/Error.scss @@ -4,6 +4,7 @@ padding: 50px; display: flex; justify-content: center; + ::-webkit-scrollbar { display: none; } diff --git a/src/components/Editor/styles/Sidebar.scss b/src/components/Editor/styles/Sidebar.scss index abf302ac..be21a40a 100644 --- a/src/components/Editor/styles/Sidebar.scss +++ b/src/components/Editor/styles/Sidebar.scss @@ -1,7 +1,7 @@ .sidebar-container { - color: rgba(255, 255, 255, 0.5); - font-family: 'Muller'; + color: rgb(255 255 255 / 50%); @include font-size(1.6rem); + overflow: hidden; position: relative; top: 0; @@ -9,6 +9,19 @@ p { color: var(--foreground); } + + h4 { + @include font-size(120%); + + margin-left: 1rem; + } + + button { + height: auto; + min-height: 50px; + padding: 0 1rem; + width: 100%; + } } .sidebar-off { @@ -44,7 +57,7 @@ opacity: 0.5; } - &:after { + &::after { background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='mask0_1090_23825' style='mask-type:alpha' maskUnits='userSpaceOnUse' x='0' y='14' width='4' height='4'%3E%3Crect y='14.8237' width='3.17647' height='3.17647' fill='%23fff'/%3E%3C/mask%3E%3Cg mask='url(%23mask0_1090_23825)'%3E%3Cpath d='M16.0941 1.05908H0.847027C0.379194 1.05908 0 1.43828 0 1.90611V18.0003L3.38824 14.612H16.0942C16.562 14.612 16.9412 14.2328 16.9412 13.765V1.90614C16.9412 1.43831 16.562 1.05912 16.0942 1.05912L16.0941 1.05908ZM15.2471 12.9179H1.69412V2.7532H15.2471V12.9179Z' fill='black'/%3E%3C/g%3E%3Crect x='1' y='1' width='16' height='12.8235' stroke='black' stroke-width='2'/%3E%3Crect x='4.23535' y='3.17627' width='9.52941' height='2.11765' fill='black'/%3E%3Crect x='4.23535' y='9.5293' width='7.41176' height='2.11765' fill='black'/%3E%3Crect x='4.23535' y='6.35303' width='5.29412' height='2.11765' fill='black'/%3E%3C/svg%3E"); content: ''; height: 18px; @@ -74,6 +87,7 @@ .sidebar-label { color: var(--foreground) #7f7f7f; + > i { text-transform: none; } @@ -83,16 +97,15 @@ margin: 10px 0; margin-bottom: 30px; } + .sidebar-container button, .sidebar-container a, .sidebar-item { - text-align: left; margin: 0; outline: none; display: flex; align-items: center; line-height: 24px; - font-family: 'Muller'; text-align: left; } @@ -103,20 +116,6 @@ width: 100%; } -.sidebar-container { - h4 { - @include font-size(120%); - margin-left: 1rem; - } - - button { - height: auto; - min-height: 50px; - padding: 0 1rem; - width: 100%; - } -} - .sidebar-link { background: none; border: 0; @@ -143,7 +142,7 @@ } &.draft { - color: rgba(255, 255, 255, 0.5); + color: rgb(255 255 255 / 50%); line-height: 1.4; margin: 0 0 1em 1.5em; width: calc(100% - 2rem); @@ -176,8 +175,8 @@ } .theme-switcher { - border-bottom: 1px solid rgba(255, 255, 255, 0.3); - border-top: 1px solid rgba(255, 255, 255, 0.3); + border-bottom: 1px solid rgb(255 255 255 / 30%); + border-top: 1px solid rgb(255 255 255 / 30%); display: flex; justify-content: space-between; margin: 1rem; @@ -202,7 +201,7 @@ transition: background-color 0.3s; width: 46px; - &:before { + &::before { background-color: #fff; border-radius: 100%; content: ''; @@ -218,7 +217,7 @@ &:checked + label { background-color: #fff; - &:before { + &::before { background-color: #1f1f1f; left: 24px; }