feat: Convert to pure Astro CSS (no Tailwind)
- Removed Tailwind CSS dependency (19KB → 8.7KB CSS) - Created native Astro CSS with CSS custom properties - All utility classes using vanilla CSS - Scoped component styles with Astro's built-in scoping - Same green theme and design preserved - Zero build dependencies for CSS - Faster builds, smaller bundle - True 'Astro way' of styling
This commit is contained in:
109
public/styles/globals.css
Normal file
109
public/styles/globals.css
Normal file
@@ -0,0 +1,109 @@
|
||||
/* Astro CSS Variables */
|
||||
:root {
|
||||
--color-primary-500: #22c55e;
|
||||
--color-primary-600: #16a34a;
|
||||
--color-primary-700: #15803d;
|
||||
--color-secondary-50: #f8fafc;
|
||||
--color-secondary-100: #f1f5f9;
|
||||
--color-secondary-200: #e2e8f0;
|
||||
--color-secondary-300: #cbd5e1;
|
||||
--color-secondary-500: #64748b;
|
||||
--color-secondary-600: #475569;
|
||||
--color-secondary-700: #334155;
|
||||
--color-secondary-800: #1e293b;
|
||||
--color-secondary-900: #0f172a;
|
||||
--color-accent-500: #eab308;
|
||||
--font-family-base: 'Kanit', system-ui, sans-serif;
|
||||
--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
|
||||
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
|
||||
--radius-lg: 0.5rem;
|
||||
--radius-xl: 0.75rem;
|
||||
}
|
||||
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
html { scroll-behavior: smooth; font-family: var(--font-family-base); }
|
||||
body { color: var(--color-secondary-900); background-color: white; line-height: 1.5; }
|
||||
h1, h2, h3, h4, h5, h6 { font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; }
|
||||
a { color: inherit; text-decoration: none; }
|
||||
img { max-width: 100%; height: auto; display: block; }
|
||||
.container { width: 100%; max-width: 80rem; margin: 0 auto; padding: 0 1rem; }
|
||||
|
||||
.flex { display: flex; } .flex-col { flex-direction: column; }
|
||||
.items-center { align-items: center; } .justify-center { justify-content: center; } .justify-between { justify-content: space-between; }
|
||||
.gap-2 { gap: 0.5rem; } .gap-3 { gap: 0.75rem; } .gap-4 { gap: 1rem; } .gap-6 { gap: 1.5rem; } .gap-8 { gap: 2rem; }
|
||||
.hidden { display: none; } .block { display: block; } .inline-flex { display: inline-flex; } .grid { display: grid; }
|
||||
.relative { position: relative; } .absolute { position: absolute; } .fixed { position: fixed; }
|
||||
.top-0 { top: 0; } .left-0 { left: 0; } .right-0 { right: 0; } .bottom-0 { bottom: 0; } .inset-0 { inset: 0; }
|
||||
.z-10 { z-index: 10; } .z-20 { z-index: 20; } .z-40 { z-index: 40; } .z-50 { z-index: 50; }
|
||||
.w-full { width: 100%; } .h-full { height: 100%; } .min-h-screen { min-height: 100vh; }
|
||||
.p-3 { padding: 0.75rem; } .p-4 { padding: 1rem; } .p-6 { padding: 1.5rem; } .p-8 { padding: 2rem; }
|
||||
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; } .py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
|
||||
.py-4 { padding-top: 1rem; padding-bottom: 1rem; } .py-12 { padding-top: 3rem; padding-bottom: 3rem; } .py-16 { padding-top: 4rem; padding-bottom: 4rem; }
|
||||
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; } .px-4 { padding-left: 1rem; padding-right: 1rem; } .px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
|
||||
.pt-20 { padding-top: 5rem; } .pt-32 { padding-top: 8rem; }
|
||||
.mb-2 { margin-bottom: 0.5rem; } .mb-3 { margin-bottom: 0.75rem; } .mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; } .mb-8 { margin-bottom: 2rem; } .mb-12 { margin-bottom: 3rem; }
|
||||
.mt-2 { margin-top: 0.5rem; } .mt-3 { margin-top: 0.75rem; } .mt-4 { margin-top: 1rem; } .mt-12 { margin-top: 3rem; }
|
||||
.mx-auto { margin-left: auto; margin-right: auto; }
|
||||
.text-center { text-align: center; } .text-left { text-align: left; }
|
||||
.text-sm { font-size: 0.875rem; } .text-base { font-size: 1rem; } .text-lg { font-size: 1.125rem; } .text-xl { font-size: 1.25rem; }
|
||||
.text-2xl { font-size: 1.5rem; } .text-3xl { font-size: 1.875rem; } .text-4xl { font-size: 2.25rem; } .text-5xl { font-size: 3rem; } .text-6xl { font-size: 3.75rem; }
|
||||
.font-medium { font-weight: 500; } .font-semibold { font-weight: 600; } .font-bold { font-weight: 700; }
|
||||
.text-white { color: white; } .text-primary-500 { color: var(--color-primary-500); } .text-primary-600 { color: var(--color-primary-600); }
|
||||
.text-secondary-200 { color: var(--color-secondary-200); } .text-secondary-500 { color: var(--color-secondary-500); } .text-secondary-600 { color: var(--color-secondary-600); }
|
||||
.text-secondary-700 { color: var(--color-secondary-700); } .text-secondary-900 { color: var(--color-secondary-900); }
|
||||
.bg-white { background-color: white; } .bg-primary-600 { background-color: var(--color-primary-600); }
|
||||
.bg-secondary-50 { background-color: var(--color-secondary-50); } .bg-secondary-100 { background-color: var(--color-secondary-100); }
|
||||
.bg-secondary-200 { background-color: var(--color-secondary-200); } .bg-secondary-800 { background-color: var(--color-secondary-800); }
|
||||
.bg-secondary-900 { background-color: var(--color-secondary-900); } .bg-yellow-50 { background-color: #fefce8; }
|
||||
.border { border-width: 1px; } .border-2 { border-width: 2px; } .border-t { border-top-width: 1px; } .border-b { border-bottom-width: 1px; } .border-l-4 { border-left-width: 4px; }
|
||||
.border-accent-500 { border-color: var(--color-accent-500); } .border-primary-600 { border-color: var(--color-primary-600); }
|
||||
.border-secondary-100 { border-color: var(--color-secondary-100); } .border-secondary-200 { border-color: var(--color-secondary-200); }
|
||||
.border-white { border-color: white; } .border-yellow-500 { border-color: #eab308; }
|
||||
.rounded { border-radius: 0.25rem; } .rounded-lg { border-radius: var(--radius-lg); } .rounded-xl { border-radius: var(--radius-xl); } .rounded-2xl { border-radius: 1rem; } .rounded-full { border-radius: 9999px; }
|
||||
.shadow { box-shadow: var(--shadow-md); } .shadow-md { box-shadow: var(--shadow-md); } .shadow-lg { box-shadow: var(--shadow-lg); }
|
||||
.transition-all { transition: all 0.15s; } .duration-200 { transition-duration: 0.2s; } .duration-300 { transition-duration: 0.3s; }
|
||||
.hover\:bg-primary-700:hover { background-color: var(--color-primary-700); } .hover\:bg-secondary-900:hover { background-color: var(--color-secondary-900); }
|
||||
.hover\:bg-white:hover { background-color: white; } .hover\:text-primary-600:hover { color: var(--color-primary-600); }
|
||||
.hover\:text-white:hover { color: white; }
|
||||
|
||||
.btn-primary { display: inline-flex; align-items: center; justify-content: center; padding: 0.75rem 1.5rem; background-color: var(--color-primary-600); color: white; font-weight: 600; border-radius: var(--radius-lg); transition: all 0.2s; border: none; cursor: pointer; }
|
||||
.btn-primary:hover { background-color: var(--color-primary-700); }
|
||||
.btn-secondary { display: inline-flex; align-items: center; justify-content: center; padding: 0.75rem 1.5rem; background-color: var(--color-secondary-800); color: white; font-weight: 600; border-radius: var(--radius-lg); transition: all 0.2s; border: none; cursor: pointer; }
|
||||
.btn-secondary:hover { background-color: var(--color-secondary-900); }
|
||||
.btn-outline { display: inline-flex; align-items: center; justify-content: center; padding: 0.75rem 1.5rem; border: 2px solid var(--color-primary-600); color: var(--color-primary-600); background-color: transparent; font-weight: 600; border-radius: var(--radius-lg); transition: all 0.2s; cursor: pointer; }
|
||||
.btn-outline:hover { background-color: var(--color-primary-600); color: white; }
|
||||
|
||||
.section-title { text-align: center; font-size: clamp(1.875rem, 5vw, 3rem); font-weight: 700; margin-bottom: 1rem; }
|
||||
.section-subtitle { text-align: center; color: var(--color-secondary-600); font-size: 1.125rem; }
|
||||
.card { background-color: white; border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-md); transition: all 0.3s; }
|
||||
.card:hover { transform: translateY(-0.25rem); box-shadow: var(--shadow-lg); }
|
||||
|
||||
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
|
||||
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
||||
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.md\:flex { display: flex; } .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
||||
.md\:text-lg { font-size: 1.125rem; } .md\:text-xl { font-size: 1.25rem; } .md\:text-2xl { font-size: 1.5rem; }
|
||||
.md\:text-3xl { font-size: 1.875rem; } .md\:text-4xl { font-size: 2.25rem; } .md\:text-5xl { font-size: 3rem; }
|
||||
}
|
||||
@media (min-width: 1024px) {
|
||||
.lg\:flex { display: flex; } .lg\:hidden { display: none; }
|
||||
.lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
|
||||
.lg\:text-xl { font-size: 1.25rem; } .lg\:text-2xl { font-size: 1.5rem; } .lg\:text-3xl { font-size: 1.875rem; }
|
||||
.lg\:text-5xl { font-size: 3rem; } .lg\:text-6xl { font-size: 3.75rem; }
|
||||
}
|
||||
@media (min-width: 1280px) {
|
||||
.xl\:text-3xl { font-size: 1.875rem; } .xl\:text-7xl { font-size: 4.5rem; }
|
||||
}
|
||||
|
||||
.opacity-0 { opacity: 0; } .opacity-50 { opacity: 0.5; }
|
||||
.invisible { visibility: hidden; } .visible { visibility: visible; }
|
||||
.translate-y-full { transform: translateY(100%); }
|
||||
.group:hover .group-hover\:visible { visibility: visible; }
|
||||
.group:hover .group-hover\:opacity-100 { opacity: 1; }
|
||||
.aspect-video { aspect-ratio: 16 / 9; }
|
||||
.object-contain { object-fit: contain; } .object-cover { object-fit: cover; }
|
||||
.overflow-hidden { overflow: hidden; } .overflow-x-auto { overflow-x: auto; }
|
||||
.list-disc { list-style-type: disc; } .list-inside { list-style-position: inside; }
|
||||
.line-clamp-2 { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
|
||||
Reference in New Issue
Block a user