hikerpig / gatsby-project-kb

Developing gatsby-theme-kb, a Gatsby theme for publishing Knowledge Base.
https://gatsby-project-kb.vercel.app/
MIT License
62 stars 15 forks source link

shadowing CSS #35

Closed matebitte closed 2 years ago

matebitte commented 2 years ago

hey, i'm having a tough time shadowing the theme.css and vars.css.

none of those directory variants work. The site builds, but the CSS is untouched:

src\foam-template-gatsby-kb\styles\*.css
src\foam-gatsby-kb\styles\*.css
src\gatsby-project-kb\styles\*.css
src\gatsby-theme-kb\styles\*.css
gatsby-theme-kb\src\styles\*.css
src\@hikerpig\foam-template-gatsby-kb\styles\*.css
src\@hikerpig\foam-gatsby-kb\styles\*.css
src\@hikerpig\gatsby-project-kb\styles\*.css

The source and version history can be found here: https://github.com/lenowac/wiki

I understand that OSS comes without support, but in case you happen to have some spare time, I'd really appreciate a little help. In case you don't, that's very understandable :)

Best regards, lenowac ^^

matebitte commented 2 years ago

just noticed that the most obvious way, importing them in gatsby-browser, seems to work just fine, except for the graph module.

hikerpig commented 2 years ago

Thanks for using this theme. I don't think Gatasby's shadowing feature includes CSS files. And it's right to import your own css file in gatsby-browser to override styles in a plain old Cascading way. I should add this to the instructions. What do you mean by except for the graph module ? Can you post an example of what you tried to accomplish? Maybe it's my CSS structure that needs to change.

hikerpig commented 2 years ago

@lenowac I checked the Gatsby shadowing tutorial and found that it's possible to override the css files so I'm mistaken in the last comment. But in this theme's case, I don't think it's a good idea to shadow the whole css file. We can simply add new styles to override them. I've added a new post describing some useful approaches to override the styles, hope it may solve your issue.

matebitte commented 2 years ago

This is absolutely awesome! Lots of love <3