Questions tagged [less]
Less is an open-source stylesheet preprocessor that extends CSS with dynamic behavior such as variables, mixins, operations and functions. For the UNIX command, use [less-unix].
7,300
questions
0
votes
0
answers
34
views
Cannot resolve .less absolute paths in vite
I am migrating from craco to vite and currently have issues with .less files:
import @import '~antd/dist/antd.less'; doesnt work with following error:
Pre-transform error: [less] '~antd/dist/antd....
-1
votes
0
answers
28
views
Webpack build failing Angular js
i am trying to create a angular build using webpack but getting style issues.
Here is my webpack.config.js file configuration
const ModuleFederationPlugin = require("webpack/lib/container/...
0
votes
1
answer
23
views
Using less selector :not() in a :hover
<div class="row selectable">
<div class="col-sm-1 notSelectable">
First line with a delete button
</div>
<div class="col-sm-...
0
votes
2
answers
62
views
Overriding styles from external props
I have an issue with overriding styles from external components in React. I have a basic component badge which has its own less styles but sometimes I need to apply some styles from an external ...
0
votes
0
answers
10
views
Why is the syntax for LESS Accessors like this?
I am hoping to get clarification on why Less "accessors" work in the way demonstrated in a particular example.
What follows is taken from the tutorial "Less - Namespaces and Accessors&...
0
votes
1
answer
33
views
Getting errors trying to install LESS on Mac
Today I installed Node.js on macOS following a tutorial.
I used the installer (node-v20.12.2.pkg).
During this process there was a notification:
This package has installed:
Node.js v20.12.2 to /usr/...
0
votes
0
answers
53
views
How to get HTMLElement property defined in Less with JavaScript?
When I’m trying to get element properties (for example “max-block-size”) using getComputedStyle in JavaScript I get “none”. But when I look into computed properties in dev-tools I can see they have ...
0
votes
0
answers
5
views
Grunt: sort LESS properties in alphabet order
I'm able to sort LESS/CSS properties in Webstorm using Alt+X manually, but can I automate it using Grunt? For example, using grunt sort_command forder?
0
votes
0
answers
66
views
Optimal Methods for Converting SASS to SCSS
The issue lies in efficiently transforming .sass to .scss.
Although sass-convert is an outdated npm library, it was the only one I found that fulfilled my requirements. To use it, first install Ruby, ...
0
votes
0
answers
70
views
Bundle LESS into Single File using Rollup
I have a React component that is bundled using Rollup.js. This library also includes styling written in LESS. I am already able to create a single compiled CSS file from that using the PostCSS plugin.
...
1
vote
1
answer
154
views
how to use less variables in vue components?
I have imported the .less file to the vue component, but it still gives me an error.
I define the variables in base.less under assets/less.
@font-face {
font-family: 'Poppins';
src: url(../fonts/...
0
votes
1
answer
29
views
Set background conditional on child class
I want to change the background of the parent (panel-heading) only when the child button has the class "collapsed" which occurs when it's clicked. I can only use styles.
HTML:
<div class=...
0
votes
1
answer
37
views
How to loop a nested ruleset in less?
I am trying to each a nested ruleset in less, because it makes my code clear.
Like this:
@m-button-sizes:
x-large;
@m-button-sizes-rules: {
@x-large: {
height: 50px;
padding: ...
0
votes
0
answers
20
views
Extend backround-image via LESS - add rule to existing one
I have problem with this code -
<div class="banner-wrapper" style="background-image:linear-gradient(0deg, #00000088 50%, #ffffff44 120%), url('/banners/banner.png');">
&...
0
votes
1
answer
37
views
How use maps in less mixins
From the documentation:
I wrote:
#colors() {
backgroundDarkPrimary: '#0747A6';
backgroundMedium: '#dfe1e6';
backgroundLight: '#ebecf0';
backgroundLightest: '#F4F5F7';
...