Code Monkey home page Code Monkey logo

Comments (7)

couds avatar couds commented on May 30, 2024

Hi @stefl

Yes, can you add this to the docs?

Thanks

from react-bulma-components.

brandonratz avatar brandonratz commented on May 30, 2024

@couds The documentation provided is for Gatsby.js v1. For Gatsby.js v2 the following should be documented @ line 142 of README.md:

For Gatsby.js v2 you can add a onCreateWebpackConfig export to your gatsby-node.js file:

const path = require('path')

exports.onCreateWebpackConfig = ({
  stage,
  getConfig,
  rules,
  loaders,
  actions,
}) => {
  actions.setWebpackConfig({
    resolve: {
      alias: {
        '_variables.sass': path.resolve(__dirname, 'relative/path/from/webpack/config/to/your/_variables.sass'),
      },
    },
  })
}

Happy to make a PR...

from react-bulma-components.

couds avatar couds commented on May 30, 2024

Yes please =)

from react-bulma-components.

brandonratz avatar brandonratz commented on May 30, 2024

@couds no access to repo... Add me as a collaborator and I'll push my branch asap.

from react-bulma-components.

stefl avatar stefl commented on May 30, 2024

@brandonratz the way to do this is to fork the repo onto your own account, make the commit there and then you should see a "new pull request" button top right in the UI.

from react-bulma-components.

brandonratz avatar brandonratz commented on May 30, 2024

@stefl Thanks so much for pointing me in the right direction. I knew I wasn't doing something right.

#82

from react-bulma-components.

idkq avatar idkq commented on May 30, 2024

Spent few hours on this... to realize that order matters. If it helps anyone:

Gatsby version: 4.1.2

src/styles/layout.scss:

@import "~_variables.sass"; // order matters this has to be above @import "bulma/bulma.sass";
@import "bulma/bulma.sass";

src/components/Layout/index.tsx:

import '../../styles/layout.scss';

src/styles/_variables.sass

@import '~bulma/sass/utilities/initial-variables.sass'

// ADD HERE variables you want to override
$primary: $blue

@import '~bulma/sass/utilities/_all.sass'

from react-bulma-components.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.