Closed poVoq closed 1 year ago
Hi!
Thank you for reaching out with this feature request! I always appreciate feedback that helps improve the theme.
I really like this idea. Here's what I'm thinking:
config.toml
file, as easy as:[extra]
skin = "orange"
Modular approach: The default styles will be retained, with supplementary .css
files introduced for each colour scheme. This ensures that only the necessary colour variables are adjusted.
Fallback: If there's an issue with a selected colour scheme, and to avoid a styleless site if the variable is unset, the theme will always fallback to the default (current) colour palette. This will be achieved by loading the skin
after the main.css
(which will always load).
I will create a theme based on orange tones and a few more, add the proper documentation, and push the changes.
Done in #105!
Take a look at the available skins and how to create your own.
That is how I resolved skins for a long time, but there were many people that used my theme as a submodule in their repository, so they did not want to have to override any of the abridge files directly. What I have come up with in the refactor branch is using SASS @use with ();
https://github.com/Jieiku/abridge/blob/refactor/COPY-TO-ROOT-SASS/abridge.scss
That file allows them to override any value from the theme's abridge.scss file that has !default;
This was a big undertaking at the time, I also eliminated all use of @import
because it is deprecated, you can read about that here: https://github.com/sass/sass/blob/main/accepted/module-system.md#timeline
Hey @Jieiku!
Thanks for the heads up regarding the use of @import
; I had no idea.
I understand your approach and I think it's great for users who want a lot of customisability. I also understand the concerns with not wanting to modify the theme's files directly.
Luckily —I've just checked—, it's also possible to store the skins in sass/skins
(i.e. inside the main Zola project directory), so it's not necessary to place these inside the theme's files.
For now, I'm leaning towards leaving the system as is (lean and minimal), with an updated documentation that explains the two possible paths to store new skins.
It's great to have a reference like your system in case I decide to overhaul it in the future, though.
Thanks again for your input! It's always appreciated.
No problem, I only recently learned about import as well during the refactor. (and Zola has only supported the alternative loading methods since 0.17.x)
oh, that's great that they work from there!
It has been great having your theme as a reference too, your theme has led to many recent improvements in abridge.
Feature Request
Would be nice if there was a simple way to change the current turquoise text color for light and dark mode into something else, like orange though the config file.
Thanks.