Unclear behavior with $blue variable

Created on 29 August 2023, about 1 year ago
Updated 30 August 2023, about 1 year ago

I created a subtheme of bootstrap5 theme on theme settings page (/admin/appearance/settings/bootstrap5).

I compile sass in my subtheme using dart-sass like this:
sass --watch scss/style.scss css/style.css

Everything seems to be okay but I discovered the follwing unclear behavior:

In _variables_bootstrap.scss I can find this line, where the variable $blue is overridden and set to #003CC5:
$blue: #003CC5 !default;

But when I remove this line (or make a comment out of it):
//$blue: #003CC5 !default;

the result is, that the value of the color variable $blue is still #003CC5 after sass compilation!
But I think it should not! $blue should have the default value of #0d6efd which is set in _variables.scss of Bootstrap 5.3.1 scss folder.

I can not find out if there is anothere place where $blue is overidden and set to #003CC5. I think there is no other place where $blue is overridden.

That's why $blue should have the value #0d6efd if the line
$blue: #003CC5 !default;
in _variables_bootstrap.scss is removed and Sass is compiled afterwords.

Can you help me to explain this behavior?
is it correct?
And why?
Are there similar behaviors elsewhere?

💬 Support request
Status

Closed: duplicate

Version

3.0

Component

Code

Created by

🇦🇹Austria drupalfan2

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024