fix: move app.css to renderer and fix tailwind not working
This commit is contained in:
parent
5f30dad182
commit
58071cc6f7
4 changed files with 139 additions and 243 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
"style": "default",
|
"style": "default",
|
||||||
"tailwind": {
|
"tailwind": {
|
||||||
"config": "tailwind.config.ts",
|
"config": "tailwind.config.ts",
|
||||||
"css": "src\\app.css",
|
"css": "src\\renderer\\src\\app.css",
|
||||||
"baseColor": "zinc"
|
"baseColor": "zinc"
|
||||||
},
|
},
|
||||||
"aliases": {
|
"aliases": {
|
||||||
|
|
|
||||||
75
src/app.css
75
src/app.css
|
|
@ -1,75 +0,0 @@
|
||||||
@tailwind base;
|
|
||||||
@tailwind components;
|
|
||||||
@tailwind utilities;
|
|
||||||
|
|
||||||
@layer base {
|
|
||||||
:root {
|
|
||||||
--background: 0 0% 100%;
|
|
||||||
--foreground: 240 10% 3.9%;
|
|
||||||
--muted: 240 4.8% 95.9%;
|
|
||||||
--muted-foreground: 240 3.8% 46.1%;
|
|
||||||
--popover: 0 0% 100%;
|
|
||||||
--popover-foreground: 240 10% 3.9%;
|
|
||||||
--card: 0 0% 100%;
|
|
||||||
--card-foreground: 240 10% 3.9%;
|
|
||||||
--border: 240 5.9% 90%;
|
|
||||||
--input: 240 5.9% 90%;
|
|
||||||
--primary: 240 5.9% 10%;
|
|
||||||
--primary-foreground: 0 0% 98%;
|
|
||||||
--secondary: 240 4.8% 95.9%;
|
|
||||||
--secondary-foreground: 240 5.9% 10%;
|
|
||||||
--accent: 240 4.8% 95.9%;
|
|
||||||
--accent-foreground: 240 5.9% 10%;
|
|
||||||
--destructive: 0 72.2% 50.6%;
|
|
||||||
--destructive-foreground: 0 0% 98%;
|
|
||||||
--ring: 240 10% 3.9%;
|
|
||||||
--radius: 0.5rem;
|
|
||||||
--sidebar-background: 0 0% 98%;
|
|
||||||
--sidebar-foreground: 240 5.3% 26.1%;
|
|
||||||
--sidebar-primary: 240 5.9% 10%;
|
|
||||||
--sidebar-primary-foreground: 0 0% 98%;
|
|
||||||
--sidebar-accent: 240 4.8% 95.9%;
|
|
||||||
--sidebar-accent-foreground: 240 5.9% 10%;
|
|
||||||
--sidebar-border: 220 13% 91%;
|
|
||||||
--sidebar-ring: 217.2 91.2% 59.8%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dark {
|
|
||||||
--background: 240 10% 3.9%;
|
|
||||||
--foreground: 0 0% 98%;
|
|
||||||
--muted: 240 3.7% 15.9%;
|
|
||||||
--muted-foreground: 240 5% 64.9%;
|
|
||||||
--popover: 240 10% 3.9%;
|
|
||||||
--popover-foreground: 0 0% 98%;
|
|
||||||
--card: 240 10% 3.9%;
|
|
||||||
--card-foreground: 0 0% 98%;
|
|
||||||
--border: 240 3.7% 15.9%;
|
|
||||||
--input: 240 3.7% 15.9%;
|
|
||||||
--primary: 0 0% 98%;
|
|
||||||
--primary-foreground: 240 5.9% 10%;
|
|
||||||
--secondary: 240 3.7% 15.9%;
|
|
||||||
--secondary-foreground: 0 0% 98%;
|
|
||||||
--accent: 240 3.7% 15.9%;
|
|
||||||
--accent-foreground: 0 0% 98%;
|
|
||||||
--destructive: 0 62.8% 30.6%;
|
|
||||||
--destructive-foreground: 0 0% 98%;
|
|
||||||
--ring: 240 4.9% 83.9%;
|
|
||||||
--sidebar-background: 240 5.9% 10%;
|
|
||||||
--sidebar-foreground: 240 4.8% 95.9%;
|
|
||||||
--sidebar-primary: 224.3 76.3% 48%;
|
|
||||||
--sidebar-primary-foreground: 0 0% 100%;
|
|
||||||
--sidebar-accent: 240 3.7% 15.9%;
|
|
||||||
--sidebar-accent-foreground: 240 4.8% 95.9%;
|
|
||||||
--sidebar-border: 240 3.7% 15.9%;
|
|
||||||
--sidebar-ring: 217.2 91.2% 59.8%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@layer base {
|
|
||||||
* {
|
|
||||||
@apply border-border;
|
|
||||||
}
|
|
||||||
body {
|
|
||||||
@apply bg-background text-foreground;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,79 +1,50 @@
|
||||||
|
@tailwind base;
|
||||||
|
@tailwind components;
|
||||||
|
@tailwind utilities;
|
||||||
|
|
||||||
|
@layer base {
|
||||||
:root {
|
:root {
|
||||||
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
--background: 0 0% 100%;
|
||||||
line-height: 1.5;
|
--foreground: 240 10% 3.9%;
|
||||||
font-weight: 400;
|
--card: 0 0% 100%;
|
||||||
|
--card-foreground: 240 10% 3.9%;
|
||||||
color-scheme: light dark;
|
--popover: 0 0% 100%;
|
||||||
color: rgba(255, 255, 255, 0.87);
|
--popover-foreground: 240 10% 3.9%;
|
||||||
background-color: #242424;
|
--primary: 142.1 76.2% 36.3%;
|
||||||
|
--primary-foreground: 355.7 100% 97.3%;
|
||||||
font-synthesis: none;
|
--secondary: 240 4.8% 95.9%;
|
||||||
text-rendering: optimizeLegibility;
|
--secondary-foreground: 240 5.9% 10%;
|
||||||
-webkit-font-smoothing: antialiased;
|
--muted: 240 4.8% 95.9%;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
--muted-foreground: 240 3.8% 46.1%;
|
||||||
|
--accent: 240 4.8% 95.9%;
|
||||||
|
--accent-foreground: 240 5.9% 10%;
|
||||||
|
--destructive: 0 72.22% 50.59%;
|
||||||
|
--destructive-foreground: 0 0% 98%;
|
||||||
|
--border: 240 5.9% 90%;
|
||||||
|
--input: 240 5.9% 90%;
|
||||||
|
--ring: 142.1 76.2% 36.3%;
|
||||||
|
--radius: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
.dark {
|
||||||
font-weight: 500;
|
--background: 20 14.3% 4.1%;
|
||||||
color: #646cff;
|
--foreground: 0 0% 95%;
|
||||||
text-decoration: inherit;
|
--card: 24 9.8% 10%;
|
||||||
}
|
--card-foreground: 0 0% 95%;
|
||||||
a:hover {
|
--popover: 0 0% 9%;
|
||||||
color: #535bf2;
|
--popover-foreground: 0 0% 95%;
|
||||||
}
|
--primary: 142.1 70.6% 45.3%;
|
||||||
|
--primary-foreground: 144.9 80.4% 10%;
|
||||||
body {
|
--secondary: 240 3.7% 15.9%;
|
||||||
margin: 0;
|
--secondary-foreground: 0 0% 98%;
|
||||||
display: flex;
|
--muted: 0 0% 15%;
|
||||||
place-items: center;
|
--muted-foreground: 240 5% 64.9%;
|
||||||
min-width: 320px;
|
--accent: 12 6.5% 15.1%;
|
||||||
min-height: 100vh;
|
--accent-foreground: 0 0% 98%;
|
||||||
}
|
--destructive: 0 62.8% 30.6%;
|
||||||
|
--destructive-foreground: 0 85.7% 97.3%;
|
||||||
h1 {
|
--border: 240 3.7% 15.9%;
|
||||||
font-size: 3.2em;
|
--input: 240 3.7% 15.9%;
|
||||||
line-height: 1.1;
|
--ring: 142.4 71.8% 29.2%;
|
||||||
}
|
|
||||||
|
|
||||||
.card {
|
|
||||||
padding: 2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
#app {
|
|
||||||
max-width: 1280px;
|
|
||||||
margin: 0 auto;
|
|
||||||
padding: 2rem;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
button {
|
|
||||||
border-radius: 8px;
|
|
||||||
border: 1px solid transparent;
|
|
||||||
padding: 0.6em 1.2em;
|
|
||||||
font-size: 1em;
|
|
||||||
font-weight: 500;
|
|
||||||
font-family: inherit;
|
|
||||||
background-color: #1a1a1a;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: border-color 0.25s;
|
|
||||||
}
|
|
||||||
button:hover {
|
|
||||||
border-color: #646cff;
|
|
||||||
}
|
|
||||||
button:focus,
|
|
||||||
button:focus-visible {
|
|
||||||
outline: 4px auto -webkit-focus-ring-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (prefers-color-scheme: light) {
|
|
||||||
:root {
|
|
||||||
color: #213547;
|
|
||||||
background-color: #ffffff;
|
|
||||||
}
|
|
||||||
a:hover {
|
|
||||||
color: #747bff;
|
|
||||||
}
|
|
||||||
button {
|
|
||||||
background-color: #f9f9f9;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,96 +1,96 @@
|
||||||
import { fontFamily } from "tailwindcss/defaultTheme";
|
import { fontFamily } from 'tailwindcss/defaultTheme'
|
||||||
import type { Config } from "tailwindcss";
|
import type { Config } from 'tailwindcss'
|
||||||
import tailwindcssAnimate from "tailwindcss-animate";
|
import tailwindcssAnimate from 'tailwindcss-animate'
|
||||||
|
|
||||||
const config: Config = {
|
const config: Config = {
|
||||||
darkMode: ["class"],
|
darkMode: ['class'],
|
||||||
content: ["./src/**/*.{html,js,svelte,ts}"],
|
content: ['./src/renderer/src/**/*.{html,js,svelte,ts}'],
|
||||||
safelist: ["dark"],
|
safelist: ['dark'],
|
||||||
theme: {
|
theme: {
|
||||||
container: {
|
container: {
|
||||||
center: true,
|
center: true,
|
||||||
padding: "2rem",
|
padding: '2rem',
|
||||||
screens: {
|
screens: {
|
||||||
"2xl": "1400px"
|
'2xl': '1400px'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
extend: {
|
extend: {
|
||||||
colors: {
|
colors: {
|
||||||
border: "hsl(var(--border) / <alpha-value>)",
|
border: 'hsl(var(--border) / <alpha-value>)',
|
||||||
input: "hsl(var(--input) / <alpha-value>)",
|
input: 'hsl(var(--input) / <alpha-value>)',
|
||||||
ring: "hsl(var(--ring) / <alpha-value>)",
|
ring: 'hsl(var(--ring) / <alpha-value>)',
|
||||||
background: "hsl(var(--background) / <alpha-value>)",
|
background: 'hsl(var(--background) / <alpha-value>)',
|
||||||
foreground: "hsl(var(--foreground) / <alpha-value>)",
|
foreground: 'hsl(var(--foreground) / <alpha-value>)',
|
||||||
primary: {
|
primary: {
|
||||||
DEFAULT: "hsl(var(--primary) / <alpha-value>)",
|
DEFAULT: 'hsl(var(--primary) / <alpha-value>)',
|
||||||
foreground: "hsl(var(--primary-foreground) / <alpha-value>)"
|
foreground: 'hsl(var(--primary-foreground) / <alpha-value>)'
|
||||||
},
|
},
|
||||||
secondary: {
|
secondary: {
|
||||||
DEFAULT: "hsl(var(--secondary) / <alpha-value>)",
|
DEFAULT: 'hsl(var(--secondary) / <alpha-value>)',
|
||||||
foreground: "hsl(var(--secondary-foreground) / <alpha-value>)"
|
foreground: 'hsl(var(--secondary-foreground) / <alpha-value>)'
|
||||||
},
|
},
|
||||||
destructive: {
|
destructive: {
|
||||||
DEFAULT: "hsl(var(--destructive) / <alpha-value>)",
|
DEFAULT: 'hsl(var(--destructive) / <alpha-value>)',
|
||||||
foreground: "hsl(var(--destructive-foreground) / <alpha-value>)"
|
foreground: 'hsl(var(--destructive-foreground) / <alpha-value>)'
|
||||||
},
|
},
|
||||||
muted: {
|
muted: {
|
||||||
DEFAULT: "hsl(var(--muted) / <alpha-value>)",
|
DEFAULT: 'hsl(var(--muted) / <alpha-value>)',
|
||||||
foreground: "hsl(var(--muted-foreground) / <alpha-value>)"
|
foreground: 'hsl(var(--muted-foreground) / <alpha-value>)'
|
||||||
},
|
},
|
||||||
accent: {
|
accent: {
|
||||||
DEFAULT: "hsl(var(--accent) / <alpha-value>)",
|
DEFAULT: 'hsl(var(--accent) / <alpha-value>)',
|
||||||
foreground: "hsl(var(--accent-foreground) / <alpha-value>)"
|
foreground: 'hsl(var(--accent-foreground) / <alpha-value>)'
|
||||||
},
|
},
|
||||||
popover: {
|
popover: {
|
||||||
DEFAULT: "hsl(var(--popover) / <alpha-value>)",
|
DEFAULT: 'hsl(var(--popover) / <alpha-value>)',
|
||||||
foreground: "hsl(var(--popover-foreground) / <alpha-value>)"
|
foreground: 'hsl(var(--popover-foreground) / <alpha-value>)'
|
||||||
},
|
},
|
||||||
card: {
|
card: {
|
||||||
DEFAULT: "hsl(var(--card) / <alpha-value>)",
|
DEFAULT: 'hsl(var(--card) / <alpha-value>)',
|
||||||
foreground: "hsl(var(--card-foreground) / <alpha-value>)"
|
foreground: 'hsl(var(--card-foreground) / <alpha-value>)'
|
||||||
},
|
},
|
||||||
sidebar: {
|
sidebar: {
|
||||||
DEFAULT: "hsl(var(--sidebar-background))",
|
DEFAULT: 'hsl(var(--sidebar-background))',
|
||||||
foreground: "hsl(var(--sidebar-foreground))",
|
foreground: 'hsl(var(--sidebar-foreground))',
|
||||||
primary: "hsl(var(--sidebar-primary))",
|
primary: 'hsl(var(--sidebar-primary))',
|
||||||
"primary-foreground": "hsl(var(--sidebar-primary-foreground))",
|
'primary-foreground': 'hsl(var(--sidebar-primary-foreground))',
|
||||||
accent: "hsl(var(--sidebar-accent))",
|
accent: 'hsl(var(--sidebar-accent))',
|
||||||
"accent-foreground": "hsl(var(--sidebar-accent-foreground))",
|
'accent-foreground': 'hsl(var(--sidebar-accent-foreground))',
|
||||||
border: "hsl(var(--sidebar-border))",
|
border: 'hsl(var(--sidebar-border))',
|
||||||
ring: "hsl(var(--sidebar-ring))",
|
ring: 'hsl(var(--sidebar-ring))'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
borderRadius: {
|
borderRadius: {
|
||||||
xl: "calc(var(--radius) + 4px)",
|
xl: 'calc(var(--radius) + 4px)',
|
||||||
lg: "var(--radius)",
|
lg: 'var(--radius)',
|
||||||
md: "calc(var(--radius) - 2px)",
|
md: 'calc(var(--radius) - 2px)',
|
||||||
sm: "calc(var(--radius) - 4px)"
|
sm: 'calc(var(--radius) - 4px)'
|
||||||
},
|
},
|
||||||
fontFamily: {
|
fontFamily: {
|
||||||
sans: [...fontFamily.sans]
|
sans: [...fontFamily.sans]
|
||||||
},
|
},
|
||||||
keyframes: {
|
keyframes: {
|
||||||
"accordion-down": {
|
'accordion-down': {
|
||||||
from: { height: "0" },
|
from: { height: '0' },
|
||||||
to: { height: "var(--bits-accordion-content-height)" },
|
to: { height: 'var(--bits-accordion-content-height)' }
|
||||||
},
|
},
|
||||||
"accordion-up": {
|
'accordion-up': {
|
||||||
from: { height: "var(--bits-accordion-content-height)" },
|
from: { height: 'var(--bits-accordion-content-height)' },
|
||||||
to: { height: "0" },
|
to: { height: '0' }
|
||||||
},
|
|
||||||
"caret-blink": {
|
|
||||||
"0%,70%,100%": { opacity: "1" },
|
|
||||||
"20%,50%": { opacity: "0" },
|
|
||||||
},
|
},
|
||||||
|
'caret-blink': {
|
||||||
|
'0%,70%,100%': { opacity: '1' },
|
||||||
|
'20%,50%': { opacity: '0' }
|
||||||
|
}
|
||||||
},
|
},
|
||||||
animation: {
|
animation: {
|
||||||
"accordion-down": "accordion-down 0.2s ease-out",
|
'accordion-down': 'accordion-down 0.2s ease-out',
|
||||||
"accordion-up": "accordion-up 0.2s ease-out",
|
'accordion-up': 'accordion-up 0.2s ease-out',
|
||||||
"caret-blink": "caret-blink 1.25s ease-out infinite",
|
'caret-blink': 'caret-blink 1.25s ease-out infinite'
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
plugins: [tailwindcssAnimate]
|
||||||
},
|
}
|
||||||
plugins: [tailwindcssAnimate],
|
|
||||||
};
|
|
||||||
|
|
||||||
export default config;
|
export default config
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue