3.2-A: CSS Custom Properties + tailwind.config bovites #247
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Merfoldko: Frontend Architektura 2.0 & Dinamikus Megjelenitesi Rendszer
Cel: CSS Custom Properties bevezetese a tailwind.config.js-be es a main.css-be a dinamikus temavaltas tamogatasahoz.
Fuggosegek (Dependencies)
Implementacios Reszletek
tailwind.config.js bovites CSS variable referenciakkal:
colors.theme-bg: var(--theme-bg, #ffffff)
colors.theme-primary: var(--theme-primary, #004B63)
colors.theme-text: var(--theme-text, #1a1a1a)
colors.theme-accent: var(--theme-accent, #008CA4)
colors.theme-glass: var(--theme-glass, rgba(255,255,255,0.8))
colors.theme-card: var(--theme-card, #f8fafc)
colors.theme-border: var(--theme-border, #e2e8f0)
Meglevo sf-* szinek megtartasa
main.css bovites :root valtozokkal:
:root { --theme-bg, --theme-primary, --theme-text, --theme-accent, --theme-glass, --theme-card, --theme-border }
.dark { sotet mod valtozok }
Transition hozzaadasa: *, *::before, *::after { transition: background-color 0.3s, color 0.3s, border-color 0.3s }
Erintett fajlok