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

Cannot build using postcss-csso #3851

Open
hereticjsorg opened this issue Jul 2, 2024 · 0 comments
Open

Cannot build using postcss-csso #3851

hereticjsorg opened this issue Jul 2, 2024 · 0 comments

Comments

@hereticjsorg
Copy link

This is about Bulma.

Overview of the problem

This is about the Bulma CSS framework. I'm using Bulma version 1.0.1. My browser is: Chrome (latest). This is a Sass issue: I'm using version 1.77.6.

Description

I'm using Webpack to build my application (Heretic Web Framework) which is using Bulma (https://hereticjs.org/, https://demo.hereticjs.org/). It's using PostCSS and postcss-csso in order to use Bulma.

The error is happening here: utils/mixins.scss

@mixin container-from($name, $width) {
  @container #{$name} (min-width: #{$width}) {
    @content;
  }
}

@mixin container-until($name, $width) {
  @container #{$name} (max-width: #{$width - 1px}) {
    @content;
  }
}

Error message from Webpack output:

Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):

  SyntaxError

  (392:2) from "postcss-csso" plugin: /Users/xtreme/Documents/GitHub/heretic/src/core/styles/bulma/utilities/mixins.scss ")" is expected

    390 | 
    391 | @mixin container-until($name, $width) {
  > 392 |   @container #{$name} (max-width: #{$width - 1px}) {
        |  ^
    393 |     @content;
    394 |   }

As a workaround, I fixed this as:

@mixin container-from($name, $width) {
  @content;
}

@mixin container-until($name, $width) {
  @content;
}

Steps to Reproduce

  1. git clone --depth 1 --branch master https://github.com/hereticjsorg/heretic.git
  2. npm run install-modules
  3. npm run configure
  4. Replace my workaround code by the original code at src/core/styles/bulma/utilities/mixins.scss
  5. npm run build -- --dev

Expected behavior

No errors! ;-)

Actual behavior

Cannot build because of a syntax error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant