Utilities example in sub-theme breaks bg-opacity CSS var

Created on 12 March 2023, almost 2 years ago
Updated 16 March 2023, almost 2 years ago

Problem/Motivation

The text-primary class fails to color the text.

Based on the findings noted below, this likely affects many more class utilities.

Steps to reproduce

Add content with the 'text-primary" class <p class="text-primary>this should be blue</p>
The text is still dark, not blue (primary).

Proposed resolution

I noticed that this issue is resolved if I comment out the overrides provided in the sub-theme and compile.

# src/scss/base/_utilities.scss

@use "sass:map";

$utilities: (
  "background-color": (
    property: background-color,
    class: bg,
    local-vars: (
      "bg-opacity": 1,
    ),
    responsive: false,
    values: map.merge($utilities-bg-colors, ($colors)),
  ),
  "color": (
    property: color,
    class: text,
    responsive: false,
    values: map.merge($utilities-bg-colors, ($colors)),
  ),
);

Remaining tasks

Identify the particular culprit. Decide whether to remove the example utility overrides.

πŸ› Bug report
Status

Fixed

Version

5.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jcandan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024