From 4c0b0294308179727ae00928d83a793478ba2c09 Mon Sep 17 00:00:00 2001 From: YangQi Date: Tue, 9 Aug 2022 20:13:40 +0800 Subject: [PATCH] perf: optimizing css (#180) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除不会生效、无效的片段 - 调整部分属性的书写顺序 - 移除不再使用的图片 --- src/App.vue | 34 ++--- src/assets/images/light.png | Bin 2429 -> 0 bytes src/assets/images/night.png | Bin 2433 -> 0 bytes .../CodemirrorEditor/EditorHeader.vue | 139 ++++++------------ .../CodemirrorEditor/RightClickMenu.vue | 22 +-- 5 files changed, 69 insertions(+), 126 deletions(-) delete mode 100644 src/assets/images/light.png delete mode 100644 src/assets/images/night.png diff --git a/src/App.vue b/src/App.vue index 0789046..9421389 100644 --- a/src/App.vue +++ b/src/App.vue @@ -24,7 +24,7 @@ body, ::-webkit-scrollbar { width: 6px; height: 6px; - background-color: #fff; + background-color: #ffffff; } ::-webkit-scrollbar-track { @@ -35,47 +35,39 @@ body, ::-webkit-scrollbar-thumb { border-radius: 6px; background-color: rgba(144, 146, 152, 0.5); - transition: background-color 0.3s; } -::-webkit-scrollbar-thumb:hover { - background-color: rgba(144, 146, 152, 0.5); -} /* CSS-hints */ .CodeMirror-hints { position: absolute; z-index: 10; - overflow: hidden; - list-style: none; - + overflow-y: auto; margin: 0; padding: 2px; - border-radius: 4px; - background-color: #ffffff; - box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.12), 0 2px 4px 0 rgba(0, 0, 0, 0.08); + max-height: 20em; min-width: 200px; font-size: 12px; font-family: monospace; - max-height: 20em; - overflow-y: auto; color: #333333; + background-color: #ffffff; + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.12), 0 2px 4px 0 rgba(0, 0, 0, 0.08); } .CodeMirror-hint { - margin: 0; margin-top: 10px; padding: 4px 6px; border-radius: 2px; white-space: pre; - color: black; + color: #000000; cursor: pointer; -} -.CodeMirror-hint:first-of-type { - margin-top: 0; -} -.CodeMirror-hint:hover { - background: #f0f0f0; + + &:first-of-type { + margin-top: 0; + } + &:hover { + background: #f0f0f0; + } } diff --git a/src/assets/images/light.png b/src/assets/images/light.png deleted file mode 100644 index 844c253e11c4eabe29f35c2a44148e9a49fec78f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2429 zcmZ{mc{J1w7sr1XOA{G2StrIm)+|G23}#}Cy<~re3L(jZF{G3RSq5pW;jv~HDvj(a z+l=KITL@*Ok!*P?k|dA!uip2M_nhy&-*fLhpL4!{Ug}vpf)H2|3;=+TrG?qK184rH z1V9I!-`@B5fr0#Rwm1NIa_{g@Pu_zW?rm|-765K20RZI=0Q@*uQ9c4dm=*x6Tm%4g z4giP+=eOEp4i4O2)&w(PKjGfca{v&?u{6UuM$D`i1YA9ihcZrSpGGE{k609oILN#f zmv&ZsprqFsFzzbU#jjv~S;fLaL=j>$Q=E7Y!YL6*61XBH{Lm4n;PpP1nE*~a&f_9a zzQ%H|T9kc>7_F7T_KbBH?zV0Zt?l17W@khWZxo_*{rvpY568d-eyjM7PtkV3?a0R- z=E6yzNv%1WeWN_&ztndY8zw_V3NV)L8FkR{MbeKvG;>SeGg*UvrviPPHIewo+RDfK zb;YPnA59Rd4v$Q1TTd40PaN1BN_|lNN>b9yWjE#nwGA>A96MfzJo5`Cm82V(kYjra z-o?d-xDnH71?rVhGO28hy)Qe{sbv-mwd^(sTt|K#iAzKai|?}--_ChdC_iB1U%5;! z$@KXn*rOmVgJT4}bropJ_*vu9NL*Kg`gOxV1Ttm(Tiz|7*2-siIz=cYBOGg-I~QGJ z^{YpaQT=kTQ|0dT=nIiPm0eroLRIng-d8>13`?T_HsfsXU{qNRa=vPmyYIQPH##-< zk9WcS<+)0aP%Dky@6y#)wI40$i~OktA%w@*8!#1JFg|~*iiqlA6@et<8lyj0|-&)Un@;aYR1cU(_e9cHzKGqKr# z5t(^E`Ru&p`^&3%;^91*Ao6}ke#xfuAI@F`Upyxi#Q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