Skip to content
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

Bump Bootstrap to 5.1.3 #125

Merged
merged 1 commit into from Nov 2, 2021
Merged

Bump Bootstrap to 5.1.3 #125

merged 1 commit into from Nov 2, 2021

Conversation

ilunglee
Copy link
Contributor

@ilunglee ilunglee commented Nov 2, 2021

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behaviour?

Issue Number(s): N/A

Ran into the issue with a new Rails webpacker project that uses bootstrap@5.1.1.

Module build failed (from ./node_modules/postcss-loader/src/index.js):
ParserError: Syntax Error at line: 1, column 25

However, I was using bootstrap@5.1.1 for my previous project, and it was working fine. Both of them had the same setup except for some differences in dependencies.

I haven't been able to figure out which dependency change causes this issue, but I found out the problem lies within the following lines:
https://github.com/twbs/bootstrap/blob/9437973e58ffc3a45fcb28f92144278064c62ca4/scss/mixins/_grid.scss#L10-L12

If I update these lines to the following, it no longer have issues compiling:

margin-top: calc(-1 * var(--#{$variable-prefix}gutter-y) * 1); // stylelint-disable-line function-disallowed-list
margin-right: calc(-1 * var(--#{$variable-prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list
margin-left: calc(-1 * var(--#{$variable-prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list

After a little bit more research, I found out the sass package causes this issue.

If you use sass@1.40.x, you will get the compilation error. However, if you downgrade to sass@1.39.0, the error no longer exists.

Possibly related to the calc function changes in sass/dart-sass@1.39.0...1.42.1

What is the new behaviour?

  • Bump Bootstrap to v5.1.3. This includes the workaround for dart sass compile error

Other information

N/A

This includes the workaround for dart sass compile error. See twbs/bootstrap#35033
@ilunglee ilunglee added the dependencies Pull requests that update a dependency file label Nov 2, 2021
@ilunglee ilunglee merged commit 46fc25d into main Nov 2, 2021
@ilunglee ilunglee deleted the bump_bootstrap_to_v5_1_3 branch November 2, 2021 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant