修改部分规则模块删除无用前端 新增前端界面
This commit is contained in:
45
modeler/src/tailwind.ts
Normal file
45
modeler/src/tailwind.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* This file is part of the kernelstudio package.
|
||||
*
|
||||
* (c) 2014-2025 zlin <admin@kernelstudio.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE file
|
||||
* that was distributed with this source code.
|
||||
*/
|
||||
|
||||
import colors from 'tailwindcss/colors'
|
||||
import plugin from 'tailwindcss/plugin'
|
||||
import selectorParser from 'postcss-selector-parser'
|
||||
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
export default {
|
||||
darkMode: 'class',
|
||||
content: [
|
||||
"./**/*.{vue,js,ts,jsx,tsx}",
|
||||
],
|
||||
theme: {
|
||||
extend: {
|
||||
colors: {
|
||||
...colors,
|
||||
primary: {
|
||||
light: '#e744ba',
|
||||
dark: '#000'
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
plugin(function ({addVariant, prefix}: any) {
|
||||
addVariant('dark', ({modifySelectors, separator}: any) => {
|
||||
modifySelectors(({selector}: any) => {
|
||||
return selectorParser((selectors) => {
|
||||
selectors.walkClasses((sel) => {
|
||||
sel.value = `dark${separator}${sel.value}`
|
||||
sel.parent?.insertBefore(sel, selectorParser().astSync(prefix('.dark-mode ')))
|
||||
})
|
||||
}).processSync(selector)
|
||||
})
|
||||
})
|
||||
})
|
||||
],
|
||||
}
|
||||
Reference in New Issue
Block a user