Skip to content

Commit

Permalink
docs: 为 UnoCSS 自定义规则添加使用说明
Browse files Browse the repository at this point in the history
  • Loading branch information
pany-ang committed Feb 12, 2025
1 parent 1458185 commit d24a017
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions uno.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@ export default defineConfig({
],
// 自定义规则
rules: [
// use class="after-clearfix"
["clearfix", { content: "''", display: "table", clear: "both" }],
// use class="no-select"
["no-select", { "user-select": "none", "touch-action": "none" }],
// use class="ellipsis"
["ellipsis", { "white-space": "nowrap", "overflow": "hidden", "text-overflow": "ellipsis" }],
// use class="multi-ellipsis-2"
[/^multi-ellipsis-(\d+)$/, ([, d]) => ({ "display": "-webkit-box", "-webkit-line-clamp": d, "-webkit-box-orient": "vertical", "overflow": "hidden", "text-overflow": "ellipsis" })]
],
// 自定义快捷方式
Expand Down

0 comments on commit d24a017

Please sign in to comment.