jekyll-theme-yat
jekyll-theme-yat copied to clipboard
Is there a way to override CSS without unpacking the gem?
I'd like to override just the font size. In development, I'm trying this in assets/main.scss:
---
---
@import "{{ site.theme }}";
body {
font-size: 16px;
}
But I get the error:
Error: File to import not found or unreadable: jekyll-theme-yat. (SassC::SyntaxError)
Ah hah — I'm able to get an override by;
- Importing
yat. - Copying and pasting the theme's
main.scsscontent into mine, and then adding my overrides there.
That's not a lot of duplication - just the one main.scss file. Is this the best way, do you think?
Ah hah — I'm able to get an override by;
- Importing yat.
- Copying and pasting the theme's main.scss content into mine, and then adding my overrides there.
That's not a lot of duplication - just the one main.scss file. Is this the best way, do you think?
Hi @dogweather
You're right, that is the best way to do an override for you. : )
Thanks & Regards
Thanks!
If you want even less code duplication (at the expense of one extra web request), you can create a _includes/custom-head.html with a <link> to a custom stylesheet. For example,
<link rel="stylesheet" href="{{ "/assets/css/custom.css" | relative_url }}">
And in assets/css/custom.scss,
---
---
<your custom Sass rules>