question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Media Queries differ between node sass and dart sass

See original GitHub issue

Prerequisites

Describe the issue

Our webpage is upgrading from node-sass to dart-sass, but we noticed that the @media-queries used differ between node-sass and dart-sass and we have no idea why. We are using webpack to bundle the scss files and using the mini-css-extract-plugin plugin to extract the css file.

We only use bootstrap for spacing, and it breaks all spacing on our page, the small sample on our screenshot doesn’t look like much but its just an example

Here is the behavior with node-sass image

Here is the behavior on dart-sass, notice how it uses px-sm-3 instead ( this is a full size monitor) image

Reduced test cases

I was unable to reduce it a lot with the way our production service was, I apologize for this but we did refactor a lot of our sass files and reorganize it in many ways and no matter what we removed, refactored, re-organized etc, the result was the same

What operating system(s) are you seeing the problem on?

macOS

What browser(s) are you seeing the problem on?

Firefox

What version of Bootstrap are you using?

v5.0.2

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
TannerScommented, Oct 26, 2021

Are you sure the only difference is the compiler? Seems odd since our own build uses dart-sass and works fine.

You may try Sassmeister to make a reduced test case.

I am really trying to figure this out, we had multiple people look at it, but we have had the same configuraiton and all we have done is swap out the compiler (node sass vs dart sass and this is the result)

let me look into Sassmeister!

0reactions
TannerScommented, Oct 27, 2021

We don’t have a 6 in our margin and padding scale, we do 05 only. I’m guessing something is off with the modified Sass maps here and some customization. You may need to redeclare the maps like in #34756. Check out the first comment in #34942 and see if that helps.

You reminded me about the maps, and it brought to my attention the error on our part. Something was not being bundled correctly between the sets and the maps was being ignored, thanks for bring me to the right direction, closing the issue!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node-Sass or Dart-Sass : The CSS Preprocessor Dilemma
More than a year ago, I answered a question on StackOverflow about choosing between Node or Dart-Sass for Vue CLI. It got lots...
Read more >
Switch from deprecated Node Sass to Dart Sass compiler ...
Problem/Motivation Following with latest changes from Drupal core package.json file Warning: LibSass and Node Sass are deprecated.
Read more >
CSS At-Rules - Sass
Sass supports all the at-rules that are part of CSS proper. To stay flexible and forwards-compatible with future versions of CSS, Sass has...
Read more >
1.49.8 - sass - npm
This package is a distribution of Dart Sass, compiled to pure JavaScript with no native code or external dependencies.
Read more >
sass | Dart Package - Pub.dev
From Source; In Docker. Why Dart? Compatibility Policy. Browser Compatibility; Node.js Compatibility. Behavioral Differences from Ruby Sass ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found