Closed (fixed)
Project:
radix
Version:
5.0.7
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Mar 2023 at 02:22 UTC
Updated:
30 Mar 2023 at 10:44 UTC
Jump to comment: Most recent
The text-primary class fails to color the text.

Based on the findings noted below, this likely affects many more class utilities.
Add content with the 'text-primary" class <p class="text-primary>this should be blue</p>
The text is still dark, not blue (primary).
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)),
),
);
Identify the particular culprit. Decide whether to remove the example utility overrides.
| Comment | File | Size | Author |
|---|---|---|---|
| bootstrap-bg-opacity-not-defined.png | 64.78 KB | jcandan |
Comments
Comment #2
jcandan commentedFound a pretty good write-up on the pros and cons of a couple different approaches, the first of which, according to the author, follows Bootstrap documentation.
Adding the following fixed the issue for me.
The question remains, should this example utilities override remain in the sub-theme?
Comment #3
jcandan commentedSorry, a clarification. The above
@importstatement also needs the following changes:You need to
map-mergewith the imported$utilitiesmap.Comment #4
doxigo commentedThanks James, played around and pushed a fix
Comment #5
doxigo commentedComment #7
doxigo commented