From a3d0855f921f3ef81cd496fef995b8bec17d5342 Mon Sep 17 00:00:00 2001 From: prototypa Date: Sun, 22 Jan 2023 00:38:46 -0500 Subject: [PATCH] Add custom css variables --- src/assets/styles/base.css | 24 ++++++++++++++++++------ src/components/common/CustomStyles.astro | 16 +++++++++++++--- tailwind.config.cjs | 5 +++-- 3 files changed, 34 insertions(+), 11 deletions(-) diff --git a/src/assets/styles/base.css b/src/assets/styles/base.css index 8c1c226..c623a4c 100644 --- a/src/assets/styles/base.css +++ b/src/assets/styles/base.css @@ -3,21 +3,33 @@ @tailwind utilities; @layer components { - .btn { - @apply inline-flex items-center justify-center rounded-full shadow-md border-gray-400 border bg-transparent font-medium text-center text-base text-gray-700 leading-snug transition py-3.5 px-6 md:px-8 ease-in duration-200 focus:ring-blue-500 focus:ring-offset-blue-200 focus:ring-2 focus:ring-offset-2 hover:bg-gray-100 hover:border-gray-600 dark:text-slate-300 dark:border-slate-500 dark:hover:bg-slate-800 dark:hover:border-slate-800; + .text-page { + color: var(--aw-color-text-page); } - .btn-ghost { - @apply border-none shadow-none text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white; + .text-muted { + color: var(--aw-color-text-muted); } - .btn-primary { - @apply font-semibold bg-primary-800 text-white border-primary-800 hover:bg-primary-900 hover:border-primary-900 hover:text-white dark:text-white dark:bg-primary-800 dark:border-primary-800 dark:hover:border-primary-900 dark:hover:bg-primary-900; + .bg-light { + background-color: var(--aw-color-bg-page); } .bg-dark { @apply bg-slate-900; } + + .btn { + @apply inline-flex items-center justify-center rounded-full shadow-md border-gray-400 border bg-transparent font-medium text-center text-base text-page leading-snug transition py-3.5 px-6 md:px-8 ease-in duration-200 focus:ring-blue-500 focus:ring-offset-blue-200 focus:ring-2 focus:ring-offset-2 hover:bg-gray-100 hover:border-gray-600 dark:text-slate-300 dark:border-slate-500 dark:hover:bg-slate-800 dark:hover:border-slate-800; + } + + .btn-ghost { + @apply border-none shadow-none text-muted hover:text-gray-900 dark:text-gray-400 dark:hover:text-white; + } + + .btn-primary { + @apply font-semibold bg-primary text-white border-primary hover:bg-blue-900 hover:border-blue-900 hover:text-white dark:text-white dark:bg-primary dark:border-primary dark:hover:border-blue-900 dark:hover:bg-blue-900; + } } #header.scroll { diff --git a/src/components/common/CustomStyles.astro b/src/components/common/CustomStyles.astro index e93cc28..8d60d9b 100644 --- a/src/components/common/CustomStyles.astro +++ b/src/components/common/CustomStyles.astro @@ -1,13 +1,23 @@ --- import '@fontsource/inter/variable.css'; + +// Nunito +// Dosis --- + + diff --git a/tailwind.config.cjs b/tailwind.config.cjs index 385a57d..6b0b7a2 100644 --- a/tailwind.config.cjs +++ b/tailwind.config.cjs @@ -6,8 +6,9 @@ module.exports = { theme: { extend: { colors: { - primary: colors.blue, - secondary: colors.pink, + primary: 'var(--aw-color-primary)', + secondary: 'var(--aw-color-secondary)', + accent: 'var(--aw-color-accent)', }, fontFamily: { sans: ['var(--aw-font-sans)', ...defaultTheme.fontFamily.sans],