Add information about how to load CSS dependencies #196
Replies: 4 comments 1 reply
|
Hi Martin! @martindemello Given how many CSS libraries are available on npm, it would be quite a large section (and might go out of date quickly). Perhaps it would be better to suggest a change in the docs for For Primer, another option that should work is to import styles from your own @import '@primer/css/utilities/index.scss';You can then use |
|
Hi Máximo, I just meant document something generic, like This stuff probably seems obvious if you've been doing web development, but it's all new to me, so I figured it would be useful to point out things I had no idea about and could also not find in the docs. |
|
Added a Stylesheets section to the docs that mentions the two most common ways to inject styles in Vite Ruby, and should make it easier to find how to get started. Thanks for the suggestion! |
|
thanks, that looks good!
I just used primer as an example, I meant the general process of loading a stylesheet from an npm module rather than from within |
Uh oh!
There was an error while loading. Please reload this page.
It took me a good bit of googling and trial and error to discover that if I installed
primer-cssvia npm, the way to get it into my rails app was by addingin
app/frontend/entrypoints/application.js(rather than e.g. inapplication.cssor via a stylesheet tag in my erb file)An overview page on the various ways to install and include third-party css libraries into a vite/rails setup would have been very helpful.
All reactions