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

math.div changes applied to non-division variables #1224

Closed
tzappia opened this issue Feb 26, 2022 · 6 comments
Closed

math.div changes applied to non-division variables #1224

tzappia opened this issue Feb 26, 2022 · 6 comments

Comments

@tzappia
Copy link

tzappia commented Feb 26, 2022

assets/stylesheets/bootstrap/_variables.scss and templates/project/_bootstrap-variables.sass have had some lines converted to math.div, but the original variables were not division (or were in comments.) Examples:

$container-desktop: (940px + $grid-gutter-width) !default;
is now
$container-desktop: math.div(940px + $grid-gutter-width) !default;

// Small screen / tablet
is now
// Small screen, tablet

This causes a sass error (sass@1.47.0)

Message:
    node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_variables.scss
Error: Missing argument $number2.
  ┌──> node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_variables.scss
338│ $grid-float-breakpoint-max: math.div($grid-float-breakpoint - 1) !default;
  │                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invocation
@glebm
Copy link
Member

glebm commented Feb 28, 2022

Pushed v3.4.3 with the fix (#1225)

@glebm glebm closed this as completed Feb 28, 2022
@mockdeep
Copy link

We're still seeing something like this on v3.4.3:

SassC::SyntaxError: Error: Invalid CSS after "  margin: (math": expected expression (e.g. 1px, bold), was ".div($line-height-c"
        on line 8:16 of node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins/_nav-divider.scss
        from line 25:1 of node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_mixins.scss
        from line 7:1 of app/assets/stylesheets/legacy/variables/_manifest.scss
        from line 1:1 of app/assets/stylesheets/admin.scss
>>   margin: (math.div($line-height-computed, 2) - 1) 0;

@glebm
Copy link
Member

glebm commented Feb 28, 2022

/cc @AprilArcus

@glebm glebm reopened this Feb 28, 2022
@AprilArcus
Copy link
Contributor

Looking

@AprilArcus
Copy link
Contributor

@mockdeep This error appears to be due to the use of SassC instead of dart-sass. SassC wraps libsass, which does not support the math.div syntax. SassC and libsass are deprecated.

If compatibility with SassC and libsass are necessary, I recommend you remain on 3.4.1. Otherwise, I recommend you upgrade your sass compiler to an appropriate version of dart-sass (i.e. "sass": "^1.33") for future-proofing.

@glebm glebm closed this as completed Feb 28, 2022
@mockdeep
Copy link

Okay, thanks, will do.

amotl added a commit to crate/crate-admin that referenced this issue Dec 2, 2022
SassError: Invalid CSS after "...point-max: math": expected expression (e.g. 1px, bold), was ".div($grid-float-br"
  from line 12 of app/styles/styles.scss
  >> $grid-float-breakpoint-max: math.div($grid-float-breakpoint - 1) !default;

     --------------------------------^

> This error appears to be due to the use of SassC instead of dart-sass.
> SassC wraps libsass, which does not support the math.div syntax. SassC
> and libsass are deprecated.
>
> I recommend you upgrade your sass compiler to an appropriate version.
>
> -- @AprilArcus, twbs/bootstrap-sass#1224 (comment)
amotl added a commit to crate/crate-admin that referenced this issue Dec 2, 2022
SassError: Invalid CSS after "...point-max: math": expected expression (e.g. 1px, bold), was ".div($grid-float-br"
  from line 12 of app/styles/styles.scss
  >> $grid-float-breakpoint-max: math.div($grid-float-breakpoint - 1) !default;

     --------------------------------^

> This error appears to be due to the use of SassC instead of dart-sass.
> SassC wraps libsass, which does not support the math.div syntax. SassC
> and libsass are deprecated.
>
> I recommend you upgrade your sass compiler to an appropriate version.
>
> -- @AprilArcus, twbs/bootstrap-sass#1224 (comment)
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