Skip to content
This repository has been archived by the owner on Jan 7, 2024. It is now read-only.

Commit

Permalink
Configure some css variables
Browse files Browse the repository at this point in the history
  • Loading branch information
prototypa committed Jan 22, 2023
1 parent de76660 commit b470cf7
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 34 deletions.
13 changes: 13 additions & 0 deletions src/components/common/CustomStyles.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
import '@fontsource/inter/variable.css';
---

<style is:inline is:global>
:root {
--aw-font-sans: 'InterVariable';
--aw-font-serif: var(--ph-font-sans);
--aw-font-heading: 'InterVariable';

--aw-color-primary: '';
}
</style>
5 changes: 0 additions & 5 deletions src/components/common/Fonts.astro

This file was deleted.

6 changes: 3 additions & 3 deletions src/components/common/MetaTags.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { getImage } from '@astrojs/image';
import { SITE } from '~/config.mjs';
import { MetaSEO } from '~/types';
import { getCanonical, getAsset } from '~/utils/permalinks';
import { getCanonical, getAsset } from '~/utils/permalinks';
import { getRelativeUrlByFilePath } from '~/utils/directories';
import Fonts from '~/components/common/Fonts.astro';
import CustomStyles from '~/components/common/CustomStyles.astro';
import SplitbeeAnalytics from './SplitbeeAnalytics.astro';
export interface Props extends MetaSEO {
Expand Down Expand Up @@ -82,7 +82,7 @@ const image =
}}
/>

<Fonts />
<CustomStyles />

<!-- Google Site Verification -->
{SITE.googleSiteVerificationId && <meta name="google-site-verification" content={SITE.googleSiteVerificationId} />}
Expand Down
29 changes: 3 additions & 26 deletions tailwind.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,12 @@ module.exports = {
secondary: colors.pink,
},
fontFamily: {
sans: ["'InterVariable'", ...defaultTheme.fontFamily.sans],
sans: ['var(--aw-font-sans)', ...defaultTheme.fontFamily.sans],
serif: ['var(--aw-font-serif)', ...defaultTheme.fontFamily.serif],
heading: ['var(--aw-font-heading)', ...defaultTheme.fontFamily.sans],
},
},
},
plugins: [require('@tailwindcss/typography')],
darkMode: 'class',
};

/*
Alternative tailwind.config.js
NOTE: Add this fonts to <head>
<link href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;700&display=swap" rel="stylesheet" />
*/

// module.exports = {
// content: ["./src/**/*.{astro,html,js,jsx,md,svelte,ts,tsx,vue}"],
// theme: {
// extend: {
// colors: {
// primary: colors.cyan,
// secondary: colors.lime,
// },
// fontFamily: {
// sans: ["'Nunito'", ...defaultTheme.fontFamily.sans],
// },
// },
// },
// plugins: [require("@tailwindcss/typography")],
// darkMode: "class",
// };

0 comments on commit b470cf7

Please sign in to comment.