Wikiki / bulma-checkradio

Bulma's extension to display better checkbox and radio imputs
MIT License
71 stars 43 forks source link

Can't override colors due to package.json using minified css #51

Closed cilim closed 2 years ago

cilim commented 4 years ago

Hi everyone! 👋 Thanks for this library.

I would appreciate if you could change the main attribute in package.json and not use the distributions minified CSS file, but rather set it as the main lib bulma does.

The problem is that when I set up my libs like so:

@import '~bulma/bulma';
@import 'bulma-checkradio';
@import 'theme';

@import 'components/menu';
@import 'components/navbar';
@import 'components/notices';

the primary color that I set in my main scss file, isn't taken into consideration (the primary color you set is used).

I have this fix in place for now, if it will help anyone out there:

@import '~bulma/bulma';
@import 'bulma-checkradio/src/sass/index';
@import 'theme';

@import 'components/menu';
@import 'components/navbar';
@import 'components/notices';
benloeffel commented 4 years ago

Thanks for this solution @cilim!

It's a pity that the extension doesn't inherit the primary colour defined for Bulma or at least work with the option to add is-primary class to the input.

Wikiki commented 2 years ago

Main property in package.json has been updated and color are inherited from bulma core. See code from lines 226 and 337 of index.sass file:

@each $name, $pair in $colors
    $color: nth($pair, 1)
    $color-invert: nth($pair, 2)
    &.is-#{$name}