Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upCompiler doesn't like Bootstrap 4 _root.scss #2383
Comments
This comment has been minimized.
This comment has been minimized.
|
This is a bug in our implementation—the parser shouldn't crash—but those Bootstrap styles aren't valid for Sass 3.5 as written. See the backward incompatibilities section of the changelog for Sass 3.5. |
This adds specs for interpolating the name of the property. See sass/sass#2383
This adds specs for interpolating the name of the property. See sass/sass#2383
This comment has been minimized.
This comment has been minimized.
|
@nex3 What should this be to work with Sass 3.5? Ideally, older versions as well. |
Compass is no longer maintained and hasn't seen a release for 3 years. The compass gem locks Sass to version < 3.5. However, we now need Sass v3.5+ due to sass/sass#2383 This commit removes compass support and bumps minimum Ruby Sass version to v3.5.2.
Compass is no longer maintained and hasn't seen a release for 3 years. The compass gem locks Sass to version < 3.5. However, we now need Sass v3.5+ due to sass/sass#2383 This commit removes compass support and bumps minimum Ruby Sass version to v3.5.2.
This is required for Sass v3.5+ compatibility. See https://github.com/sass/sass/blob/stable/doc-src/SASS_CHANGELOG.md#backwards-incompatibilities----must-read and sass/sass#2383
This comment has been minimized.
This comment has been minimized.
|
@nex3 Is this the correct fix for Sass v3.5 compatibility? twbs/bootstrap#24354 |
This comment has been minimized.
This comment has been minimized.
|
The above fix resulted in incorrect output with both Sass 3.5.2 and latest libsass: This is the output diff from twbs/bootstrap@6f7bad6, the quotes are gone: - --font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
- --font-family-monospace: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
+ --font-family-sans-serif: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
+ --font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
}I had to change the font variables like this to get it to work. Seems like a bug (in the spec) that this makes a difference. - --font-family-sans-serif: #{$font-family-sans-serif};
- --font-family-monospace: #{$font-family-monospace};
+ #{--font-family-sans-serif}: $font-family-sans-serif;
+ #{--font-family-monospace}: $font-family-monospace; |
This comment has been minimized.
This comment has been minimized.
|
That's an unfortunate edge-case --font-family-sans-serif: #{inspect($font-family-sans-serif)};
--font-family-monospace: #{inspect($font-family-monospace)};There are a couple behaviors interacting here:
|
This comment has been minimized.
This comment has been minimized.
|
nex3@ Thank you for the detailed explanation and the |
This is required for Sass v3.5+ compatibility. See https://github.com/sass/sass/blob/stable/doc-src/SASS_CHANGELOG.md#backwards-incompatibilities----must-read and sass/sass#2383
This comment has been minimized.
This comment has been minimized.
|
Just for the ones who come here. I replaced compass with node-sass and it worked :) |
This comment has been minimized.
This comment has been minimized.
|
What if we are using Google Fonts?
In that we only get this much: |
This comment has been minimized.
This comment has been minimized.
|
@mittalyashu What's the problem there exactly? |
This comment has been minimized.
This comment has been minimized.
|
@nex3, I am not getting any kind of error, I am asking generally. https://www.useloom.com/share/1e0ac486103140ec99a5f3bcee88b403 |
This comment has been minimized.
This comment has been minimized.
|
That may be a better question for the Bootstrap team, but my understanding is that if you set $font-family-sans-serif: 'Roboto', sans-serif;before you import Bootstrap, it'll work properly. |
This comment has been minimized.
This comment has been minimized.
|
Hi there, I have a issues with my sass Bootstrap 4 build:
This code doesnt work and my Gulp build show error https://monosnap.com/file/bwqk4QTYy2CvYBqw9oNwGVSnoFQpgQ What I did wrong? Thx all. |
Bootstrap 4.x requires at least sass 3.5.2. For more information see: twbs/bootstrap-rubygem#122 sass/sass#2383
Bootstrap 4.x requires at least sass 3.5.2. For more information see: twbs/bootstrap-rubygem#122 sass/sass#2383
This comment has been minimized.
This comment has been minimized.
|
@Smile3D This is a great question for the Sass StackOverflow community! We try to keep this issue tracker focused on bugs and feature requests that need the core team's attention in particular, while requests for support are usually better handled by the community at large. |
This comment has been minimized.
This comment has been minimized.
|
so here we are 2018 and a can't fix this error
i have two macs and both install sass one macs works find if a execute :
MAC 1:
MAC 2:
with MAC 1 works fine but in MAC 2 fail someone knows how to fixed? |
This comment has been minimized.
This comment has been minimized.
|
@jcpc91 That's also a great question for StackOverlow! |
This comment has been minimized.
This comment has been minimized.
|
Had the exact same issue, solved it by bumping SASS gem to latest (3.5.6) |
This comment has been minimized.
This comment has been minimized.
|
My workaround:
|
This comment has been minimized.
This comment has been minimized.
|
thanks @waldozevenster I used your workaround. |
This comment has been minimized.
This comment has been minimized.
|
@waldozevenster Sweet, this workaround works perfectly! Thank you! |
This comment has been minimized.
This comment has been minimized.
|
I have resolved this problem by installing Sass as a gem (latest gem). In an Ubuntu 18.04.1 LTS (Vagrant Homestead Virtual machine) I execute:
If I check the versions:
|
This comment has been minimized.
This comment has been minimized.
very simple and effective resolve! tnx man! |
This comment has been minimized.
This comment has been minimized.
How can it not tell? The sass parser is outputting the property name, so how can it not know what it's outputting there? Especially in the example you gave, it feels silly that the parser doesn't know what the expression in the |
This comment has been minimized.
This comment has been minimized.
The difference in behavior comes from how the property is parsed, not how it's evaluated. At parse-time, Sass has no knowledge of what the output of a given expression is, because it hasn't started executing any statements yet. We need to determine whether a property is a custom property or not at parse time because custom properties have very different syntax than normal properties. For example,
Yes, in theory, we could have special logic in the parser to check if the entire property name is an interpolation containing an unquoted string that begins with |
This comment has been minimized.
This comment has been minimized.
|
Here is the working solution for me:
|
The compiler doesn't like the recently added file _root.scss in Bootstrap 4. Tested with versions 3.5.1 and a freshly installed version 4.0.0.alpha.1 on Windows 7 platform.
Content of the _root.scss file:
Here the error - could link it to the use of double dashes at the start of lines 3, 7 etc. (removing the dashes the thing compiles). I have no experience whatsoever with Ruby, so I cannot help in finding / solving the problem.