2 Star 28 Fork 14

故时旅人/BM导航

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
tailwind.config.cjs 983 Bytes
Copy Edit Raw Blame History
故时旅人 authored 2023-11-09 11:13 . 5.0.0
const PresetFontSizeConfig = {}
const PresetRadiusConfig = {}
const PresetSpacingConfig = {
"2em":"2em",
"3em":"3em",
"4em":"4em",
"5em":"5em",
}
for (let i = 0; i < 100; i++) {
if (i < 61) {
PresetFontSizeConfig[i] = i + 'px'
}
if (i < 30) {
PresetRadiusConfig[i] = i + 'px'
}
PresetSpacingConfig[i] = i + 'px'
}
function cloneDeep(obj) {
return JSON.parse(JSON.stringify(obj))
}
module.exports = {
darkMode: 'class',
content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
corePlugins: {
preflight: false
},
theme: {
//基于默认配置的继承样式
extend: {
colors: {
"main":'#5354EE',
"bgLight":'#F8FAFC',
"bgDark":"#16161a",
"bgDark-2":"#232429",
"borderDark":"#35353a"
},
fontSize: () => cloneDeep(PresetFontSizeConfig),
borderRadius: () => cloneDeep(PresetRadiusConfig),
lineHeight:()=>cloneDeep(PresetSpacingConfig)
},
//直接覆盖,非继承
spacing: () => cloneDeep(PresetSpacingConfig)
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/robin901118/homepage_navigation.git
git@gitee.com:robin901118/homepage_navigation.git
robin901118
homepage_navigation
BM导航
master

Search

344bd9b3 5694891 D2dac590 5694891