Skip to content

Commit

Permalink
feat(preset-uno): add content-empty util
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Nov 29, 2021
1 parent fe75ffd commit a4dac59
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/preset-uno/src/rules/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { rings } from './ring'
import { mixBlendModes, boxShadows } from './shadow'
import { sizes, aspectRatio } from './size'
import { paddings, margins } from './spacing'
import { appearances, breaks, cursors, displays, pointerEvents, resizes, screenReadersAccess, textDecorations, textOverflows, textTransforms, userSelects, whitespaces, fontStyles, fontSmoothings, hyphens, textDecorationStyles, writingModes, writingOrientations, isolations } from './static'
import { appearances, breaks, cursors, displays, pointerEvents, resizes, screenReadersAccess, textDecorations, textOverflows, textTransforms, userSelects, whitespaces, fontStyles, fontSmoothings, hyphens, textDecorationStyles, writingModes, writingOrientations, isolations, contents } from './static'
import { tables } from './table'
import { transforms } from './transform'
import { listStyle, caretColors, boxDecorationBreaks, caretOpacity, imageRenderings, appearance, placeholder, overscrolls, outline } from './behaviors'
Expand Down Expand Up @@ -49,6 +49,7 @@ export const rules: Rule[] = [
fillColors,
borders,
divides,
contents,
fonts,
tabSizes,
textIndents,
Expand Down
4 changes: 4 additions & 0 deletions packages/preset-uno/src/rules/static.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ export const whitespaces: Rule[] = [
[/^(?:whitespace|ws)-(normal|nowrap|pre|pre-line|pre-wrap)$/, ([, v]) => ({ 'white-space': v })],
]

export const contents: Rule[] = [
['content-empty', { content: '""' }],
]

export const breaks: Rule[] = [
['break-normal', { 'overflow-wrap': 'normal', 'word-break': 'normal' }],
['break-word', { 'overflow-wrap': 'break-word' }],
Expand Down

0 comments on commit a4dac59

Please sign in to comment.