pmoreno-rodriguez / grav-theme-future2021

Future Imperfect theme by HTML5UP ported from scratch to Grav. Version 2021
Other
20 stars 11 forks source link

Compiling sass for theme gives error #58

Open TG-March opened 1 week ago

TG-March commented 1 week ago

_html-grid.scss syntax is incorrect and won't compile with SASS.

error sass/libs/_html-grid.scss (Line 117: Undefined operation: "calc(100% / $cols) times 1".) error sass/libs/_html-grid.scss (Line 121: Undefined operation: "calc(100% / $cols) times 1".)

The original here compiles OK:

https://github.com/ajlkn/responsive-tools/blob/master/src/_html-grid.scss

I changed $cols definition to match the original and it was fine.

pmoreno-rodriguez commented 1 week ago

Thanks @TG-March. I'll fix in next version

pmoreno-rodriguez commented 1 week ago

BTW, in Visual Code with SASS compile extension, compiling sass code without calc function display the following:

Warning:
Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div(100%, $cols) or calc(100% / $cols)

More info and automated migrator: https://sass-lang.com/d/slash-div
   ╷
12 |            $unit: 100% / $cols;
   |         ^............^
   ╵
file:///var/www/devel/future/user/themes/future2021/assets/sass/libs/_html-grid.scss:12:10
THIS IS DEPRECATED AND WILL BE REMOVED IN SASS 2.0
--------------------
Warning:
Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div(100%, $cols) or calc(100% / $cols)

More info and automated migrator: https://sass-lang.com/d/slash-div
   ╷
12 |            $unit: 100% / $cols;
   |         ^............^
   ╵
file:///var/www/devel/future/user/themes/future2021/assets/sass/libs/_html-grid.scss:12:10
THIS IS DEPRECATED AND WILL BE REMOVED IN SASS 2.0

Can you try with $unit: math.div(100%, $cols); ?

I would like to use sass code with the latest specifications.