2024-09-28 23:59:37 -07:00
//import { fontFamily } from "tailwindcss/defaultTheme";
2024-09-11 07:54:39 -07:00
import type { Config } from "tailwindcss" ;
2024-09-28 23:59:37 -07:00
import typography from '@tailwindcss/typography' ;
2024-09-11 07:54:39 -07:00
const config : Config = {
darkMode : [ "class" ] ,
content : [ "./src/**/*.{html,js,svelte,ts}" ] ,
safelist : [ "dark" ] ,
theme : {
container : {
center : true ,
padding : "2rem" ,
screens : {
"2xl" : "1400px"
}
} ,
extend : {
colors : {
border : "hsl(var(--border) / <alpha-value>)" ,
input : "hsl(var(--input) / <alpha-value>)" ,
ring : "hsl(var(--ring) / <alpha-value>)" ,
background : "hsl(var(--background) / <alpha-value>)" ,
foreground : "hsl(var(--foreground) / <alpha-value>)" ,
primary : {
DEFAULT : "hsl(var(--primary) / <alpha-value>)" ,
foreground : "hsl(var(--primary-foreground) / <alpha-value>)"
} ,
secondary : {
DEFAULT : "hsl(var(--secondary) / <alpha-value>)" ,
foreground : "hsl(var(--secondary-foreground) / <alpha-value>)"
} ,
destructive : {
DEFAULT : "hsl(var(--destructive) / <alpha-value>)" ,
foreground : "hsl(var(--destructive-foreground) / <alpha-value>)"
} ,
muted : {
DEFAULT : "hsl(var(--muted) / <alpha-value>)" ,
foreground : "hsl(var(--muted-foreground) / <alpha-value>)"
} ,
accent : {
DEFAULT : "hsl(var(--accent) / <alpha-value>)" ,
foreground : "hsl(var(--accent-foreground) / <alpha-value>)"
} ,
popover : {
DEFAULT : "hsl(var(--popover) / <alpha-value>)" ,
foreground : "hsl(var(--popover-foreground) / <alpha-value>)"
} ,
card : {
DEFAULT : "hsl(var(--card) / <alpha-value>)" ,
foreground : "hsl(var(--card-foreground) / <alpha-value>)"
2024-09-13 20:40:08 -07:00
} ,
eucalyptus : {
100 : '#E6F3EF' ,
200 : '#C0E1D7' ,
300 : '#9ACFBF' ,
400 : '#4EAB90' ,
500 : '#028760' ,
600 : '#027A56' ,
700 : '#01513A' ,
800 : '#013D2B' ,
900 : '#01291D' ,
} ,
java : {
100 : '#EDF9F8' ,
200 : '#D2EFED' ,
300 : '#B6E5E2' ,
400 : '#80D2CD' ,
500 : '#49BEB7' ,
600 : '#42ABA5' ,
700 : '#2C726E' ,
800 : '#215652' ,
900 : '#163937' ,
} ,
2024-09-17 09:40:19 -07:00
sunglow : {
100 : '#FFFAEF' ,
200 : '#FEF3D6' ,
300 : '#FDECBD' ,
400 : '#FCDD8C' ,
500 : '#FACF5A' ,
600 : '#E1BA51' ,
700 : '#967C36' ,
800 : '#715D29' ,
900 : '#4B3E1B' ,
} ,
magenta : {
100 : '#F9ECF4' ,
200 : '#F1D0E4' ,
300 : '#E8B3D3' ,
400 : '#D77AB2' ,
500 : '#C64191' ,
600 : '#B23B83' ,
700 : '#772757' ,
800 : '#591D41' ,
900 : '#3B142C' ,
} ,
2024-09-11 07:54:39 -07:00
} ,
borderRadius : {
lg : "var(--radius)" ,
md : "calc(var(--radius) - 2px)" ,
sm : "calc(var(--radius) - 4px)"
} ,
fontFamily : {
2024-09-13 20:40:08 -07:00
//sans: [...fontFamily.sans],
sans : '"Source Han Sans SC", "Source Han Sans CN","Noto Sans CJK SC", "Noto Sans", -apple-system, "Helvetica Neue", Helvetica, "Nimbus Sans L", Arial, "Liberation Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Wenquanyi Micro Hei", "WenQuanYi Zen Hei", "ST Heiti", SimHei, "WenQuanYi Zen Hei Sharp", sans-serif' ,
//For varible font usage sometimes
// 'serif': '"Source Han Serif CN Variable", "Source Han Serif SC", "Source Han Serif CN","Noto Serif CJK SC", "Songti SC", STSong, "AR PL New Sung", "AR PL SungtiL GB", NSimSun, SimSun, "TW\-Sung", "WenQuanYi Bitmap Song", "AR PL UMing CN", "AR PL UMing HK", "AR PL UMing TW", "AR PL UMing TW MBE", PMingLiU, MingLiU, serif',
2024-09-28 23:59:37 -07:00
serif : '"Source Han Serif SC", "Source Han Serif CN","Noto Serif CJK SC", "Songti SC", STSong, "AR PL New Sung", "AR PL SungtiL GB", NSimSun, SimSun, "TW-Sung", "WenQuanYi Bitmap Song", "AR PL UMing CN", "AR PL UMing HK", "AR PL UMing TW", "AR PL UMing TW MBE", PMingLiU, MingLiU, serif' ,
cursive : 'FancyTitleFont,"Source Han Serif SC", "Source Han Serif CN", "Noto Serif CJK SC", "Songti SC", STSong, "AR PL New Sung", "AR PL SungtiL GB", NSimSun, SimSun, "TW-Sung", "WenQuanYi Bitmap Song", "AR PL UMing CN", "AR PL UMing HK", "AR PL UMing TW", "AR PL UMing TW MBE", PMingLiU, MingLiU, serif' ,
2024-09-13 20:40:08 -07:00
mono : "'Fira Code','Cascadia Code',Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New','Sarasa Mono SC','Noto Sans CJK SC','monospace', monospace"
2024-09-14 15:48:25 -07:00
} ,
2024-09-14 18:06:29 -07:00
typography : ( ( theme ) = > {
2024-10-15 12:11:40 -07:00
const common = {
ul : {
listStyleType : "square" ,
listStylePosition : "outside" ,
} ,
ol : {
listStyleType : "decimal" ,
listStylePosition : "outside" ,
} ,
maxWidth : "100%" ,
} ;
const themeTokiwa = {
2024-10-16 17:04:54 -07:00
'--tw-prose-body' : theme ( 'colors.gray.900' ) ,
'--tw-prose-headings' : theme ( 'colors.eucalyptus.700' ) ,
'--tw-prose-lead' : theme ( 'colors.eucalyptus.400' ) ,
'--tw-prose-links' : theme ( 'colors.eucalyptus.400' ) ,
'--tw-prose-bold' : theme ( 'colors.eucalyptus.800' ) ,
'--tw-prose-counters' : theme ( 'colors.gray.900' ) ,
'--tw-prose-bullets' : theme ( 'colors.java.900' ) ,
'--tw-prose-hr' : theme ( 'colors.gray.600' ) ,
'--tw-prose-quotes' : theme ( 'colors.gray.900' ) ,
'--tw-prose-quote-borders' : theme ( 'colors.eucalyptus.700' ) ,
'--tw-prose-captions' : theme ( 'colors.gray.800' ) ,
'--tw-prose-code' : theme ( 'colors.sunglow.900' ) ,
'--tw-prose-pre-code' : theme ( 'colors.gray.500' ) ,
'--tw-prose-pre-bg' : theme ( 'colors.gray.500' ) ,
'--tw-prose-th-borders' : theme ( 'colors.gray.500' ) ,
'--tw-prose-td-borders' : theme ( 'colors.gray.500' ) ,
2024-09-14 19:04:24 -07:00
a : {
color : theme ( 'colors.eucalyptus.400' ) ,
2024-10-16 17:04:54 -07:00
"&:hover, &:focus" : {
2024-09-14 19:04:24 -07:00
color : theme ( 'colors.java.500' ) ,
} ,
} ,
2024-10-15 12:11:40 -07:00
} ;
const themeStar = {
2024-10-16 17:04:54 -07:00
'--tw-prose-body' : theme ( 'colors.gray.400' ) ,
'--tw-prose-headings' : theme ( 'colors.eucalyptus.500' ) ,
'--tw-prose-lead' : theme ( 'colors.eucalyptus.400' ) ,
'--tw-prose-links' : theme ( 'colors.eucalyptus.500' ) ,
'--tw-prose-bold' : theme ( 'colors.eucalyptus.100' ) ,
'--tw-prose-counters' : theme ( 'colors.gray.100' ) ,
'--tw-prose-bullets' : theme ( 'colors.java.100' ) ,
'--tw-prose-hr' : theme ( 'colors.gray.400' ) ,
'--tw-prose-quotes' : theme ( 'colors.gray.100' ) ,
'--tw-prose-quote-borders' : theme ( 'colors.eucalyptus.300' ) ,
'--tw-prose-captions' : theme ( 'colors.gray.200' ) ,
2024-10-16 17:20:15 -07:00
'--tw-prose-code' : theme ( 'colors.sunglow.300' ) ,
2024-10-16 17:04:54 -07:00
'--tw-prose-pre-code' : theme ( 'colors.gray.500' ) ,
'--tw-prose-pre-bg' : theme ( 'colors.gray.500' ) ,
'--tw-prose-th-borders' : theme ( 'colors.gray.500' ) ,
'--tw-prose-td-borders' : theme ( 'colors.gray.500' ) ,
2024-10-15 12:11:40 -07:00
a : {
2024-10-16 17:04:54 -07:00
color : theme ( 'colors.eucalyptus.300' ) ,
"&:hover, &:focus" : {
color : theme ( 'colors.java.400' ) ,
2024-10-15 12:11:40 -07:00
} ,
2024-09-14 18:06:29 -07:00
} ,
} ;
return {
2024-09-14 15:48:25 -07:00
DEFAULT : {
css : {
2024-10-15 12:11:40 -07:00
. . . themeTokiwa ,
. . . common ,
} ,
} ,
dark : {
css : {
. . . themeStar ,
. . . common ,
2024-09-14 15:48:25 -07:00
} ,
} ,
2024-09-14 18:06:29 -07:00
} ;
} ) ,
2024-09-11 07:54:39 -07:00
}
} ,
2024-10-15 12:11:40 -07:00
variants : {
extend : { typography : [ "dark" ] }
} ,
2024-09-14 15:48:25 -07:00
plugins : [
2024-09-28 23:59:37 -07:00
typography ,
2024-09-14 15:48:25 -07:00
] ,
2024-09-11 07:54:39 -07:00
} ;
export default config ;