typeplate/typeplate.github.io

libsass compilation issues - "error reading values after %"

Closed this issue · 4 comments

Hi,

Using grunt with libsass throws an error: error: error reading values after %

Offending lines 521-527 in _typeplate.scss:

html {
    @if $custom-font-family {
        font: $font-weight #{$font-size}%/#{$line-height} $custom-font-family, $font-family;
    } @else {
        font: $font-weight #{$font-size}%/#{$line-height} $font-family;
    }
}

The rest compiles well.

Cheers.

Unfortunately, if that is the case this is a problem with libsass and not us. The entire Sass port of Typeplate compiles just fine (you can even paste the Sass file into Codepen to double check for yourself). I would suggest filing an issue with libsass instead. Thanks.

Dennis, it is definitely libsass's issue. However, since it's the fastest SASS compiler and one increasingly used by more and more folks, you can at least include a workaround in your docs or modify your code slightly to make it compatible with the library. Here's the ticket on their forum: sass/libsass#152 (comment)

Thanks.

The workaround would be a hack on my end. Sass compiler accepts this character and so should libsass. Thanks for filing the ticket though and please do let me know when they resolve a fix.

html {
Took me a few hours but the following fixes the issue when using libsass, coda plugin

@if $custom-font-family {
font: $font-weight #{$font-size + "%"}/#{$line-height} $custom-font-family, $font-family;
} @else {
font: $font-weight #{$font-size + "%"}/#{$line-height} $font-family;
}
}