From fba88ae24c3a836f41c66eedbe88123c81568820 Mon Sep 17 00:00:00 2001 From: YunYouJun Date: Sun, 5 Sep 2021 00:55:06 +0800 Subject: [PATCH] refactor: remove vite & extract common css --- view/dark.css | 53 ++++------------------------------------------- view/index.css | 53 +++++++++++++++++++++++++++++++++++++++++++++++ view/index.html | 3 ++- view/style.css | 55 +------------------------------------------------ view/test.html | 3 ++- 5 files changed, 62 insertions(+), 105 deletions(-) create mode 100644 view/index.css diff --git a/view/dark.css b/view/dark.css index bc888e31..a9e32807 100644 --- a/view/dark.css +++ b/view/dark.css @@ -1,55 +1,10 @@ -@media (min-width:640px){html{font-size:24px;}} -@media (min-width:631px) and (max-width:639px){html{font-size:23.66px;}} -@media (min-width:622px) and (max-width:630px){html{font-size:23.33px;}} -@media (min-width:613px) and (max-width:621px){html{font-size:23px;}} -@media (min-width:604px) and (max-width:612px){html{font-size:22.66px;}} -@media (min-width:595px) and (max-width:603px){html{font-size:22.33px;}} -@media (min-width:586px) and (max-width:594px){html{font-size:22px;}} -@media (min-width:577px) and (max-width:585px){html{font-size:21.66px;}} -@media (min-width:568px) and (max-width:576px){html{font-size:21.33px;}} -@media (min-width:559px) and (max-width:567px){html{font-size:21px;}} -@media (min-width:550px) and (max-width:558px){html{font-size:20.66px;}} -@media (min-width:541px) and (max-width:549px){html{font-size:20.33px;}} -@media (min-width:533px) and (max-width:540px){html{font-size:20px;}} -@media (min-width:524px) and (max-width:532px){html{font-size:19.66px;}} -@media (min-width:515px) and (max-width:523px){html{font-size:19.33px;}} -@media (min-width:506px) and (max-width:514px){html{font-size:19px;}} -@media (min-width:497px) and (max-width:505px){html{font-size:18.66px;}} -@media (min-width:488px) and (max-width:496px){html{font-size:18.33px;}} -@media (min-width:480px) and (max-width:487px){html{font-size:18px;}} -@media (min-width:471px) and (max-width:479px){html{font-size:17.66px;}} -@media (min-width:462px) and (max-width:470px){html{font-size:17.33px;}} -@media (min-width:453px) and (max-width:461px){html{font-size:17px;}} -@media (min-width:444px) and (max-width:452px){html{font-size:17.12px;}} -@media (min-width:435px) and (max-width:443px){html{font-size:16.33px;}} -@media (min-width:426px) and (max-width:434px){html{font-size:16px;}} -@media (min-width:417px) and (max-width:425px){html{font-size:15.66px;}} -@media (min-width:408px) and (max-width:416px){html{font-size:15.33px;}} -@media (min-width:400px) and (max-width:407px){html{font-size:15px;}} -@media (min-width:391px) and (max-width:399px){html{font-size:14.66px;}} -@media (min-width:382px) and (max-width:390px){html{font-size:14.33px;}} -@media (min-width:374px) and (max-width:381px){html{font-size:14px;}} -@media (min-width:365px) and (max-width:373px){html{font-size:13.66px;}} -@media (min-width:356px) and (max-width:364px){html{font-size:13.33px;}} -@media (min-width:347px) and (max-width:355px){html{font-size:13px;}} -@media (min-width:338px) and (max-width:346px){html{font-size:12.66px;}} -@media (min-width:329px) and (max-width:337px){html{font-size:12.44px;}} -@media (max-width:328px){html{font-size:12px;}} - -@font-face { - font-family: 'iconfont'; - src: url('iconfont.woff2?t=1628944689555') format('woff2'), - url('iconfont.woff?t=1628944689555') format('woff'), - url('iconfont.ttf?t=1628944689555') format('truetype'); +:root { + /* liferestart css var */ + --lr-background-color: #222831; } html { background-color: #222831; - font-family: PingFangSC, 'Noto Sans CJK SC', 'MS Yahei'; -} - -body { - user-select: none; } #main { @@ -531,4 +486,4 @@ i { ::-webkit-scrollbar { width: 0 !important -} \ No newline at end of file +} diff --git a/view/index.css b/view/index.css new file mode 100644 index 00000000..8d39ae8c --- /dev/null +++ b/view/index.css @@ -0,0 +1,53 @@ +@media (min-width:640px){html{font-size:24px;}} +@media (min-width:631px) and (max-width:639px){html{font-size:23.66px;}} +@media (min-width:622px) and (max-width:630px){html{font-size:23.33px;}} +@media (min-width:613px) and (max-width:621px){html{font-size:23px;}} +@media (min-width:604px) and (max-width:612px){html{font-size:22.66px;}} +@media (min-width:595px) and (max-width:603px){html{font-size:22.33px;}} +@media (min-width:586px) and (max-width:594px){html{font-size:22px;}} +@media (min-width:577px) and (max-width:585px){html{font-size:21.66px;}} +@media (min-width:568px) and (max-width:576px){html{font-size:21.33px;}} +@media (min-width:559px) and (max-width:567px){html{font-size:21px;}} +@media (min-width:550px) and (max-width:558px){html{font-size:20.66px;}} +@media (min-width:541px) and (max-width:549px){html{font-size:20.33px;}} +@media (min-width:533px) and (max-width:540px){html{font-size:20px;}} +@media (min-width:524px) and (max-width:532px){html{font-size:19.66px;}} +@media (min-width:515px) and (max-width:523px){html{font-size:19.33px;}} +@media (min-width:506px) and (max-width:514px){html{font-size:19px;}} +@media (min-width:497px) and (max-width:505px){html{font-size:18.66px;}} +@media (min-width:488px) and (max-width:496px){html{font-size:18.33px;}} +@media (min-width:480px) and (max-width:487px){html{font-size:18px;}} +@media (min-width:471px) and (max-width:479px){html{font-size:17.66px;}} +@media (min-width:462px) and (max-width:470px){html{font-size:17.33px;}} +@media (min-width:453px) and (max-width:461px){html{font-size:17px;}} +@media (min-width:444px) and (max-width:452px){html{font-size:17.12px;}} +@media (min-width:435px) and (max-width:443px){html{font-size:16.33px;}} +@media (min-width:426px) and (max-width:434px){html{font-size:16px;}} +@media (min-width:417px) and (max-width:425px){html{font-size:15.66px;}} +@media (min-width:408px) and (max-width:416px){html{font-size:15.33px;}} +@media (min-width:400px) and (max-width:407px){html{font-size:15px;}} +@media (min-width:391px) and (max-width:399px){html{font-size:14.66px;}} +@media (min-width:382px) and (max-width:390px){html{font-size:14.33px;}} +@media (min-width:374px) and (max-width:381px){html{font-size:14px;}} +@media (min-width:365px) and (max-width:373px){html{font-size:13.66px;}} +@media (min-width:356px) and (max-width:364px){html{font-size:13.33px;}} +@media (min-width:347px) and (max-width:355px){html{font-size:13px;}} +@media (min-width:338px) and (max-width:346px){html{font-size:12.66px;}} +@media (min-width:329px) and (max-width:337px){html{font-size:12.44px;}} +@media (max-width:328px){html{font-size:12px;}} + +@font-face { + font-family: 'iconfont'; + src: url('iconfont.woff2?t=1628944689555') format('woff2'), + url('iconfont.woff?t=1628944689555') format('woff'), + url('iconfont.ttf?t=1628944689555') format('truetype'); +} + +html { + background-color: var(--lr-background-color); + font-family: PingFangSC, 'Noto Sans CJK SC', 'MS Yahei'; +} + +body { + user-select: none; +} diff --git a/view/index.html b/view/index.html index 988526f3..7200eebf 100644 --- a/view/index.html +++ b/view/index.html @@ -6,6 +6,7 @@ + @@ -48,4 +49,4 @@ }); } - \ No newline at end of file + diff --git a/view/style.css b/view/style.css index 6f21d5de..1ba563a6 100644 --- a/view/style.css +++ b/view/style.css @@ -1,56 +1,3 @@ -@media (min-width:640px){html{font-size:24px;}} -@media (min-width:631px) and (max-width:639px){html{font-size:23.66px;}} -@media (min-width:622px) and (max-width:630px){html{font-size:23.33px;}} -@media (min-width:613px) and (max-width:621px){html{font-size:23px;}} -@media (min-width:604px) and (max-width:612px){html{font-size:22.66px;}} -@media (min-width:595px) and (max-width:603px){html{font-size:22.33px;}} -@media (min-width:586px) and (max-width:594px){html{font-size:22px;}} -@media (min-width:577px) and (max-width:585px){html{font-size:21.66px;}} -@media (min-width:568px) and (max-width:576px){html{font-size:21.33px;}} -@media (min-width:559px) and (max-width:567px){html{font-size:21px;}} -@media (min-width:550px) and (max-width:558px){html{font-size:20.66px;}} -@media (min-width:541px) and (max-width:549px){html{font-size:20.33px;}} -@media (min-width:533px) and (max-width:540px){html{font-size:20px;}} -@media (min-width:524px) and (max-width:532px){html{font-size:19.66px;}} -@media (min-width:515px) and (max-width:523px){html{font-size:19.33px;}} -@media (min-width:506px) and (max-width:514px){html{font-size:19px;}} -@media (min-width:497px) and (max-width:505px){html{font-size:18.66px;}} -@media (min-width:488px) and (max-width:496px){html{font-size:18.33px;}} -@media (min-width:480px) and (max-width:487px){html{font-size:18px;}} -@media (min-width:471px) and (max-width:479px){html{font-size:17.66px;}} -@media (min-width:462px) and (max-width:470px){html{font-size:17.33px;}} -@media (min-width:453px) and (max-width:461px){html{font-size:17px;}} -@media (min-width:444px) and (max-width:452px){html{font-size:17.12px;}} -@media (min-width:435px) and (max-width:443px){html{font-size:16.33px;}} -@media (min-width:426px) and (max-width:434px){html{font-size:16px;}} -@media (min-width:417px) and (max-width:425px){html{font-size:15.66px;}} -@media (min-width:408px) and (max-width:416px){html{font-size:15.33px;}} -@media (min-width:400px) and (max-width:407px){html{font-size:15px;}} -@media (min-width:391px) and (max-width:399px){html{font-size:14.66px;}} -@media (min-width:382px) and (max-width:390px){html{font-size:14.33px;}} -@media (min-width:374px) and (max-width:381px){html{font-size:14px;}} -@media (min-width:365px) and (max-width:373px){html{font-size:13.66px;}} -@media (min-width:356px) and (max-width:364px){html{font-size:13.33px;}} -@media (min-width:347px) and (max-width:355px){html{font-size:13px;}} -@media (min-width:338px) and (max-width:346px){html{font-size:12.66px;}} -@media (min-width:329px) and (max-width:337px){html{font-size:12.44px;}} -@media (max-width:328px){html{font-size:12px;}} - -@font-face { - font-family: 'iconfont'; - src: url('iconfont.woff2?t=1628944689555') format('woff2'), - url('iconfont.woff?t=1628944689555') format('woff'), - url('iconfont.ttf?t=1628944689555') format('truetype'); -} - -html { - font-family: PingFangSC, 'Noto Sans CJK SC', 'MS Yahei'; -} - -body { - user-select: none; -} - #main { align-content: center; width: 100%; @@ -519,4 +466,4 @@ i { ::-webkit-scrollbar { width: 0 !important -} \ No newline at end of file +} diff --git a/view/test.html b/view/test.html index 6f209278..a70f9c03 100644 --- a/view/test.html +++ b/view/test.html @@ -6,6 +6,7 @@ + @@ -35,4 +36,4 @@ - \ No newline at end of file +