Skip to content

Commit

Permalink
fix(preset-mini): content-none should render { content: none } (#…
Browse files Browse the repository at this point in the history
…2650)

Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
  • Loading branch information
kcpru and antfu committed May 23, 2023
1 parent a7c3da3 commit 636a01d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/preset-mini/src/_rules/static.ts
Expand Up @@ -84,7 +84,7 @@ export const contentVisibility: Rule[] = [
export const contents: Rule[] = [
[/^content-(.+)$/, ([, v]) => ({ content: h.bracket.cssvar(v) })],
['content-empty', { content: '""' }],
['content-none', { content: '""' }],
['content-none', { content: 'none' }],
]

export const breaks: Rule[] = [
Expand Down
4 changes: 2 additions & 2 deletions test/assets/output/preset-mini-targets.css
Expand Up @@ -302,8 +302,8 @@ unocss .scope-\[unocss\]\:block{display:block;}
.content-\[string\:attr\(dashed-attr\)\]{content:attr(dashed-attr);}
.content-\[string\:attr\(underlined\\_attr\)\]{content:attr(underlined_attr);}
.content-\$unocss-var{content:var(--unocss-var);}
.content-empty,
.content-none{content:"";}
.content-empty{content:"";}
.content-none{content:none;}
.font-\[system-ui\]{font-family:system-ui;}
.font-\$font-name{font-family:var(--font-name);}
.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;}
Expand Down

0 comments on commit 636a01d

Please sign in to comment.