657
questions
0
votes
0
answers
7
views
Does Bootstrap support building into a version with all properties defined by variables?
I want a version of Bootstrap, where all property values have corresponding variables.
For instance, the text-white utility should have --bs-text-color variable, equal to rgba(var(--bs-white-rgb), var(...
1
vote
0
answers
49
views
Override root CSS variable without repeating al properties declarations that consume them [duplicate]
Given the following code, the text color is correctly changed in the nested element after updating the root css variable. Is there a way to avoid repeating the color prop twice and get it ...
0
votes
0
answers
20
views
Firefox fails to apply transition when element locations are set using custom CSS properties
As a proof of concept, I have created a CSS-only CodePen page with a pseudo-random number generator. This moves coloured circles to random positions on the page. The positions are stored in custom CSS ...
1
vote
1
answer
96
views
CSS Variables Not Respecting Selector Precedence? [duplicate]
I've got some code I'm writing for a website builder that's causing me issues. We're using CSS variables to define global styles, with both desktop and mobile layout options, e.g.:
:root {
--section-...
1
vote
2
answers
52
views
is there a way to assign a different cssVariable to a cssVariable based on the class it is nested in? [duplicate]
we are using a design system that has 'tokens' and 'primitives'.
the idea is that we can connect different baseColors to a different UI-elements depending on the brand.
<h1>Hi this is header&...
1
vote
2
answers
129
views
how to use css variables to contain color-mix used with another variable
I have in css (generated by sass) variable called --secondary and it's value is red(#f00)
I want to create more variables for opacity like --secondary-100, --secondary-90, ...
I used color-mix in ...
0
votes
1
answer
25
views
What's the syntax for passing a CSS custom property in reagent?
How do I create this HTML in Reagent/hiccup?
<span style="--custom-property: value"></span>
Both Hiccup and Reagent fail to document how to pass CSS custom properties.
0
votes
1
answer
115
views
Make a given oklch color 50% lighter via CSS oklch(from ...) and calc() function
We have a design system that comes with a number of CSS custom properties for colors, e.g.:
:root {
--color--blue-1: oklch(88.6% 0.023 238);
}
We're using the relatively new color format oklch.
Now ...
-1
votes
1
answer
71
views
Use SCSS to convert a CSS variable from HSL to Hex
I have a number of CSS variables containing color values. I'd like to define these in HSL format, but can I let Sass convert these to hex values?
Input:
:root {
--dark: hsl(210, 50%, 13%);
}
Output:...
0
votes
1
answer
65
views
Bootstrap CSS variables not overriding for pagination
Using Bootstrap (currently v5.3.3) I am using a custom-built WordPress theme and setting a whole group of overrides for the colours used.
The custom-built WordPress theme stylesheet is loaded last, ...
0
votes
0
answers
31
views
CSS Multiple Identical Calc Use vs Single Calc in Custom Property on Performance
I am trying to ascertain the difference between the performance impact of storing a css calc function in a css custom variable and using that variable multiple times vs simply using the css calc ...
1
vote
0
answers
68
views
how to use css variables inside javascript in rollup
I have a UI components repo setup with rollup where I want to use my css variables inside my javascript files. I have done this in another repo which was using webpack and it was quite easy:
import ...
0
votes
1
answer
108
views
CSS Custom Properties with fallback for unrecognised css value (eg. clamp())
As it stands, CSS Custom Properties enjoys a global tracked base of 99.05% support according to CanIUse. Most of this is due to IE support that has one of a number off poly fills particularly when ...
0
votes
1
answer
209
views
Can you nest CSS Variables in CSS Variable names
I was wondering if it's possible to nest a CSS Variable within a CSS variable's name or possibly do something similar:
:root {
--color-1: red;
--index: 1;
}
span {
color: var(--color-var(--...
0
votes
0
answers
56
views
How to add the more than 2 color schemes in theme palette like light, dark, abc ,def? Not accepting anything other than light and dark
I am using mui version 5.11.13. I have configured my theme.tsx as below.
Also tried by augmenting module.
import { experimental_extendTheme as extendTheme } from "@mui/material/styles";
...