chore: 整理样式

This commit is contained in:
maotoumao
2025-06-28 19:51:09 +08:00
parent e04de48a9b
commit 4c88d04e94
11 changed files with 229 additions and 3 deletions

View File

@@ -6,7 +6,7 @@ import { useEffect } from "react";
import "animate.css";
import "rc-slider/assets/index.css";
import "react-toastify/dist/ReactToastify.css";
import "@/styles/index.scss"; // 全局样式
import "./styles/index.scss"; // 全局样式
import WindowDrag from "@shared/window-drag/renderer";
bootstrap().then(() => {

View File

@@ -0,0 +1,113 @@
html,
body,
#root {
margin: 0;
width: 100vw;
height: 100vh;
overflow: hidden;
}
::-webkit-scrollbar {
width: var(--scrollbar-width, 8px);
height: 8px;
}
::-webkit-scrollbar-thumb {
background-color: #b2b2b2;
border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
background-color: #a0a0a0;
}
::-webkit-scrollbar-thumb:active {
background-color: #a0a0a0;
}
::-webkit-scrollbar-track {
background-color: rgba(0, 0, 0, 0.1);
}
.blur10 {
backdrop-filter: blur(10px);
}
.opacity-button {
opacity: 0.6;
&:hover {
opacity: 1;
}
}
.highlight {
color: var(--primaryColor) !important;
}
input {
outline: none;
font-size: 1rem;
padding: 0.4rem 0.6rem;
border-radius: 2px;
border: 1px solid var(--dividerColor);
box-sizing: border-box;
&::placeholder {
opacity: 0.6;
}
}
div[role="button"] {
cursor: pointer;
user-select: none;
&[data-disabled]:not([data-disabled="false"]) {
cursor: default;
opacity: 0.5;
pointer-events: none;
}
&[data-type="primaryButton"] {
background-color: var(--primaryColor);
font-size: 1em;
padding: 0.4em 1em;
border-radius: 1.6em;
color: white;
width: fit-content;
line-height: 1em;
}
&[data-type="normalButton"] {
font-size: 1em;
padding: 0.4em 1em;
border-radius: 1.6em;
color: var(--textColor);
border: 1px solid currentColor;
width: fit-content;
line-height: 1em;
}
&[data-type="dangerButton"] {
font-size: 1em;
padding: 0.4em 1em;
border-radius: 1.6em;
color: #fc5f5f;
border: 1px solid currentColor;
width: fit-content;
line-height: 1em;
&[data-fill="true"] {
color: white;
background: #fc5f5f;
}
}
}
.divider {
width: 100%;
height: 1px;
background-color: var(--dividerColor);
margin-top: 12px;
margin-bottom: 12px;
}

View File

@@ -8,7 +8,7 @@ import { useEffect } from "react";
import "animate.css";
import "rc-slider/assets/index.css";
import "react-toastify/dist/ReactToastify.css";
import "@/styles/index.scss"; // 全局样式
import "./styles/index.scss"; // 全局样式
import WindowDrag from "@shared/window-drag/renderer";
bootstrap().then(() => {

View File

@@ -0,0 +1,113 @@
html,
body,
#root {
margin: 0;
width: 100vw;
height: 100vh;
overflow: hidden;
}
::-webkit-scrollbar {
width: var(--scrollbar-width, 8px);
height: 8px;
}
::-webkit-scrollbar-thumb {
background-color: #b2b2b2;
border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
background-color: #a0a0a0;
}
::-webkit-scrollbar-thumb:active {
background-color: #a0a0a0;
}
::-webkit-scrollbar-track {
background-color: rgba(0, 0, 0, 0.1);
}
.blur10 {
backdrop-filter: blur(10px);
}
.opacity-button {
opacity: 0.6;
&:hover {
opacity: 1;
}
}
.highlight {
color: var(--primaryColor) !important;
}
input {
outline: none;
font-size: 1rem;
padding: 0.4rem 0.6rem;
border-radius: 2px;
border: 1px solid var(--dividerColor);
box-sizing: border-box;
&::placeholder {
opacity: 0.6;
}
}
div[role="button"] {
cursor: pointer;
user-select: none;
&[data-disabled]:not([data-disabled="false"]) {
cursor: default;
opacity: 0.5;
pointer-events: none;
}
&[data-type="primaryButton"] {
background-color: var(--primaryColor);
font-size: 1em;
padding: 0.4em 1em;
border-radius: 1.6em;
color: white;
width: fit-content;
line-height: 1em;
}
&[data-type="normalButton"] {
font-size: 1em;
padding: 0.4em 1em;
border-radius: 1.6em;
color: var(--textColor);
border: 1px solid currentColor;
width: fit-content;
line-height: 1em;
}
&[data-type="dangerButton"] {
font-size: 1em;
padding: 0.4em 1em;
border-radius: 1.6em;
color: #fc5f5f;
border: 1px solid currentColor;
width: fit-content;
line-height: 1em;
&[data-fill="true"] {
color: white;
background: #fc5f5f;
}
}
}
.divider {
width: 100%;
height: 1px;
background-color: var(--dividerColor);
margin-top: 12px;
margin-bottom: 12px;
}

View File

@@ -10,7 +10,7 @@ import { ToastContainer } from "react-toastify";
import "rc-slider/assets/index.css";
import "react-toastify/dist/ReactToastify.css";
import "@/styles/index.scss"; // 全局样式
import "./styles/index.scss"; // 全局样式
import { toastDuration } from "@/common/constant";
import useBootstrap from "./useBootstrap";
import logger from "@shared/logger/renderer";