Replies: 2 comments 3 replies
-
|
Hey, right now it is hardcoded to match default's browser style It's a cool idea to support overriding default styles, we will think about it For now you can override built-in tailwind border utility to add your custom color |
Beta Was this translation helpful? Give feedback.
-
|
We've already added support for default styles per React Native component: With that enabled, you can define this at the component level, for example: View {
border-color: var(--color-primary);
}This will be used as the baseline borderColor, while more specific className styles can still override it. We’ve decided not to support default styles for all elements via the universal * selector. In React Native, applying defaults to every element is a bit too broad/overkill, and component-level defaults are more explicit and predictable. So the intended approach here is to use default styles per component rather than |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What happened?
When using the
borderclass, the resolved styles always includeborderColor: "#000000"style:I'm not sure whether this is hardcoded or derived from somewhere else, but I couldn't find a way to override it via
global.css.On the web, it can be customized at the project level via
global.css:I've tried the above with Uniwind, however it had no effect on the resolved value.
Expected behavior
It would be great if the default
borderColorapplied by theborderclass were customizable viaglobal.css, consistent with how Tailwind v4 works on the web. For example, a@layer baserule targeting*withborder-colorcould be respected.Current behaviour
borderalways resolvesborderColorto#000000regardless of any overrides inglobal.css.I'm aware that I could define
--color-borderin the theme and then useborder-borderas an explicit color class, but the resulting name repetition feels off to me. I'd rather keep that as a last resort.Beta Was this translation helpful? Give feedback.
All reactions