7,282 questions
0
votes
0
answers
20
views
Optional imports with less-loader in Webpack
We migrate from Gulp to Webpack (and from JS to TS) and we have some conditional less imports so:
@import (optional)
This worked without any issues before and just used the style, when available. Now ...
0
votes
0
answers
46
views
Dynamic LESS Theme Import in Vite Based on Environment Variable
I'm building an application with Vite where the projects' structure is the same but different projects need different color themes. Each project has its own .less file with the same variable names but ...
0
votes
1
answer
408
views
'global' is not recognized as a valid pseudo-class. Did you mean '::global' (pseudo-element) or is this a typo?
I am migrating existing web application built with react-scripts and craco to Rsbuild following this guide. The project is using LESS and CSS (LESS) modules pattern.
During a build step a receive a ...
0
votes
1
answer
20
views
Generating percentage for keyframes in LESS
I want to generate dynamically @keyframes like this, but for an arbitrary number of steps:
@keyframes slide-7-icons
{
0% { … }
14.2857% { … }
28.5714% { … }
42.8571% { … }
...
1
vote
1
answer
54
views
How not to access second last two elements by CSS
How can I add "," separated content: "," to all ul > li not the last two lists
<style>
ul li:nth-last-child(2)::after { content: "," }
</style>
is not ...
0
votes
0
answers
443
views
Vite not building the CSS when an imported LESS file is modified
My main.js file (entry point) is importing _app.less. And _app.less is in turn importing several LESS files.
But, whenever I modify an imported LESS file, I can see a hmr event in the console ([vite] ...
0
votes
1
answer
38
views
Generating a list of selectors in LESS
I want to introduce a pseudo-element, say, input-text to be replaced with the following list in any context:
input[type="text"], input[type="search"], input[type="tel"], ...
0
votes
1
answer
24
views
Passing a variable by reference in a LESS mixin
Is there a way to pass a variable by reference in a LESS mixin?
.test-mixin(@varname)
{
test-prop: @@varname; // Works, test-prop is 5.
@@varname: 7; // Error
}
:root
{
@test-var: 5;
....
0
votes
0
answers
34
views
CSS modules - no properties in styles object
I have css-loader version 7.1.2 and according to their release notes, I have to structure my code as such:
In my component, I imported the style:
import * as styles from './mycomponent.module.less'
I ...
0
votes
0
answers
26
views
Incremental inclusion of CSS Modules in codebase with LESS files
I am trying to incrementally migrate to CSS Modules from an app that has about 100 LESS files.
I can't seem to get my app to build anymore so I was wondering if someone can take a look.
My CSS loader ...
0
votes
1
answer
115
views
shell processes spawned in gdb aren't behaving correctly
It seems in my environment (Linux On Power) there are issues when I try to run a linux command in gdb. Using less prints the whole file to stdout rather than running less. Vim tells me the output is ...
0
votes
1
answer
69
views
Emulating “relative pixels” in CSS, based on root font size
As far as I know, there is still no such thing as a “relative pixel” in CSS. (1 relative pixel == 1px, if 1rem == 16px, or proportionally changed, if not).
I'm looking for an expressive way of ...
0
votes
0
answers
37
views
Can :has pseudo-class be nested in :is pseudo-class?
Can :has be nested in :is? Both :has and :is MDN articles don't cover nesting.
I have the following code (it changes opacity, when a container is hovered or contains a tabbed element):
*:is(:hover, :...
0
votes
0
answers
324
views
Compiling LESS on save in VS2022 without project
I want to compile a standalone .less file in Visual Studio 2022, that is not a part of any project, every time the file is being saved (into a .css file with the same name in the same folder). Is ...
0
votes
0
answers
22
views
Can the height of the scorll bar be set vertically? [duplicate]
I am trying to create a custom vertical scrollbar using the following LESS code.
The goal is to style the scrollbar such that:
The scrollbar's height dynamically occupies 80% of the container's ...