Browse Source

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

Lee Morgan 6 tháng trước cách đây
mục cha
commit
cdda9bfb6e
2 tập tin đã thay đổi với 13 bổ sung8 xóa
  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{