Gatsby: Importing bulma css causes postcss-custom-properties error

Created on 5 Oct 2017  路  7Comments  路  Source: gatsbyjs/gatsby

All I did was installed bulma

yarn add bulma

Then imported bulma css

import "bulma/css/bulma.css"

And this is the error I get

image

Most helpful comment

Posting my solution to this for others:

  • Install gatsby-plugin-sass (see here)
  • Create layouts/index.scss (see here)
$variable-columns: false;
@import "~bulma/bulma";
  • Import index.scss in layouts/index.js

All 7 comments

does bulma rely on css properties?

@jquense Yes, they do use custom css properties. Is that a problem ?

No, just trying to understand the issue a bit. I think the problem is here that the default css setup adds a bunch of cssNext setup along with it, which isn't a great default..

I just ran into the same issue. I created a local copy of the gatsby postcss sass plugin and ripped out the postcss (since I don't need it).

Posting my solution to this for others:

  • Install gatsby-plugin-sass (see here)
  • Create layouts/index.scss (see here)
$variable-columns: false;
@import "~bulma/bulma";
  • Import index.scss in layouts/index.js

@mbfisher had to add one more step to get that to work:

  • Add "gatsby-plugin-sass" to plugins: in gatsby-config.js

Due to the high volume of issues, we're closing out older ones without recent activity. Please open a new issue if you need help!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dustinhorton picture dustinhorton  路  3Comments

jimfilippou picture jimfilippou  路  3Comments

signalwerk picture signalwerk  路  3Comments

brandonmp picture brandonmp  路  3Comments

theduke picture theduke  路  3Comments