Skip to content
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

Feature/bs5 development -> src/sass/assets/bootstrap5/_functions.scss #314

Open
braindunk opened this issue Nov 22, 2021 · 5 comments
Open

Comments

@braindunk
Copy link

An error which is referenced elsewhere online as related to older releases of BS 5 is occurring on every attempt to install Understrap Child with BS 5 enabled.

Sass Compiling Error
custom-editor-style.scss
"$color1: null is not a color.: assets/bootstrap5/mixins/_table-variants.scss on line 5, at column 5
Call Stack:
#0 mixin table-variant assets/bootstrap5/_tables.scss on line 134
#1 import assets/bootstrap5/_tables.scss custom-editor-style.scss on line 12"

child-theme.scss
"$color1: null is not a color.: assets/bootstrap5/mixins/_table-variants.scss on line 5, at column 5
Call Stack:
#0 mixin table-variant assets/bootstrap5/_tables.scss on line 134
#1 import assets/bootstrap5/_tables.scss assets/bootstrap5/bootstrap.scss on line 22
#2 import assets/bootstrap5/bootstrap.scss child-theme.scss on line 2
#3 mixin table-variant assets/bootstrap5/_tables.scss on line 134
#4 import assets/bootstrap5/_tables.scss custom-editor-style.scss on line 12"

@bacoords
Copy link
Member

We don't use the variable $color1, so I'm wondering if there was an error with a find-and-replace or something else?

@MicahSimmons
Copy link

I was able to work around this issue by modifying color-contrast() in _functions.scss. contrast-ratio() seems to only ever return negative values, so max-ratio-color is left as null since the min/max ratio conditions are never satisfied. The "color1" error is coming from the SASS mix function in a subsequent call.

I tried changing $max-ratio-color from null to $color-contrast-light. I also tried multiplying the output of contrast-ratio() by -1. Either seem to avoid the stack dump.

@bacoords
Copy link
Member

bacoords commented Dec 7, 2021

I would also check what version of Bootstrap 5 is being loaded in your package.json. If it's not the latest (5.1.3 at time of writing) you could upload it again, re-run the copy-assets command and try compiling again?

@bacoords bacoords closed this as completed Dec 7, 2021
@bacoords bacoords reopened this Dec 7, 2021
@s7media
Copy link

s7media commented Jan 12, 2022

I'm having the same issue. Previously been deploying 1.0.1 with Bootstrap 4 and just started out on 1.1.0 on a brand new WP install.

@s7media
Copy link

s7media commented Jun 28, 2022

I'm having the same issue. Previously been deploying 1.0.1 with Bootstrap 4 and just started out on 1.1.0 on a brand new WP install.

Quick update, after updating SCSSPHP 1.5 to 1.10 I don't have this issue anymore. I use the WPSCSS plugin and had to manually remove the old SCSSPHP folder and replace with the new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants