Skip to content

Commit 6126ffe

Browse files
author
Vadim Demedes
committed
Exclude text-current and border-current utilities
They use `currentColor` statement which is not supported by `css-to-react-native`.
1 parent 5e7710c commit 6126ffe

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

build.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ const supportedUtilities = [
9090
];
9191

9292
const isUtilitySupported = utility => {
93+
// Skip utilities with `currentColor` values
94+
if (['border-current', 'text-current'].includes(utility)) {
95+
return false;
96+
}
97+
9398
for (const supportedUtility of supportedUtilities) {
9499
if (typeof supportedUtility === 'string' && supportedUtility === utility) {
95100
return true;

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ tailwind('pt-12 items-center');
8989
- [Letter Spacing](https://tailwindcss.com/docs/letter-spacing)
9090
- [Line Height](https://tailwindcss.com/docs/line-height) (only fixed line-heights)
9191
- [Text Align](https://tailwindcss.com/docs/text-align)
92-
- [Text Color](https://tailwindcss.com/docs/text-color)
92+
- [Text Color](https://tailwindcss.com/docs/text-color) (all except `text-current`)
9393
- [Text Decoration](https://tailwindcss.com/docs/text-decoration)
9494
- [Text Transform](https://tailwindcss.com/docs/text-transform)
9595

@@ -100,7 +100,7 @@ tailwind('pt-12 items-center');
100100
### Borders
101101

102102
- [Border Color](https://tailwindcss.com/docs/border-color)
103-
- [Border Style](https://tailwindcss.com/docs/border-style)
103+
- [Border Style](https://tailwindcss.com/docs/border-style) (all except `border-current`)
104104
- [Border Width](https://tailwindcss.com/docs/border-width)
105105
- [Border Radius](https://tailwindcss.com/docs/border-radius)
106106

0 commit comments

Comments
 (0)