Per-route CSS when using FileRoutes
If I want to have a CSS file for an individual route (i.e. that route has unique page flow compared to others), where should I put the CSS file? It seems incredibly inconvenient to have CSS files in a separate folder.
6 Replies
You should be able to just have
routes/index.css
, no?wait wut
I can swear that I tried to import a file and it did NOTHING
I'm actually using Vanilla Extract, maybe that's why it doesn't work sometimes, but still it makes no sense.
The
[...404].css.ts
and download.css.ts
contain the same content:
download.ts
:
[...404].ts
The 404 page actually has styling, while the download page doesn't.![No description](https://cdn.answeroverflow.com/1259846470472044678/image.png)
In devtools
download.css.ts
tag is empty:
Ah it being vanilla extract may have something to do with it
Though as long as they don't have a default export they should work fine?
I don't really understand what's going on
my first guess is that it happens because of the file names
or maybe because 404 is a dynamic route