I'm compiling an SCSS file to CSS, using the three following files:
bootstrap/_variables.scss:
$font-color-root: #ff6d00;
$font-color-dark: #000;
themes/_theme.scss:
:root {
--font-color: #{$font-color-root};
}
/* dark theme variables */
[data-theme=\'dark\'] {
--font-color: #{$font-colour-dark};
}
style.scss:
//import variables
@use 'bootstrap/variables' as *;
//import CSS files
@use 'themes/theme';
This keeps throwing this error, obviously the variables are not visible within the theme.scss file, how do I make them visible?
I thought that the global namespace would be the solution to this problem.
Error: Undefined variable.
╷
2 │ --font-color: #{$font-color-root};
`