Skip to content

Commit

Permalink
feat(preset-mini): add appearance-auto utility (#3470)
Browse files Browse the repository at this point in the history
  • Loading branch information
navorite committed Jan 1, 2024
1 parent e2a0809 commit 7c34bef
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/preset-mini/src/_rules/behaviors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@ function handleColorOrWidth(match: RegExpMatchArray, ctx: RuleContext<Theme>): C
}

export const appearance: Rule[] = [
['appearance-none', {
'-webkit-appearance': 'none',
'appearance': 'none',
}],
['appearance-auto', { '-webkit-appearance': 'auto', 'appearance': 'auto' }],
['appearance-none', { '-webkit-appearance': 'none', 'appearance': 'none' }],
]

function willChangeProperty(prop: string): string | undefined {
Expand Down
1 change: 1 addition & 0 deletions test/assets/output/preset-mini-targets.css
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,7 @@ unocss .scope-\[unocss\]\:block{display:block;}
.outline-unset{outline-style:unset;}
.outline-none{outline:2px solid transparent;outline-offset:2px;}
.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px;}
.appearance-auto{-webkit-appearance:auto;appearance:auto;}
.appearance-none{-webkit-appearance:none;appearance:none;}
.order-\$variable{order:var(--variable);}
.order-first{order:-9999;}
Expand Down
1 change: 1 addition & 0 deletions test/assets/preset-mini-targets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const presetMiniTargets: string[] = [
'outline-size-[var(--width)]',
'outline-offset-[var(--offset)]',
'appearance-none',
'appearance-auto',
'will-change-margin,padding',
'will-change-padding,margin',
'will-change-transform',
Expand Down

0 comments on commit 7c34bef

Please sign in to comment.