mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-27 04:49:47 +01:00
- English locale defaults; remove duplicate zh-only locale files - SM2 utility sharing with the web client where applicable
65 lines
1.8 KiB
TypeScript
65 lines
1.8 KiB
TypeScript
// https://www.npmjs.com/package/@uni-helper/unocss-preset-uni
|
|
import { presetUni } from '@uni-helper/unocss-preset-uni'
|
|
import {
|
|
defineConfig,
|
|
presetAttributify,
|
|
presetIcons,
|
|
transformerDirectives,
|
|
transformerVariantGroup,
|
|
} from 'unocss'
|
|
|
|
export default defineConfig({
|
|
presets: [
|
|
presetUni({
|
|
attributify: {
|
|
// prefix: 'fg-', // If adding prefix, need to use `fg-` prefix in code, eg: <div fg-border="1px solid #000"></div>
|
|
prefixedOnly: true,
|
|
},
|
|
}),
|
|
presetIcons({
|
|
scale: 1.2,
|
|
warn: true,
|
|
extraProperties: {
|
|
'display': 'inline-block',
|
|
'vertical-align': 'middle',
|
|
},
|
|
}),
|
|
// Support CSS class attributes
|
|
presetAttributify(),
|
|
],
|
|
transformers: [
|
|
// Enable directive functions: mainly for supporting @apply, @screen and theme() CSS directives
|
|
transformerDirectives(),
|
|
// Enable () grouping functionality
|
|
// Support CSS class combinations, eg: `<div class="hover:(bg-gray-400 font-medium) font-(light mono)">test unocss</div>`
|
|
transformerVariantGroup(),
|
|
],
|
|
shortcuts: [
|
|
{
|
|
center: 'flex justify-center items-center',
|
|
},
|
|
],
|
|
safelist: [],
|
|
rules: [
|
|
[
|
|
'p-safe',
|
|
{
|
|
padding:
|
|
'env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)',
|
|
},
|
|
],
|
|
['pt-safe', { 'padding-top': 'env(safe-area-inset-top)' }],
|
|
['pb-safe', { 'padding-bottom': 'env(safe-area-inset-bottom)' }],
|
|
],
|
|
theme: {
|
|
colors: {
|
|
/** Theme color, usage: text-primary */
|
|
primary: 'var(--wot-color-theme,#0957DE)',
|
|
},
|
|
fontSize: {
|
|
/** Provide smaller font size, usage: text-2xs */
|
|
'2xs': ['20rpx', '28rpx'],
|
|
'3xs': ['18rpx', '26rpx'],
|
|
},
|
|
},
|
|
})
|