2023-12-20 18:34:09 -08:00
|
|
|
import aspectRatioPlugin from '@tailwindcss/aspect-ratio';
|
|
|
|
import formsPlugin from '@tailwindcss/forms';
|
|
|
|
import typographyPlugin from '@tailwindcss/typography';
|
2024-03-24 09:38:34 -07:00
|
|
|
import plugin from 'tailwindcss/plugin';
|
2022-03-07 14:54:45 -08:00
|
|
|
|
2023-12-20 18:34:09 -08:00
|
|
|
import { parseColorMatrix } from './tailwind/colors';
|
|
|
|
|
2024-08-24 06:01:17 -07:00
|
|
|
import type { Config } from 'tailwindcss';
|
|
|
|
|
2024-03-24 09:38:34 -07:00
|
|
|
const blackVariantPlugin = plugin(({ addVariant }) => addVariant('black', '.black &'));
|
2024-05-05 05:22:10 -07:00
|
|
|
const reducedMotionPlugin = plugin(({ addVariant }) => addVariant('no-reduce-motion', '.no-reduce-motion &'));
|
2024-03-24 09:38:34 -07:00
|
|
|
|
2023-12-20 18:34:09 -08:00
|
|
|
const config: Config = {
|
2023-09-18 16:53:25 -07:00
|
|
|
content: ['./src/**/*.{html,js,ts,tsx}', './custom/instance/**/*.html', './index.html'],
|
2022-03-19 11:20:00 -07:00
|
|
|
darkMode: 'class',
|
|
|
|
theme: {
|
|
|
|
screens: {
|
|
|
|
sm: '581px',
|
|
|
|
md: '768px',
|
|
|
|
lg: '976px',
|
2022-07-04 12:57:27 -07:00
|
|
|
xl: '1280px',
|
2022-03-19 11:20:00 -07:00
|
|
|
},
|
|
|
|
extend: {
|
2022-09-14 07:35:32 -07:00
|
|
|
boxShadow: ({ theme }) => ({
|
2022-07-28 06:38:05 -07:00
|
|
|
'3xl': '0 25px 75px -15px rgba(0, 0, 0, 0.25)',
|
2022-09-14 07:35:32 -07:00
|
|
|
'inset-ring': `inset 0 0 0 2px ${theme('colors.accent-blue')}`,
|
|
|
|
}),
|
2022-03-19 11:20:00 -07:00
|
|
|
fontSize: {
|
|
|
|
base: '0.9375rem',
|
|
|
|
},
|
|
|
|
fontFamily: {
|
|
|
|
'sans': [
|
2023-10-10 14:54:57 -07:00
|
|
|
'Soapbox i18n',
|
2022-03-19 11:20:00 -07:00
|
|
|
'Inter',
|
|
|
|
'ui-sans-serif',
|
|
|
|
'system-ui',
|
|
|
|
'-apple-system',
|
|
|
|
'BlinkMacSystemFont',
|
|
|
|
'Segoe UI',
|
|
|
|
'Roboto',
|
|
|
|
'Helvetica Neue',
|
|
|
|
'Arial',
|
|
|
|
'Noto Sans',
|
|
|
|
'sans-serif',
|
|
|
|
'Apple Color Emoji',
|
|
|
|
'Segoe UI Emoji',
|
|
|
|
'Segoe UI Symbol',
|
|
|
|
'Noto Color Emoji',
|
|
|
|
],
|
2022-09-30 10:59:19 -07:00
|
|
|
'mono': [
|
|
|
|
'Roboto Mono',
|
|
|
|
'ui-monospace',
|
|
|
|
'mono',
|
|
|
|
],
|
2022-03-19 11:20:00 -07:00
|
|
|
},
|
2022-11-20 14:05:53 -08:00
|
|
|
spacing: {
|
|
|
|
'4.5': '1.125rem',
|
|
|
|
},
|
2022-03-23 14:51:42 -07:00
|
|
|
colors: parseColorMatrix({
|
2022-03-23 14:27:35 -07:00
|
|
|
// Define color matrix (of available colors)
|
|
|
|
// Colors are configured at runtime with CSS variables in soapbox.json
|
|
|
|
gray: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900],
|
|
|
|
primary: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900],
|
2022-07-22 10:30:16 -07:00
|
|
|
secondary: [100, 200, 300, 400, 500, 600],
|
2022-03-23 14:27:35 -07:00
|
|
|
success: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900],
|
|
|
|
danger: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900],
|
|
|
|
accent: [300, 500],
|
2022-07-22 10:30:16 -07:00
|
|
|
'accent-blue': true,
|
2022-05-07 13:23:43 -07:00
|
|
|
'gradient-start': true,
|
|
|
|
'gradient-end': true,
|
2022-09-30 10:59:19 -07:00
|
|
|
'greentext': true,
|
2022-03-07 14:54:45 -08:00
|
|
|
}),
|
2022-04-25 09:39:33 -07:00
|
|
|
animation: {
|
2022-04-25 09:48:13 -07:00
|
|
|
'sonar-scale-4': 'sonar-scale-4 3s linear infinite',
|
|
|
|
'sonar-scale-3': 'sonar-scale-3 3s 0.5s linear infinite',
|
|
|
|
'sonar-scale-2': 'sonar-scale-2 3s 1s linear infinite',
|
|
|
|
'sonar-scale-1': 'sonar-scale-1 3s 1.5s linear infinite',
|
2022-12-20 07:47:02 -08:00
|
|
|
'enter': 'enter 200ms ease-out',
|
|
|
|
'leave': 'leave 150ms ease-in forwards',
|
2022-04-25 09:39:33 -07:00
|
|
|
},
|
|
|
|
keyframes: {
|
2022-04-25 09:48:13 -07:00
|
|
|
'sonar-scale-4': {
|
2022-10-04 08:47:16 -07:00
|
|
|
from: { opacity: '0.4', transform: 'scale(1)' },
|
|
|
|
to: { opacity: '0', transform: 'scale(4)' },
|
2022-04-25 09:39:33 -07:00
|
|
|
},
|
2022-04-25 09:48:13 -07:00
|
|
|
'sonar-scale-3': {
|
2022-10-04 08:47:16 -07:00
|
|
|
from: { opacity: '0.4', transform: 'scale(1)' },
|
|
|
|
to: { opacity: '0', transform: 'scale(3.5)' },
|
2022-04-25 09:39:33 -07:00
|
|
|
},
|
2022-04-25 09:48:13 -07:00
|
|
|
'sonar-scale-2': {
|
2022-10-04 08:47:16 -07:00
|
|
|
from: { opacity: '0.4', transform: 'scale(1)' },
|
|
|
|
to: { opacity: '0', transform: 'scale(3)' },
|
2022-04-25 09:39:33 -07:00
|
|
|
},
|
2022-04-25 09:48:13 -07:00
|
|
|
'sonar-scale-1': {
|
2022-10-04 08:47:16 -07:00
|
|
|
from: { opacity: '0.4', transform: 'scale(1)' },
|
|
|
|
to: { opacity: '0', transform: 'scale(2.5)' },
|
2022-04-25 09:39:33 -07:00
|
|
|
},
|
2022-12-20 07:47:02 -08:00
|
|
|
enter: {
|
|
|
|
from: { transform: 'scale(0.9)', opacity: '0' },
|
|
|
|
to: { transform: 'scale(1)', opacity: '1' },
|
|
|
|
},
|
|
|
|
leave: {
|
|
|
|
from: { transform: 'scale(1)', opacity: '1' },
|
|
|
|
to: { transform: 'scale(0.9)', opacity: '0' },
|
|
|
|
},
|
2022-04-25 09:39:33 -07:00
|
|
|
},
|
2022-03-19 11:20:00 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
plugins: [
|
2023-12-20 18:34:09 -08:00
|
|
|
aspectRatioPlugin,
|
|
|
|
formsPlugin,
|
|
|
|
typographyPlugin,
|
2024-03-24 09:38:34 -07:00
|
|
|
blackVariantPlugin,
|
2024-05-05 05:22:10 -07:00
|
|
|
reducedMotionPlugin,
|
2022-03-19 11:20:00 -07:00
|
|
|
],
|
|
|
|
};
|
2023-12-20 18:34:09 -08:00
|
|
|
|
2024-08-20 06:51:36 -07:00
|
|
|
export { config as default };
|