Skip to content

Is is possible to remove styles from parent route? #1099

Closed Answered by sergiodxa
dpyzo0o asked this question in Q&A
Discussion options

You must be logged in to vote

You could use layout routes for that.

  1. Create a routes/__tailwind.tsx route where you export the links loading the Tailwind styles and a default export with only an Outlet component.
  2. Create a routes/__tailwind folder, any route inside that directory will be nested inside the routes/__tailwind.tsx route so it will have tailwind styles.
  3. Create your routes without Tailwind styles inside the routes folder and outside the __tailwind folder, those routes will not be nested inside __tailwind.tsx so they will not have the styles.
routes/__tailwind/a.tsx
routes/__tailwind.tsx
routes/b.tsx

☝️ something like that.

All layout routes starting with __ will not add segments to the URL so you will have /a

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dpyzo0o
Comment options

Answer selected by dpyzo0o
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants