12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- /* eslint-disable global-require */
- const colors = require('tailwindcss/colors');
- function withOpacityValue(variable) {
- return ({ opacityValue }) => {
- if (opacityValue === undefined) {
- return `rgb(var(${variable}))`;
- }
- return `rgb(var(${variable}) / ${opacityValue})`;
- };
- }
- module.exports = {
- content: ['./src/**/*.{js,jsx,ts,tsx,vue}'],
- darkMode: 'class', // or 'media' or 'class'
- theme: {
- extend: {
- colors: {
- primary: withOpacityValue('--color-primary'),
- secondary: withOpacityValue('--color-secondary'),
- accent: withOpacityValue('--color-accent'),
- gray: colors.zinc,
- orange: colors.orange,
- },
- fontFamily: {
- sans: ['Poppins', 'sans-serif'],
- mono: ['Source Code Pro', 'monospace'],
- },
- container: {
- center: true,
- padding: {
- DEFAULT: '1rem',
- sm: '2rem',
- },
- },
- },
- },
- variants: {
- extend: {},
- },
- plugins: [require('@tailwindcss/typography')],
- };
|