pmoreno-rodriguez / grav-theme-editorial

Editorial is a GravCMS port of the Editorial theme from HTML5Up.net.
https://editorial.pmdesign.dev
Other
15 stars 4 forks source link

Best way to edit the CSS? #14

Closed cat-a-flame closed 1 year ago

cat-a-flame commented 1 year ago

Hi there! I love the theme, so simple and easy to use. Great job there! :) I want to tweak a few minor things like the font face and some colors. I can access the code, but I was wondering, what happens if I change something then later update the theme to a newer version? Those changes will be lost, or?

pmoreno-rodriguez commented 1 year ago

Hi @cat-a-flame. You can modify the SCSS files, in the /assets/sass folder, and then recompile the main.scss file to create a new main.css in /assets/css. You can do this with Visual Code and the Watch SASS extension, for example. With newer versions, you will lose your changes, unless you propose those changes to me with a pull request on git hub, and those changes are approved.

If the changes you want to introduce are very specific, for your web page, you should use the misc.css file, in the /assets/css folder, which takes precedence over main.css, when loaded by the page.

cat-a-flame commented 1 year ago

Thank you for the clarification, @pmoreno-rodriguez ! I think the best approach is to create my own theme. Some of the changes are for meeting my needs, not sure if others would like it too :)

pmoreno-rodriguez commented 1 year ago

The best way to create your own theme is with theme inheritance. See Grav docs.

This way, any template modifications you make to your legacy theme won't be affected by updates to the parent theme.