From 028b24d3aca47bd561a9525618e2a4f6b2447e29 Mon Sep 17 00:00:00 2001 From: cp-20 Date: Sun, 18 Aug 2024 10:44:15 +0900 Subject: [PATCH] =?UTF-8?q?reset=20css=20=E3=81=AE=E5=B7=AE=E3=81=97?= =?UTF-8?q?=E6=9B=BF=E3=81=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dashboard/package.json | 1 + dashboard/src/global-style.ts | 2 +- dashboard/src/reset.css | 102 ---------------------------------- dashboard/yarn.lock | 3 +- 4 files changed, 4 insertions(+), 104 deletions(-) delete mode 100644 dashboard/src/reset.css diff --git a/dashboard/package.json b/dashboard/package.json index a5f5f7798..f225e9c83 100644 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -45,6 +45,7 @@ "@solidjs/router": "0.14.1", "@tanstack/solid-virtual": "3.8.4", "@types/async-lock": "1.4.2", + "@unocss/reset": "^0.62.2", "ansi-to-html": "0.7.2", "async-lock": "1.4.1", "chart.js": "4.4.3", diff --git a/dashboard/src/global-style.ts b/dashboard/src/global-style.ts index be8b1e28a..5edcd56c1 100644 --- a/dashboard/src/global-style.ts +++ b/dashboard/src/global-style.ts @@ -1,6 +1,6 @@ import { globalStyle } from '@macaron-css/core' import { colorVars } from '/@/theme' -import './reset.css' +import '@unocss/reset/tailwind-compat.css' globalStyle('*, ::before, ::after', { margin: 0, diff --git a/dashboard/src/reset.css b/dashboard/src/reset.css deleted file mode 100644 index b5a216677..000000000 --- a/dashboard/src/reset.css +++ /dev/null @@ -1,102 +0,0 @@ -/* A (more) Modern CSS Reset by Andy Bell (2023) */ -/* https://andy-bell.co.uk/a-more-modern-css-reset/ */ - -/* Box sizing rules */ -*, -*::before, -*::after { - box-sizing: border-box; -} - -/* Prevent font size inflation */ -html { - -moz-text-size-adjust: none; - -webkit-text-size-adjust: none; - text-size-adjust: none; -} - -/* Remove default margin in favour of better control in authored CSS */ -body, -h1, -h2, -h3, -h4, -p, -figure, -blockquote, -dl, -dd { - margin-block-end: 0; -} - -/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */ -ul[role="list"], -ol[role="list"] { - list-style: none; -} - -/* Set core body defaults */ -body { - min-height: 100vh; - line-height: 1.5; -} - -/* Set shorter line heights on headings and interactive elements */ -h1, -h2, -h3, -h4, -button, -input, -label { - line-height: 1.1; -} - -/* Balance text wrapping on headings */ -h1, -h2, -h3, -h4 { - text-wrap: balance; -} - -/* A elements that don't have a class get default styles */ -a:not([class]) { - text-decoration-skip-ink: auto; - color: currentColor; -} - -/* Make images easier to work with */ -img, -picture { - max-width: 100%; - display: block; -} - -/* Inherit fonts for inputs and buttons */ -input, -button, -textarea, -select { - font: inherit; -} - -/* Make sure textareas without a rows attribute are not tiny */ -textarea:not([rows]) { - min-height: 10em; -} - -/* Anything that has been anchored to should have extra scroll margin */ -:target { - scroll-margin-block: 5ex; -} - -/* Remove all animations and transitions for people that prefer not to see them */ -@media (prefers-reduced-motion: reduce) { - * { - animation-duration: 0.01ms !important; - animation-iteration-count: 1 !important; - transition-duration: 0.01ms !important; - scroll-behavior: auto !important; - } -} diff --git a/dashboard/yarn.lock b/dashboard/yarn.lock index d174d5afc..5a8012c46 100644 --- a/dashboard/yarn.lock +++ b/dashboard/yarn.lock @@ -2586,7 +2586,7 @@ __metadata: languageName: node linkType: hard -"@unocss/reset@npm:0.62.2": +"@unocss/reset@npm:0.62.2, @unocss/reset@npm:^0.62.2": version: 0.62.2 resolution: "@unocss/reset@npm:0.62.2" checksum: 10c0/297a7cae482862615f11656907fe4feaee572dd278d3b0f9c73474d418f17740dcc590562b9f03532d7a54fa67a81d26a67b15e86c51bae6f95a4b6911758f1c @@ -4854,6 +4854,7 @@ __metadata: "@tanstack/virtual-core": "npm:3.8.4" "@types/async-lock": "npm:1.4.2" "@types/node": "npm:22.1.0" + "@unocss/reset": "npm:^0.62.2" ansi-to-html: "npm:0.7.2" async-lock: "npm:1.4.1" chart.js: "npm:4.4.3"