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.

Hi,

Where and how do I customize the scss? I want to change the colors of primary etc., but also want to be able to change anything and everything. 😃

I know about: @import "~bulma/sass/utilities/_all"; But I don’t know where to put it. 😦

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:19 (5 by maintainers)

github_iconTop GitHub Comments

15reactions
bgalvaocommented, Feb 13, 2019

Hi, I am having this issue today, and I followed this guide using @nuxtjs/style-resources.

This is my nuxt.config.js:

  modules: [
    // Doc: https://axios.nuxtjs.org/usage
    '@nuxtjs/axios',
    '@nuxtjs/pwa',
    '@nuxtjs/style-resources',
    ['nuxt-buefy', {materialDesignIcons: false}]
  ],
  styleResources: {
    scss: [
      './assets/main.scss'
    ]
  },

But it doesn’t seem to find ./assets/main.scss, as I did a double check and renamed the file to something different than the path specified in nuxt.config.js and it did not throw an error. Am I doing something wrong?


Update 13 Feb 2019 (I got it to work)

Ok, I’m not a web developer. I’m a guy that puts things together until it works… So, I was following this customization guide from buefy, and the aforementioned ./assets/main.scss was a copy paste from the file suggested in the buefy guide. I found it odd that the import statements would be at the end of the sample file, but went with it because I thought it was some scss quirk.

What made it work was including the ./assets/main.scss in the css field in the nuxt.config,js.

  /*
  ** Global CSS
  */
  css: [
    // (...)
    './assets/main.scss'
  ],

Only then did nuxt start to look for that file and actually told me that some bulma/buefy variable (such as $white) was not initialized (i.e. imported) and then the only thing I had to do was move those import statements to the top.

Ok, maybe this is obvious for the veteran web devs here, but for beginners I hope this helps.

7reactions
anteriovieiracommented, Jun 15, 2018

Hi @erichodges , you can create a file in the assets folder and then import the file by placing it in the css property of nuxt.config.js

assets/my-style.scss

@import "~bulma/sass/utilities/_all";

// ...

nuxt.config.js

module.exports = {
    ...
    css: [
        'assets/my-style.scss'
    ]
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Customize Bootstrap with Sass - freeCodeCamp
If you're a beginner, you can customize Bootstrap with a custom CSS stylesheet. CSS specificity is important here. You write custom CSS, ...
Read more >
Sass · Bootstrap v5.0
In your custom.scss , you'll import Bootstrap's source Sass files. You have two options: include all of Bootstrap, or pick the parts you...
Read more >
How to customize Bootstrap 4 using Sass - Mugo Web
First, create your own "theme" directory within the scss directory. This folder will contain all your custom scss files. Second, create an empty ......
Read more >
How to Edit, Customize, and Override Bootstrap CSS to Suit ...
Now you can add any necessary changes to your custom.css file. How to Customize Bootstrap Buttons Using CSS Overrides. Let's say you want...
Read more >
Property Declarations - Sass
Interpolation; Nesting; Hidden Declarations; Custom Properties. In Sass as in CSS, property declarations define how elements that match a selector are ...
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