代码拉取完成,页面将自动刷新
const plugin = require('tailwindcss/plugin')
const defaultTheme = require('tailwindcss/defaultTheme')
const colors = require('tailwindcss/colors')
module.exports = {
purge: [
'./resources/**/*.blade.php',
'./resources/**/*.js',
'./resources/**/*.vue',
'./app/Models/*.php',
],
theme: {
colors: {
transparent: 'transparent',
current: 'currentColor',
black: colors.black,
white: colors.white,
gray: colors.coolGray,
red: colors.red,
orange: colors.orange,
lime: colors.lime,
yellow: colors.yellow,
green: colors.emerald,
teal: colors.teal,
blue: colors.blue,
indigo: colors.indigo,
purple: colors.purple,
pink: colors.pink,
},
extend: {
fontFamily: {
sans: [
'Inter',
...defaultTheme.fontFamily.sans,
]
},
colors: {
'sidebar-dark': '#313947',
'sidebar-light': '#ffffff',
},
cursor: {
'resize-x': 'ew-resize',
},
maxWidth: {
'8xl': '90rem',
'9xl': '105rem',
'10xl': '120rem',
},
zIndex: {
'1': 1,
'60': 60,
'70': 70,
'80': 80,
'90': 90,
'100': 100,
},
typography: {
DEFAULT: {
css: {
a: {
textDecoration: 'none',
'&:hover': {
opacity: '.75',
},
},
img: {
borderRadius: defaultTheme.borderRadius.lg,
},
},
},
},
},
},
variants: {
extend: {
backgroundColor: ['active'],
backgroundOpacity: ['active'],
borderColor: ['active'],
boxShadow: ['active'],
opacity: ['active'],
rotate: ['active', 'group-hover'],
saturate: ['hover', 'focus', 'group-hover', 'group-focus'],
scale: ['active', 'group-hover'],
textColor: ['active'],
zIndex: ['hover', 'active'],
},
},
plugins: [
require('@tailwindcss/aspect-ratio'),
require('@tailwindcss/forms'),
require('@tailwindcss/typography')(),
plugin(function({ addUtilities }) {
const utilBgPatterns = {
'.pattern-dots-sm': {
'background-image': 'radial-gradient(currentColor 0.5px, transparent 0.5px)',
'background-size': 'calc(10 * 0.5px) calc(10 * 0.5px)',
},
'.pattern-dots-md': {
'background-image': 'radial-gradient(currentColor 1px, transparent 1px)',
'background-size': 'calc(10 * 1px) calc(10 * 1px)',
},
'.pattern-dots-lg': {
'background-image': 'radial-gradient(currentColor 1.5px, transparent 1.5px)',
'background-size': 'calc(10 * 1.5px) calc(10 * 1.5px)',
},
'.pattern-dots-xl': {
'background-image': 'radial-gradient(currentColor 2px, transparent 2px)',
'background-size': 'calc(10 * 2px) calc(10 * 2px)',
},
}
addUtilities(utilBgPatterns)
}),
plugin(function({ addUtilities }) {
const utilFormSwitch = {
'.form-switch': {
'border': 'transparent',
'background-color': colors.coolGray[300],
'background-image': "url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e\")",
'background-position': 'left center',
'background-repeat': 'no-repeat',
'background-size': 'contain !important',
'vertical-align': 'top',
'&:checked': {
'border': 'transparent',
'background-color': 'currentColor',
'background-image': "url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e\")",
'background-position': 'right center',
},
'&:disabled, &:disabled + label': {
'opacity': '.5',
'cursor': 'not-allowed',
},
},
}
addUtilities(utilFormSwitch)
}),
],
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。