soapbox/tailwind.config.cjs

105 wiersze
3.2 KiB
JavaScript
Czysty Zwykły widok Historia

const { parseColorMatrix } = require('./tailwind/colors.cjs');
2022-03-07 22:54:45 +00:00
2022-10-24 22:24:34 +00:00
/** @type {import('tailwindcss').Config} */
2022-03-19 18:20:00 +00:00
module.exports = {
content: ['./app/**/*.{html,js,ts,tsx}', './custom/instance/**/*.html', './app/index.ejs'],
2022-03-19 18:20:00 +00:00
darkMode: 'class',
theme: {
screens: {
sm: '581px',
md: '768px',
lg: '976px',
xl: '1280px',
2022-03-19 18:20:00 +00:00
},
extend: {
2022-09-14 14:35:32 +00:00
boxShadow: ({ theme }) => ({
2022-07-28 13:38:05 +00:00
'3xl': '0 25px 75px -15px rgba(0, 0, 0, 0.25)',
2022-09-14 14:35:32 +00:00
'inset-ring': `inset 0 0 0 2px ${theme('colors.accent-blue')}`,
}),
2022-03-19 18:20:00 +00:00
fontSize: {
base: '0.9375rem',
},
fontFamily: {
'sans': [
'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',
],
'mono': [
'Roboto Mono',
'ui-monospace',
'mono',
],
2022-03-19 18:20:00 +00:00
},
spacing: {
'4.5': '1.125rem',
},
colors: parseColorMatrix({
2022-03-23 21:27:35 +00: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],
secondary: [100, 200, 300, 400, 500, 600],
2022-03-23 21:27:35 +00: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],
'accent-blue': true,
'gradient-start': true,
'gradient-end': true,
'greentext': true,
2022-03-07 22:54:45 +00:00
}),
2022-04-25 16:39:33 +00:00
animation: {
2022-04-25 16:48:13 +00: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 15:47:02 +00:00
'enter': 'enter 200ms ease-out',
'leave': 'leave 150ms ease-in forwards',
2022-04-25 16:39:33 +00:00
},
keyframes: {
2022-04-25 16:48:13 +00:00
'sonar-scale-4': {
2022-10-04 15:47:16 +00:00
from: { opacity: '0.4', transform: 'scale(1)' },
to: { opacity: '0', transform: 'scale(4)' },
2022-04-25 16:39:33 +00:00
},
2022-04-25 16:48:13 +00:00
'sonar-scale-3': {
2022-10-04 15:47:16 +00:00
from: { opacity: '0.4', transform: 'scale(1)' },
to: { opacity: '0', transform: 'scale(3.5)' },
2022-04-25 16:39:33 +00:00
},
2022-04-25 16:48:13 +00:00
'sonar-scale-2': {
2022-10-04 15:47:16 +00:00
from: { opacity: '0.4', transform: 'scale(1)' },
to: { opacity: '0', transform: 'scale(3)' },
2022-04-25 16:39:33 +00:00
},
2022-04-25 16:48:13 +00:00
'sonar-scale-1': {
2022-10-04 15:47:16 +00:00
from: { opacity: '0.4', transform: 'scale(1)' },
to: { opacity: '0', transform: 'scale(2.5)' },
2022-04-25 16:39:33 +00:00
},
2022-12-20 15:47:02 +00: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 16:39:33 +00:00
},
2022-03-19 18:20:00 +00:00
},
},
plugins: [
require('@tailwindcss/forms'),
require('@tailwindcss/line-clamp'),
2022-03-19 18:20:00 +00:00
require('@tailwindcss/typography'),
],
};