jgthms / bulma

Modern CSS framework based on Flexbox
https://bulma.io
MIT License
49.34k stars 3.96k forks source link

Adding $custom-shades compiles to broken css #3619

Open AndreasMietk opened 1 year ago

AndreasMietk commented 1 year ago

This is about Bulma.

Overview of the problem

Adding a custom shade via $custom-shades results in a broken css class

This is about the Bulma CSS framework I'm using Bulma version [0.9.4] This is a Sass issue: I'm using version [1.56.1] I am sure this issue is not a duplicate

Description

Steps to Reproduce

  1. add $custom-sahdes to bulma.scss
    • image
  2. see in functions.sass
    • image
  3. see in color.sass
    • image
  4. see inbrowser
    • image

Expected behavior

This code in color.sass

@each $name, $shade in $shades
  .has-text-#{$name}
    color: $shade !important
  .has-background-#{$name}
    background-color: $shade !important

Should handle the created map values atleast with:

@each $name, $shade in $shades
  $value: $shade
  @if type-of($custom-colors) == 'map'
   $value: nth($shade, 1)
  @debug $value
  .has-text-#{$name}
    color: $value !important
  .has-background-#{$name}
    background-color: $value !important

Actual behavior

it takes the map as value for $shade

AndreasMietk commented 1 year ago

view PR here https://github.com/jgthms/bulma/pull/3620