sass / libsass-python

A straightforward binding of libsass for Python. Compile Sass/SCSS in Python with no Ruby stack at all!
https://sass.github.io/libsass-python/
MIT License
564 stars 54 forks source link

math loading errors with libsass 0.22.0 #449

Closed oleg-nenashev closed 12 months ago

oleg-nenashev commented 12 months ago

Disclaimer: Just in case, I am not a Python / SASS pro in any means...

It looks like this lib breaks when used from https://github.com/orzih/mkdocs-extra-sass-plugin and when loading the recent v3.0.0 version of https://github.com/at-import/breakpoint/ . Looks like it is similar to https://github.com/twbs/bootstrap-sass/issues/1230

ERROR   -  [SASS] Failed to build CSS: Error: Invalid CSS after "...   @return math": expected expression (e.g. 1px, bold), was ".div(base-conversio"
                   on line 15:19 of extra_sass/vendor/breakpoint/stylesheets/breakpoint/_helpers.scss
                   from line 28:1 of extra_sass/vendor/breakpoint/stylesheets/_breakpoint.scss
                   from line 6:4 of extra_sass/_masthead.scss
                   from line 2:1 of extra_sass/style.css.scss
           >>       @return math.div(base-conversion($value), base-conversion(breakpoint-g
              ------------------^
           Traceback (most recent call last):
             File "/home/onenashev/.local/lib/python3.8/site-packages/mkdocs_extra_sass_plugin/plugin.py", line 74, in _build_entry
               info = entry_point.save_to(site_dir, dest_dir)
             File "/home/onenashev/.local/lib/python3.8/site-packages/mkdocs_extra_sass_plugin/plugin.py", line 177, in save_to
               css, source_map = sass.compile(
             File "/home/onenashev/.local/lib/python3.8/site-packages/sass.py", line 725, in compile
               raise CompileError(v)
           sass.CompileError: Error: Invalid CSS after "...   @return math": expected expression (e.g. 1px, bold), was ".div(base-conversio"
                   on line 15:19 of extra_sass/vendor/breakpoint/stylesheets/breakpoint/_helpers.scss
                   from line 28:1 of extra_sass/vendor/breakpoint/stylesheets/_breakpoint.scss
                   from line 6:4 of extra_sass/_masthead.scss
                   from line 2:1 of extra_sass/style.css.scss
           >>       @return math.div(base-conversion($value), base-conversion(breakpoint-g
oleg-nenashev commented 12 months ago

Nevermind https://discourse.gohugo.io/t/cant-use-sass-math-div/33087 , libsass is not supported at all. So the root cause was https://github.com/at-import/breakpoint/commit/8f400aaad7ad4c8f28e0901506a3fa124fc063c4 in breakpoint 3.0 that reintroduced sass:math dependency