New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom callout colors no longer work #1011
Comments
Agh! At first glance, I think you're correct @Ethan0429. I didn't do a great job reviewing #1010 and clearly this is a consequence. Let me do a bit of work when I'm more free to figure out a good solution to both this problem and the one that #1010 resolves. In the meantime, you should be able to pin the remote theme to a previous commit and/or a previous release. Sorry for the confusion! cc: @pdmosses |
Awesome! It's not problem at all. Thank you for the quick reply! |
@mattxwang I also reviewed this, and I should have checked that (1) we have a regression test for adding custom colors, and (2) the regression test site still builds. Mea culpa 🙄 In fact (1) is okay: the current callout tests define a pink callout, and the pink color shades are defined in I think the root of the problem is that the theme docs make claims that are inconsistent. In Override and completely custom styles we have:
And in Callouts configuration:
Custom colors were deliberately not used in the callout illustrations in the theme docs, so the deploy preview built okay. |
More precisely: To allow configuration of callouts with custom colors, the implementation imported A solution might be to define custom callout colors in color schemes, which do get imported before To work around this inconsistency, {% include css/custom.scss.liquid %}
{% include css/callouts.scss.liquid color_scheme = include.color_scheme %}
{% include css/custom.scss.liquid %} Then any color variables defined in This workaround would correspond to PR #1010 but with only the addition of a line, omitting the deletion of a line. For a future version of the theme, we might apply each callout configuration only to a specific color scheme, and insist on defining custom color variables in color schemes. |
@mattxwang I wrote:
The theme defines classes for button colors. Perhaps it should also define corresponding classes for callouts? Unfortunately, I have no expertise at all in SCSS, nor in color design Writing code like that in |
(same comment made in PR) |
This is an alternative PR that resolves #1011. Unlike #1013, this PR defines a *new* SASS file, `_sass/custom/setup.scss`, specifically designed for new custom variables (and other SASS-only constructs). It's imported after our `support` SASS files are (functions, variables), but otherwise is imported before all other files (ex, when CSS is emitted). So, custom callout colors can now be defined in this file. I also move the custom callout colors present in `custom.scss` to the right location. I've added some docs that briefly explain how to use the feature. Feedback is welcome! --- As an aside, I chose not to add a `_includes/css` file that imports this, and then import that file. I think that's only necessary if we're trying to render liquid somehow in the SASS file; since we're not trying to do that for `setup.scss`, I've opted to not include it. If we think this is relevant, I can re-add it. Co-authored-by: Peter Mosses <18308236+pdmosses@users.noreply.github.com>
Describe the bug
This commit 53edd78 seems to have broken the ability to customize callout colors using custom defined colors from
_sass/custom/custom.scss
, as the build process fails (using Github Actions) with the following error:To Reproduce
Steps to reproduce the behavior:
_sass/custom/custom.scss
filemagenta-000
,magenta-300
/_config.yaml
e.g.Expected behavior
As it has always worked before 53edd78, the build should complete, and callout colors will successfully overwrite using the custom colors defined.
Desktop
The text was updated successfully, but these errors were encountered: