Generating .text-{color}-{level} utilities for every color a


Topic: Generating .text-{color}-{level} utilities for every color and level

cross_mk pro premium asked 7 days ago

I'm trying to generate .text-{color}-{level} utilities for every color and level with the code provided in the MDB5 Doc.

@import "../bootstrap/functions"; @import "../bootstrap/variables"; @import "../bootstrap/mixins.scss"; @import "../bootstrap/utilities.scss";

$all-colors: map-merge-multiple($blues, $indigos, $purples, $pinks, $reds, $oranges, $yellows, $greens, $teals, $cyans);

$utilities: map-merge(
  $utilities,
  (
    "color": map-merge(
      map-get($utilities, "color"),
      (
        values: map-merge(
          map-get(map-get($utilities, "color"), "values"),
          (
            $all-colors
          )
        )
      )
    )
  )
);

@import "../bootstrap/utilities/api";

Bit I'm getting an error in variable.scss Error: argument $color of rgba($color, $alpha) must be a color

$table-striped-bg: rgba(var(--#{$prefix}emphasis-color-rgb), $table-striped-bg

How can I fix this?


Kamila Pieńkowska staff answered 6 days ago

I wasn't able to recreate the issue. For me it works. What version of sass you use and what bundler?


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 8.1.0
  • Device: Mac
  • Browser: Freifox
  • OS: MacOS
  • Provided sample code: No
  • Provided link: No