From 9a3923a934fe5360ec1adc8510b266e64bc2c62a Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Fri, 3 Sep 2021 13:55:54 +0800 Subject: [PATCH] Merge editor_mobile.css --- _server/css/editor_mobile.css | 22 +++++++++++++--------- libs/core.js | 1 + 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/_server/css/editor_mobile.css b/_server/css/editor_mobile.css index 78604c15..44fe8651 100644 --- a/_server/css/editor_mobile.css +++ b/_server/css/editor_mobile.css @@ -1,5 +1,9 @@ /** editor **/ +:root { + --size: 13; +} + html{ font-size: 4vw; } @@ -276,14 +280,14 @@ table.col, div.col { #mapColMark .coltd, #mapColMark .coltd .coltext { position: absolute; - width: 7.15vw; + width: calc(93vw / var(--size)); height: 4vw; line-height: 4vw; padding: 0; border-bottom-width: 0px; border-top-width: 0px; - border-left-width: 0.117307vw; - border-right-width: 0.117307vw; + border-left-width: calc(1.5vw / var(--size)); + border-right-width: calc(1.5vw / var(--size)); } #mapColMark .coltd:hover .colBlock { @@ -291,7 +295,7 @@ table.col, div.col { top: 4vw; left:0; height: 96vw; - width: 7.384615vw; + width: calc(96vw / var(--size)); z-index: 100; } @@ -328,20 +332,20 @@ table.row,div.row .rowtext { #mapRowMark .rowtd, #mapRowMark .rowtd .rowtext{ - height: 7.15vw; - line-height: 7.15vw; + height: calc(93vw / var(--size)); + line-height: calc(93vw / var(--size)); padding: 0; border-left-width: 0px; border-right-width: 0px; - border-top-width: 0.117307vw; - border-bottom-width: 0.117397vw; + border-top-width: calc(1.5vw / var(--size)); + border-bottom-width: calc(1.5vw / var(--size)); } #mapRowMark .rowtd:hover .rowBlock { position: absolute; left: 4vw; top: 0; - height: 7.384615vw; + height: calc(96vw / var(--size)); width: 96vw; z-index: 100; } diff --git a/libs/core.js b/libs/core.js index c32843b1..9d405bf2 100644 --- a/libs/core.js +++ b/libs/core.js @@ -252,6 +252,7 @@ function core() { this.dymCanvas = {}; if (main.mode == 'editor') { + document.documentElement.style.setProperty('--size', this.__SIZE__); document.documentElement.style.setProperty('--pixel', this.__PIXELS__ + 'px'); } }