Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

SCSS theme inheritance

Started by Muut Archive 10 years ago · 2 replies · 444 views
10 years ago

After hearing lots of good things about Grav, I'm trying to migrate my site over from a GetSimple setup. Mostly going well so far, but I'm struggling a bit with theming. As per the documentation, I've set up a mytheme that inherits everything from antimatter (including copying over template.scss), and started overriding the things I want to change.

What's got me stumbling now is overriding parameters under antimatter/scss/configuration -- in my current example, I want to override $footer-height. I've tried putting my custom setting both into mytheme/scss/template/_custom.scss (which is where the documentation says overrides should go), as well as in mytheme/scss/configuration/template/_custom.scss or even mytheme/scss/configuration/template/_variables.scss (the latter two options made sense to me in terms of loading them early enough to be accessible for use in other scss files).

Any help would be appreciated. (And I know I could just duplicate the entire antimatter theme and start editing the source, but that sort of defeats the purpose)

10 years ago

I never tried actually but I don't think inheritance works at the SCSS level - you need to either copy over the whole SCSS structure, or make your own CSS overrides and load your resulting CSS file.

10 years ago

Well, at least to some degree it is currently implemented and documented... But it clearly breaks down for high-level variables, where SCSS apparently accepts only the first instance. I had a bit of time to read up on SCSS now, I'm moving this over to antimatter at github.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1368 9 years ago
Archive · by Muut Archive, 9 years ago
2 940 9 years ago
Archive · by Muut Archive, 9 years ago
2 4069 9 years ago
Archive · by Muut Archive, 9 years ago
1 2960 9 years ago
Archive · by Muut Archive, 9 years ago
3 1125 9 years ago