-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiler doesn't like Bootstrap 4 _root.scss #2383
Comments
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
Interpolation that included the full property name (such as --#{foo}) was crashing the parser. Closes #2383
This adds specs for interpolating the name of the property. See sass/sass#2383
Interpolation that included the full property name (such as --#{foo}) was crashing the parser. Closes #2383
@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
@nex3 Is this the correct fix for Sass v3.5 compatibility? twbs/bootstrap#24354 |
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; |
That's an unfortunate edge-case 😕. Your workaround works, although I'd probably write it as: --font-family-sans-serif: #{inspect($font-family-sans-serif)};
--font-family-monospace: #{inspect($font-family-monospace)}; There are a couple behaviors interacting here:
|
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
Just for the ones who come here. I replaced compass with node-sass and it worked :) |
What if we are using Google Fonts?
In that we only get this much: |
@mittalyashu What's the problem there exactly? |
@nex3, I am not getting any kind of error, I am asking generally. https://www.useloom.com/share/1e0ac486103140ec99a5f3bcee88b403 |
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. |
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
@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. |
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? |
@jcpc91 That's also a great question for StackOverlow! |
Had the exact same issue, solved it by bumping SASS gem to latest (3.5.6) |
My workaround:
|
thanks @waldozevenster I used your workaround. |
@waldozevenster Sweet, this workaround works perfectly! Thank you! |
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:
|
very simple and effective resolve! tnx man! |
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 |
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 |
Here is the working solution for me:
|
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.
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.
The text was updated successfully, but these errors were encountered: