Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Jordan Pittman
7b7601a7d6 Add bg-clip-border-area utility
Adds a `bg-clip-border-area` utility for [`background-clip: border-area`](https://developer.mozilla.org/en-US/docs/Web/CSS/background-clip#border-area) which paints the background in the area covered by the border.
2024-09-19 17:12:32 -04:00
3 changed files with 17 additions and 2 deletions

View file

@ -536,6 +536,7 @@ exports[`getClassList 1`] = `
"bg-bottom",
"bg-center",
"bg-clip-border",
"bg-clip-border-area",
"bg-clip-content",
"bg-clip-padding",
"bg-clip-text",

View file

@ -10471,12 +10471,23 @@ test('box-decoration', async () => {
})
test('bg-clip', async () => {
expect(await run(['bg-clip-border', 'bg-clip-padding', 'bg-clip-content', 'bg-clip-text']))
.toMatchInlineSnapshot(`
expect(
await run([
'bg-clip-border',
'bg-clip-padding',
'bg-clip-content',
'bg-clip-text',
'bg-clip-border-area',
]),
).toMatchInlineSnapshot(`
".bg-clip-border {
background-clip: border-box;
}
.bg-clip-border-area {
background-clip: border-area;
}
.bg-clip-content {
background-clip: content-box;
}
@ -10496,10 +10507,12 @@ test('bg-clip', async () => {
'-bg-clip-padding',
'-bg-clip-content',
'-bg-clip-text',
'-bg-clip-border-area',
'bg-clip-border/foo',
'bg-clip-padding/foo',
'bg-clip-content/foo',
'bg-clip-text/foo',
'bg-clip-border-area/foo',
]),
).toEqual('')
})

View file

@ -2750,6 +2750,7 @@ export function createUtilities(theme: Theme) {
staticUtility('bg-clip-border', [['background-clip', 'border-box']])
staticUtility('bg-clip-padding', [['background-clip', 'padding-box']])
staticUtility('bg-clip-content', [['background-clip', 'content-box']])
staticUtility('bg-clip-border-area', [['background-clip', 'border-area']])
staticUtility('bg-origin-border', [['background-origin', 'border-box']])
staticUtility('bg-origin-padding', [['background-origin', 'padding-box']])