Configure some css variables
This commit is contained in:
13
src/components/common/CustomStyles.astro
Normal file
13
src/components/common/CustomStyles.astro
Normal file
@ -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>
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
import '@fontsource/inter/variable.css';
|
||||
---
|
||||
|
||||
<!-- Or Google Fonts -->
|
@ -8,7 +8,7 @@ import { MetaSEO } from '~/types';
|
||||
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 {
|
||||
@ -82,7 +82,7 @@ const image =
|
||||
}}
|
||||
/>
|
||||
|
||||
<Fonts />
|
||||
<CustomStyles />
|
||||
|
||||
<!-- Google Site Verification -->
|
||||
{SITE.googleSiteVerificationId && <meta name="google-site-verification" content={SITE.googleSiteVerificationId} />}
|
||||
|
@ -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",
|
||||
// };
|
||||
|
Reference in New Issue
Block a user