Replies: 3 comments 3 replies
-
Can you try renaming that to .scss? In order to use scss variables, you need to provide a scss file. |
Beta Was this translation helpful? Give feedback.
-
This is a result of the way SCSS works. In SCSS, the first declaration of a variable typically defines the value of the variable through the rest of the compilation. This means, that in order to allow custom themes to override bootstrap values, we place their variable declarations ahead of the bootstrap variable declarations during compilation - this allows the custom scss themes to override those values. This also means that you can't use those values in your custom theme (since they appear after your custom theme variables during compilation). This is typically not an issue as themes which specify colors will typically specify the color variables themselves or just use direct color values rather than variables. |
Beta Was this translation helpful? Give feedback.
-
@c-marc assign it a variable above your code, like $gray-700: #495057 !default; or copy a more complete array of variables like here |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi ! I'm trying to move some styling into a custom.scss but css preprocessing is failing when hitting bootstrap scss variables... I can't see what's wrong... I got back to the simplest example copying & pasting the example from the doc:
My qmd YAML has:
Rendering failed with the following message (with
$gray-700
underlined)My understanding is that these bootstrap colors should be available. And the doc seems to imply that too. Could someone explain me what I'm failing to see ? That might be obvious... Many thanks !
EDIT: interestingly, the following modified scss file works and knows
$gray-700
:Beta Was this translation helpful? Give feedback.
All reactions