How can I add a new color to _variables_project.scss #1842
Replies: 4 comments 4 replies
-
I haven't actually tried it, but I think it should work like this: https://getbootstrap.com/docs/5.0/customize/sass/#maps-and-loops |
Beta Was this translation helpful? Give feedback.
-
Okay, so, after quick test it seems that if I add the bootstrap example to assets/scss/_styles_project.scss it doesn't generate an error, but the block shortcodes don't pick up the right color. If I manually add a style like this to the assets/scss/_styles_project.scss file it works, and can change the value of the new color from the variables file:
So the problem is probably that even though the new map is added to the theme-colors map, the related classes for the new colors are not generated. Unfortunately I don't know bootstrap enough to solve this, but hopefully someone else will be able to help you. |
Beta Was this translation helpful? Give feedback.
-
Hi @rkranendonk - I've created an issue to track this problem: In the meantime, you'll need to patch Docsy as explained in #1845 (comment). |
Beta Was this translation helpful? Give feedback.
-
A PR has landed, see: |
Beta Was this translation helpful? Give feedback.
-
I worked out how to redefine one of the existing colors by adding a line like
$orange: #fe5400;
.But how can I define a new color? I tried adding
$newcolor: #E4C1F9;
to _variables_project.scss, but if I then use that in _index.md, e.g.{{% blocks/lead color="newcolor" %}}
it just defaults to white/none.What step am I missing here?
Beta Was this translation helpful? Give feedback.
All reactions