Skip to content

Commit

Permalink
feat: 为 UnoCSS 新增常用的自定义规则
Browse files Browse the repository at this point in the history
  • Loading branch information
pany-ang committed Feb 12, 2025
1 parent 48f3e82 commit 1458185
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion uno.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ export default defineConfig({
presetRemToPx()
],
// 自定义规则
rules: [],
rules: [
["clearfix", { content: "''", display: "table", clear: "both" }],
["no-select", { "user-select": "none", "touch-action": "none" }],
["ellipsis", { "white-space": "nowrap", "overflow": "hidden", "text-overflow": "ellipsis" }],
[/^multi-ellipsis-(\d+)$/, ([, d]) => ({ "display": "-webkit-box", "-webkit-line-clamp": d, "-webkit-box-orient": "vertical", "overflow": "hidden", "text-overflow": "ellipsis" })]
],
// 自定义快捷方式
shortcuts: {
"wh-full": "w-full h-full",
Expand Down

0 comments on commit 1458185

Please sign in to comment.