-
Notifications
You must be signed in to change notification settings - Fork 3
Argument $color
of darken($color, $amount)
must be a color
#6
Comments
To provide a bit more context, threw some warnings to try to debug and found that //buttons.sass line 68
@warn $color-invert
@warn type-of($color-invert) output:
Looks like on the last pass the findColorInvert function is not evaluated This is my webpack.config
Thanks in advance |
Tengo el mismo problema Error: $color: "findColorInvert(#daf279)" is not a color for `darken' |
I'll look into this and see if it's possible to work around it. |
@stipsan any progress on this? Running into this error as well. |
Also have this problem. |
me too. |
Hi all, I got this to finally build and maybe it will help someone else. The docs show importing Bulma like so // Import Bulma's initial variables
@import "bulma/sass/utilities/variables.sass"
// override examples...
@import "bulma" bulma.sass loads the variables automatically so I left them out altogether and linked directly to the bulma.sass file. This builds for me. // over rides here
// import bulma
@import "node_modules/bulma/bulma.sass"; |
To help anyone who didn't quite understand (me for about 20mins): Instead of importing variables at the beginning, and then the rest of bulma at the bottom, just include bulma.sass at the top. This will include all the variables so you can edit/override them. Do not bother adding another import to the bottom, as it will throw errors. |
I just figured this out for myself. The problem is, that you need to @import "bulma/sass/utilities/_all.sass"; instead of @import "bulma/sass/utilities/variables.sass"; which instantly solves all problems. This works: // Import Bulma's initial variables
@import "bulma/sass/utilities/_all.sass";
// Override initial variables here
// You can add new ones or update existing ones:
$blue: #72d0eb; // Update blue
$pink: #ffb3b3; // Add pink
$family-serif: "Georgia", serif; // Add a serif family
// Override generated variables here
// For example, by default, the $danger color is $red and the font is sans-serif
// You can change these values:
$danger: $orange; // Use the existing orange
$family-primary: $family-serif; // Use the new serif family
@import "bulma/bulma"; |
I tried to overwrite bulma vars using the solution mentioned by @Ra1d3n and @octoshrimpy App.vue
While this does not throw any errors on compilation it also does not change the primary color to red. Any suggestions how to overwrite the variables? |
@futurmat Why would you set your override to default? Please remove I realized that my proposed solution did work for overriding, but could not actually utilize pre-defined variables. I have no idea as to why that is. Right now, my solution is simply this: $primary: #000;
@import "bulma/bulma"; |
So, I think I resolved it. The latest version of Bulma uses !default for the variables. Apparently if so it is enough to do it like this:
Using |
Are the docs here on github? We should make a PR to edit them if so. It took a bit of searching to figure this out, it would be super easy to make the amend. |
So I'm trying to implement this into my own setup without your loader but I don't get my text colours recalculated Meaning: if I use a super light primary colour, my text loses legibility |
@Musmula what does your css/sass look like? can you use/set If you set |
Yep, you're right. I ended up importing the functions file and setting the primary invert Thx |
For Rails, this worked:
|
for <style lang="sass">
@import "../node_modules/bulma/sass/utilities/initial-variables"
@import "../node_modules/bulma/sass/utilities/functions"
$primary: #6d8acc
$primary-invert: findColorInvert(#6d8acc)
@import "../node_modules/bulma/bulma"
</style> |
Hi, first of all thanks for the work on this loader, I think it's great, haven't been able to get it working because of a very common problem with css-modules.
Apparently it parses all color values to strings which get in the way while trying to perform sass color conversions.
This is the error I am getting while trying to execute the example in the README
Any idea how to solve this problem?
Thanks in advance
The text was updated successfully, but these errors were encountered: