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

Wrong CSS output using $custom-shades #2031

Labels

Comments

@hal0gen
Copy link

hal0gen commented Jul 31, 2018

This is about Bulma.

Overview of the problem

I cannot add a custom shade and have it processed by the framework.

Description

Using Bulma 0.7.1. I am trying to define custom shades and add a color to it (i.e. fuchsia). I need to find a way for having the corresponding helper classes generated (.has-text-fuchsia .has-background-fuchsia).

Steps to Reproduce

From my understanding of the customization, I should add $fuchsia to $custom-shades, and not to $custom-colors (which are used for semantic purposes).

$fuchsia: #d705a3
$custom-shades: ("fuchsia": $fuchsia);

When I do that, Bulma first runs mergeColorMaps and then generates the classes, except the ones corresponding to $custom-shades are wrong, because findColorInvert is also called, which adds #fff as the default inverted color. This works without problems if I use $custom-colors (either specifying the inverted color or not).

Expected behavior

The CSS output should be:

.has-text-fuchsia {
    color: #d705a3 !important;
} 

Actual behavior

The CSS output is:

.has-text-fuchsia {
    color: #d705a3, #fff !important;
} 
@stale
Copy link

stale bot commented Jan 27, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 27, 2019
@stale stale bot closed this as completed Feb 3, 2019
@Merott
Copy link

Merott commented Apr 7, 2019

Running into the same issue... Can we reopen this?

@Tomuke
Copy link

Tomuke commented May 20, 2019

Raised a new issue for this as it has not been re-opened:
[https://github.com//issues/2483]

jgthms added a commit that referenced this issue May 20, 2019
jgthms added a commit that referenced this issue May 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment