瀏覽代碼

Maybe fixed the issue with switches. Can't test on a phone.

Lee Morgan 6 月之前
父節點
當前提交
cdda9bfb6e
共有 2 個文件被更改,包括 13 次插入8 次删除
  1. 1 1
      src/views/createHtml.js
  2. 12 7
      src/views/css/index.css

+ 1 - 1
src/views/createHtml.js

@@ -4,7 +4,7 @@ import htmlMinifier from "html-minifier-terser";
 import fsSync from "fs";
 
 const fs = fsSync.promises;
-const isProduction = false;
+const isProduction = true;
 
 const esbuildProm = esbuild.build({
     entryPoints: [`${import.meta.dirname}/js/index.js`, `${import.meta.dirname}/css/index.css`],

+ 12 - 7
src/views/css/index.css

@@ -190,16 +190,20 @@ body{
 }
 
 .switch{
-  position: relative;
-  display: inline-block;
-  width: 50px;
-  height: 28px;
+    position: relative;
+    display: inline-block;
+    width: 50px;
+    height: 28px;
 }
 
 .switch input{
-  opacity: 0;
-  width: 0;
-  height: 0;
+    position: absolute;
+    inset: 0;
+    opacity: 0;
+    width: 100%;
+    height: 100%;
+    margin: 0;
+    z-index: 2;
 }
 
 .slider{
@@ -212,6 +216,7 @@ body{
   background-color: var(--textMuted, #ccc);
   transition: 0.15s;
   border-radius: 34px;
+  z-index: 1;
 }
 
 .slider::before{