Skip to content

Commit

Permalink
add fallback fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmiglio committed Jun 3, 2024
1 parent 06f38af commit 5f05297
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 6 deletions.
3 changes: 3 additions & 0 deletions tailwind.config.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
declare module 'tailwindcss/lib/util/flattenColorPalette' {
export default function flattenColorPalette(colors: any): Record<string, string>
}
29 changes: 24 additions & 5 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import svgToDataUri from 'mini-svg-data-uri'
import type { Config } from 'tailwindcss'
import animate from 'tailwindcss-animate'
import { default as flattenColorPalette } from 'tailwindcss/lib/util/flattenColorPalette'

const animate = require('tailwindcss-animate')
import { type PluginAPI } from 'tailwindcss/types/config'

const config = {
darkMode: ['class'],
Expand All @@ -18,8 +18,27 @@ const config = {

theme: {
fontFamily: {
sans: ['"Golos Text"'],
mono: ['"Source Code Pro"']
sans: [
'"Golos Text"',
'ui-sans-serif',
'system-ui',
'sans-serif',
'"Apple Color Emoji"',
'"Segoe UI Emoji"',
'"Segoe UI Symbol"',
'"Noto Color Emoji"'
],
mono: [
'"Source Code Pro"',
'ui-monospace',
'SFMono-Regular',
'Menlo',
'Monaco',
'Consolas',
'"Liberation Mono"',
'"Courier New"',
'monospace'
]
},
container: {
center: true,
Expand Down Expand Up @@ -107,7 +126,7 @@ const config = {
}
},
plugins: [
function ({ matchUtilities, theme }) {
function ({ matchUtilities, theme }: PluginAPI) {
matchUtilities(
{
'bg-grid': (value) => ({
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.node.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"vitest.config.*",
"cypress.config.*",
"nightwatch.conf.*",
"playwright.config.*"
"playwright.config.*",
"tailwind.config.**.*"
],
"compilerOptions": {
"composite": true,
Expand Down

0 comments on commit 5f05297

Please sign in to comment.