@daks.dev/svelte.sdk
Version:
DAKS.DEV Svelte SDK
41 lines (40 loc) • 1.04 kB
JavaScript
import plugin from 'tailwindcss/plugin.js';
import 'dotenv/config';
const breakpoint = Number(process.env.PUBLIC_BREAKPOINT);
const r = (x, n = 4) => {
const f = Math.pow(10, n);
return Math.round(x * f) / f;
};
const f = (x, d = 0.25) => [
`${x}rem`,
{
lineHeight: r((x + d) / x)
}
];
export default plugin(() => { }, {
theme: {
extend: {
screens: {
bp: breakpoint && !isNaN(breakpoint)
? `${Math.round((breakpoint / 16) * 10) / 10}rem`
: '50rem'
},
spacing: {
inherit: 'inherit',
unset: 'unset'
},
fontSize: {
'3xs': f(0.5),
'2xs': f(0.625),
'1.5xl': f(1.375),
'2.5xl': f(1.6875),
'3.5xl': f(2),
'4.5xl': f(2.5)
},
listStyleType: {
circle: 'circle',
square: 'square'
}
}
}
});