-
-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SafeAreaView TW styles not applied #628
Comments
Apparently SafeAreaView will be supported in a future release. |
Fantastic just seen the push after this was posted, Appreiciate the work @marklawlor |
I am still facing this exact same issue. The SafeAreaView can be styled with native styling using the style prop but the nativewind's classes aren't working. I am currently using:
|
I'm facing the same problem with TouchableOpacity.
|
@pedrohamarques try upgrading nativewind to version 4.0.36 |
Did you find a work around or has it been fixed, currently facing the same problem with not-so-different versioning. |
* 🚰ci: collect coverage from api, and rename testing command * 🗑️chore: shadcn removal, reduce bundle size * 🗑️chore: where else do we delete useless stuff * 🗑️chore: nah, fk nextjs * 🐛fix: resolve conflict of tsconfig and added fonts, a shit tons of it * ✨feat: default header with gap, ass * 🐛fix: expo jest now instead of test * 🐛fix: fk snapshot got hands * 🐧chore: try to manage packages, but realized we are too late for that * 🐧chore: wasting * ♻️chore: versions control * ♻️chore: versions control II * ♻️ feat: TUI turbo ITS FK GREAT * 🐞bugs: fixed tailwind works on sum,d oesn't on others https://www.nativewind.dev/quick-starts/react-native-cli setup tailwind section * 🐞fixed: single quote fixed, no body against it * 🐧bug: attempt to use marcos bottom sheet,agasin, FAILED * ♻️code: trash * Revert "♻️code: trash" This reverts commit 80d1940. * 🐧fk: imma need input * 🐧 ui: lets help others * 🗑️chore: fixed pnpm audit and versions control, prisma latest * 📁chore: sleep first, code after, * 🐞bugS: fixed all your silly mistakes * 🐞fixed: ts * 🐧ui: atta boi, google gap-2 * 🐞fixed: help stef before * 🐧masdasmdlkasd * 🐧chore: chore * ♻️ bugs: deployment realted * 📁bug: wher am i * ♻️fixed: testin and trpc typed * 🐧ui: default header * 🐞bugs: version version of pnpm up caniuse-lite * 🐧 fluc: better message * 🐞fluc: aight, real works this time * 🐧ui: default header, background new color * 🐧fluc: why tf I keep doing sidequest * 🐞fixing: sdk 50 maybe, nativewind is ASS * 🐧fluc: BEEFIEST update sdk jesus why you do this to me * ♻️tldr: nativewind/nativewind#628 * Auto stash before merge of "165-frontend-move-header-to-the-correct-location" and "origin/165-frontend-move-header-to-the-correct-location" * Auto stash before merge of "165-frontend-move-header-to-the-correct-location" and "origin/165-frontend-move-header-to-the-correct-location" * ⚙️tldr: java 17 instead of 11 now, FK YOU EXPO * ⚙️tldr: fixing https://docs.swmansion.com/react-native-gesture-handler/docs/fundamentals/installation * 🐞bug: gorhom/react-native-bottom-sheet#1332 another broken lib * 🐞bug: can't fix the bottom sheet, is beyond us * 🐧feat: layout, 1 * 🐧fluc: layout 1 done,2 more to go and get rid of the unsued import * 🐧ui: picker...watf * 🐧ui: im so sorry guys, workout screen * 🐧ui: inbox screen structure * 🐧ui: inbox structure done, now to friends * 🐧ui: friends done,ui ready * 🐧ci/cd: tesgting added * 🐞fix: will write test in the next issue * 🐧good to go * 📁fixed: the damn LOGIN of CLERTK * ♻️build: prisma schema migration init * ♻️build: standardize ti * 🐧build: comment out the eas * 📁chore: fixed * 📁chore: fixed seed prod * Add warning console log for null user data along with todo comment --------- Co-authored-by: mva919 <mva919@gmail.com>
… to team (#199) * 🚰ci: collect coverage from api, and rename testing command * 🗑️chore: shadcn removal, reduce bundle size * 🗑️chore: where else do we delete useless stuff * 🗑️chore: nah, fk nextjs * 🐛fix: resolve conflict of tsconfig and added fonts, a shit tons of it * ✨feat: default header with gap, ass * 🐛fix: expo jest now instead of test * 🐛fix: fk snapshot got hands * 🐧chore: try to manage packages, but realized we are too late for that * 🐧chore: wasting * ♻️chore: versions control * ♻️chore: versions control II * ♻️ feat: TUI turbo ITS FK GREAT * 🐞bugs: fixed tailwind works on sum,d oesn't on others https://www.nativewind.dev/quick-starts/react-native-cli setup tailwind section * 🐞fixed: single quote fixed, no body against it * 🐧bug: attempt to use marcos bottom sheet,agasin, FAILED * ♻️code: trash * Revert "♻️code: trash" This reverts commit 80d1940. * 🐧fk: imma need input * 🐧 ui: lets help others * 🗑️chore: fixed pnpm audit and versions control, prisma latest * 📁chore: sleep first, code after, * 🐞bugS: fixed all your silly mistakes * 🐞fixed: ts * 🐧ui: atta boi, google gap-2 * 🐞fixed: help stef before * 🐧masdasmdlkasd * 🐧chore: chore * ♻️ bugs: deployment realted * 📁bug: wher am i * ♻️fixed: testin and trpc typed * 🐧ui: default header * 🐞bugs: version version of pnpm up caniuse-lite * 🐧 fluc: better message * 🐞fluc: aight, real works this time * 🐧ui: default header, background new color * 🐧fluc: why tf I keep doing sidequest * 🐞fixing: sdk 50 maybe, nativewind is ASS * 🐧fluc: BEEFIEST update sdk jesus why you do this to me * ♻️tldr: nativewind/nativewind#628 * Auto stash before merge of "165-frontend-move-header-to-the-correct-location" and "origin/165-frontend-move-header-to-the-correct-location" * Auto stash before merge of "165-frontend-move-header-to-the-correct-location" and "origin/165-frontend-move-header-to-the-correct-location" * ⚙️tldr: java 17 instead of 11 now, FK YOU EXPO * ⚙️tldr: fixing https://docs.swmansion.com/react-native-gesture-handler/docs/fundamentals/installation * 🐞bug: gorhom/react-native-bottom-sheet#1332 another broken lib * 🐞bug: can't fix the bottom sheet, is beyond us * 🐧feat: layout, 1 * 🐧fluc: layout 1 done,2 more to go and get rid of the unsued import * 🐧ui: picker...watf * 🐧ui: im so sorry guys, workout screen * 🐧ui: inbox screen structure * 🐧ui: inbox structure done, now to friends * 🐧ui: friends done,ui ready * 🐧ci/cd: tesgting added * 🐞fix: will write test in the next issue * 🐧good to go * 📁fixed: the damn LOGIN of CLERTK * ♻️build: prisma schema migration init * ♻️build: standardize ti * 🐧build: comment out the eas * 📁chore: fixed * 📁chore: fixed seed prod * 🗑️chore: files name and relative path 1. change all routers to..duh routers 2. update all relative path, even if it is test files 3. move all test file to a dedicated folder, avoid clutter 4. about to write picker-modal test * 🗑️chore: okay, got it, WHO TF WROTE TOGGLE * 🗑️chore: files name, dadadada * 🗑️chore:f iles name change again * 🤦♂️ci/cd; divider test pass, failed action-button rename tests in api to router, specifically * 🐧ci/cd: passed action-button, now onto picker-modal * 🐧fluc: testing passed, more snapshot, fk me * 🤦♂️ fluc: revertable, af FK CLERK * 🤦♂️attempt: to fixed the stupid warning * Revert "🤦♂️attempt: to fixed the stupid warning" This reverts commit 5a6ad2f. * 🤦♂️fixed: signed out fixed, now doing sign in, Jesus * 🤦♂️idk: fk it * 🐧updateD: snapshot * ♻️chore: snapshot II * 🐧fixed: jesus, writeing unit test and fix aaron toggle * 🐧fluc: extend timeout * 🤦♂️fluc: extend timeout * 👑fluic: fk * 🤦♂️remove: un need file * ♻️fixed: ts error from main * ♻️coverage: brrrr brrrrr
Why is this closed? Its still not working |
I am having this same issue. Whats really weird to me is that it seems to be working fine in some cases. Check out this Youtube video. I know that I configured Nativewind/Tailwindcss correct but Im still having issues. |
This issues should be opened as it has not been fixed for the safeAreaView styling |
I know this is not a permanent solution, however, you can use the SafeAreaView from react-native package and works
Instead of
|
@Klerith thats not even a suggestion. The real suggestion is to just use |
Here is what i did as a walk around import type { SafeAreaViewProps } from "react-native-safe-area-context";
import { SafeAreaView as RNSafeAreaView } from "react-native-safe-area-context";
import { useThemeConfig } from "@/core/hooks/use-theme-config";
import colors from "../colors";
export const SafeAreaView = ({ children, ...props }: SafeAreaViewProps) => {
const theme = useThemeConfig();
return (
<RNSafeAreaView
// eslint-disable-next-line react-native/no-inline-styles
style={{
backgroundColor: theme.dark ? colors.blue.DEFAULT : colors.white,
flex: 1,
}}
{...props}
>
{children}
</RNSafeAreaView>
);
}; My use case was around adding inline styles for dark and light mode... But the key thing here is to make it reuseable. I don't think you want to add too many styles to a |
Similar issue with |
Just add import { cssInterop } from "nativewind";
cssInterop(SafeAreaView, { className: "style" }); In the root layout in the meantime |
Nativewind is setup correctly as is working on all other react components except SafeAreaView, see code below
the TW styles are working on the View and Text components, however the SafeAreaView component/wrrapper they are not working, changing it to just a View works and the TW styles applied work however not as SafeAreaView, it is not an issue with safeareaview as you can see the commented out native inline styles, these work on the safeareaview.
Here are some setup information
see two images for before and after appying the SafeAreaView the bg is removed back to white
The text was updated successfully, but these errors were encountered: