Hi Anders,
I might have answered my own question. I read through some of the previous forum questions and found one about using customized colors in a child theme.
In your answer you wrote “I might take a look at adding the colors chosen as CSS variables as well, so child themes can make use of them that way.”
I assume that adding the colors chosen as css variables would be necessary in order for someone to reference them in the custom css as well – but please let me know if there is another way to do so.
Thanks for your work. It’s an awesome theme!
Paul
Hi @pjetton,
Glad you like it! Yes, the colors would need to exist as CSS variables for you to be able to use them in Custom CSS. If you’re adding custom markup as well, you can use the helper classes used in Chaplin itself (.color-accent, .bg-primary, and so on), but if you’re only adding CSS, you’ll need to update the values manually for now.
— Anders
Hi again @pjetton,
I went ahead and added the CSS variables in version 2.5.9 of Chaplin, which should be live within the hour. Once installed, you’ll be able to use the following CSS variables in your child theme (or the Additional CSS field in the Customizer):
/* Typography */
--body-font: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, sans-serif;
--headings-font: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, sans-serif;
--headings-weight: 700;
--headings-case: normal;
--headings-spacing: normal;
/* Colors */
--accent-color: #007c89;
--primary-color: #1a1b1f;
--secondary-color: #747579;
--border-color: #e1e1e3;
--light-background-color: #f1f1f3;
--background-color: #fff;
--headings-color: #1a1b1f;
--buttons-background-color: #007c89;
--buttons-text-color: #fff;
--overlay-text-color: #fff;
These variables will be updated when you change the corresponding setting in the Customizer. Give it a try and let me know if it works as expected.
Hi Anders,
Thanks for the update! I have tested a few of the variables in the customizer so far and everything seems to be working.
I really appreciate your help. Thank you for putting in the extra work!
Cheers,
Paul