Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

SCSS compiling issue in Foundation sites v6.5.0rc #11359

Closed
anvucodespot opened this issue Jun 28, 2018 · 11 comments · Fixed by #11361
Closed

SCSS compiling issue in Foundation sites v6.5.0rc #11359

anvucodespot opened this issue Jun 28, 2018 · 11 comments · Fixed by #11361

Comments

@anvucodespot
Copy link

I got a Warning when compile SCSS.
WARNING: null was passed to rem-calc(), which is not a number.
on line 78 of node_modules/foundation-sites/scss/util/_unit.scss, in function -zf-to-rem
from line 47 of node_modules/foundation-sites/scss/util/_unit.scss, in function rem-calc
from line 84 of node_modules/foundation-sites/scss/xy-grid/_cell.scss, in function if
from line 84 of node_modules/foundation-sites/scss/xy-grid/_cell.scss, in mixin -xy-cell-properties
from line 174 of node_modules/foundation-sites/scss/xy-grid/_cell.scss, in mixin xy-cell-static
from line 276 of node_modules/foundation-sites/scss/xy-grid/_classes.scss, in mixin xy-vertical-grid-classes
from line 471 of node_modules/foundation-sites/scss/xy-grid/_classes.scss, in mixin foundation-xy-grid-classes
from line 20 of src/scss/helper/_main.scss
from line 2 of src/scss/style-rtl.scss

WARNING: null was passed to rem-calc(), which is not a number.
on line 78 of node_modules/foundation-sites/scss/util/_unit.scss, in function -zf-to-rem
from line 47 of node_modules/foundation-sites/scss/util/_unit.scss, in function rem-calc
from line 84 of node_modules/foundation-sites/scss/xy-grid/_cell.scss, in function if
from line 84 of node_modules/foundation-sites/scss/xy-grid/_cell.scss, in mixin -xy-cell-properties
from line 174 of node_modules/foundation-sites/scss/xy-grid/_cell.scss, in mixin xy-cell-static
from line 276 of node_modules/foundation-sites/scss/xy-grid/_classes.scss, in mixin xy-vertical-grid-classes
from line 471 of node_modules/foundation-sites/scss/xy-grid/_classes.scss, in mixin foundation-xy-grid-classes
from line 20 of src/scss/helper/_main.scss
from line 2 of src/scss/style.scss

This is my breakpoint:
$breakpoints: (
small: 0,
medium: 551px,
large: 801px,
xlarge: 1261px,
xxlarge: 1441px,
xxxlarge: 1681px,
);
$print-breakpoint: large;
$breakpoint-classes: (small medium large xlarge xxlarge xxxlarge);

I see someone get same issue in https://foundation.zurb.com/forum/posts/58327-foundation-cli-sites-update-to-650rc1-issue

Thanks

@marvinhuebner
Copy link

Getting the same error:

WARNING: null was passed to rem-calc(), which is not a number.
Backtrace:
        node_modules/foundation-sites/scss/util/_unit.scss:78, in function `-zf-to-rem`
        node_modules/foundation-sites/scss/util/_unit.scss:47, in function `rem-calc`
        node_modules/foundation-sites/scss/xy-grid/_cell.scss:84, in function `if`
        node_modules/foundation-sites/scss/xy-grid/_cell.scss:84, in mixin `-xy-cell-properties`
        node_modules/foundation-sites/scss/xy-grid/_cell.scss:174, in mixin `xy-cell-static`
        node_modules/foundation-sites/scss/xy-grid/_classes.scss:276, in mixin `xy-vertical-grid-classes`
        node_modules/foundation-sites/scss/xy-grid/_classes.scss:471, in mixin `foundation-xy-grid-classes`
        src/assets/scss/app.scss:9

I've dived a little bit into it and found that the error happens here (https://github.com/zurb/foundation-sites/blob/v6.4.3/scss/xy-grid/_classes.scss#L276), because $-zf-size is null, and in an older version of foundation small was passed here. But i can not find out wherer $-zf-size gets defined.

@DanielRuf
Copy link
Contributor

These are just warnings, compilation should still work.

@DanielRuf
Copy link
Contributor

cc @ncoden I guess this is the fallback of the mediaquery

@ncoden
Copy link
Contributor

ncoden commented Jun 28, 2018

These are just warnings, Foundation should compile fine. But this should be resolved anyway. I'll take a look at this.

@anvucodespot @marvinhuebner Does this SCSS compilation break after these errors ? Otherwise is there any issue when your site is running ?

@ncoden
Copy link
Contributor

ncoden commented Jun 28, 2018

@anvucodespot For your next issue, please follow the template

@marvinhuebner
Copy link

@ncoden compilation does not break, it's only a warning.

@bobwalker99
Copy link

Hi, I appreciate this is only a warning, but I've duplicated some investigating time and also got as far as seeing that $-zf-size is null in _classes.scss, but couldn't get past that.

Compilation doesn't fail, but I'd like to understand what's wrong, and if it's something I should address in our code? Another issue (#10015) alludes to the definition of custom breakpoints, but that's not something we're doing.

Happy to troubleshoot if you can give me a nudge in the right direction.

@ncoden
Copy link
Contributor

ncoden commented Jun 28, 2018

I'm working on this. There is some issues with the way we handle $-zf-size and its default value. So I guess you have nothing to do, the problem is only on our side. I`ll let you know about a possible fix.

@anvucodespot
Copy link
Author

@ncoden I'm sorry, I will follow the template in next time. The SCSS compilation is not break after compiling.

Thankyou.

@bobwalker99
Copy link

#11361 fixes it for me, thanks for the speedy response!

@jraack
Copy link

jraack commented Jul 3, 2018

Can confirm #11361 fixed the problem here.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants