Skip to content

Commit

Permalink
Add fill-none and stroke-none utilities
Browse files Browse the repository at this point in the history
  • Loading branch information
sastan committed Dec 13, 2022
1 parent cb70ab6 commit 622b08d
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/late-bananas-switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@twind/preset-tailwind': minor
---

Add `fill-none` and `stroke-none` utilities
Original file line number Diff line number Diff line change
Expand Up @@ -6349,6 +6349,7 @@ exports[`enumerate 1`] = `
"ease-in-out",
"fill-current",
"fill-inherit",
"fill-none",
"fill-black",
"fill-transparent",
"fill-white",
Expand Down Expand Up @@ -12487,6 +12488,7 @@ exports[`enumerate 1`] = `
"stroke-2",
"stroke-current",
"stroke-inherit",
"stroke-none",
"stroke-black",
"stroke-transparent",
"stroke-white",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6835,6 +6835,7 @@ exports[`suggestAt html 5`] = `
"ease-in-out",
"fill-current",
"fill-inherit",
"fill-none",
"fill-black",
"fill-transparent",
"fill-white",
Expand Down Expand Up @@ -12973,6 +12974,7 @@ exports[`suggestAt html 5`] = `
"stroke-2",
"stroke-current",
"stroke-inherit",
"stroke-none",
"stroke-black",
"stroke-transparent",
"stroke-white",
Expand Down
2 changes: 1 addition & 1 deletion packages/intellisense/src/suggest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const $ = (suggestions: Promise<Suggestion[]>) =>
suggestions.then((suggestions) => suggestions.map(({ value }) => value))

test('suggest with empty input', async () => {
await expect(intellisense.suggest('')).resolves.toHaveLength(14712)
await expect(intellisense.suggest('')).resolves.toHaveLength(14714)
})

test('suggest with single char input', async () => {
Expand Down
10 changes: 8 additions & 2 deletions packages/preset-tailwind/src/defaultTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,10 @@ const theme: DefaultTheme = {
'2xl': '0 25px 25px rgba(0,0,0,0.15)',
none: '0 0 #0000',
},
fill: /* #__PURE__ */ alias('colors'),
fill: ({ theme }) => ({
...theme('colors'),
none: 'none',
}),
grayscale: {
DEFAULT: '100%',
0: '0',
Expand Down Expand Up @@ -725,7 +728,10 @@ const theme: DefaultTheme = {
// 12: '12deg',
},
space: /* #__PURE__ */ alias('spacing'),
stroke: /* #__PURE__ */ alias('colors'),
stroke: ({ theme }) => ({
...theme('colors'),
none: 'none',
}),
strokeWidth: /* #__PURE__ */ linear(2),
// 0: '0',
// 1: '1',
Expand Down
2 changes: 2 additions & 0 deletions packages/preset-tailwind/src/rules.test.json
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,11 @@
"resize-y": ".resize-y{resize:vertical}",
"resize-none": ".resize-none{resize:none}",
"fill-current": ".fill-current{fill:currentColor}",
"fill-none": ".fill-none{fill:none}",
"fill-zinc-100": ".fill-zinc-100{fill:rgba(244,244,245,1)}",
"fill-zinc-100/50": ".fill-zinc-100\\/50{fill:rgba(244,244,245,0.5)}",
"stroke-current": ".stroke-current{stroke:currentColor}",
"stroke-none": ".stroke-none{stroke:none}",
"stroke-1": ".stroke-1{stroke-width:1}",
"sr-only": ".sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;white-space:nowrap;clip:rect(0,0,0,0);border-width:0}",
"not-sr-only": ".not-sr-only{position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;white-space:normal;clip:auto}",
Expand Down

0 comments on commit 622b08d

Please sign in to comment.