Questions tagged less

Explore the latest questions and answers asked by our top developers.

Dynamically change less variable for dark theme in Angular

I hope it is possible. Need to dynamically change less variable for using dark theme. The code is below: @theme: dark; @colors: { primary-violet-light: #608cef; primary-violet-dark: #031d58; } @primary-violet: @colors[[email protected]{theme}]; // have to be #031d58 But even it doesn’t work. The error is in the last row. "[email protected]{theme}" have to be primary-violet-dark but it doesnt. […]

By Illia Haponov
Categorized as angular, darkmode, javascript, less, variables Tagged , , , ,

Angular/SCSS disable RGBA() to Hexidecimal

I’m building an UWP app where Hexidecimal is only supported up to 6 numbers. When I run ng build all rgba() in the scss files are changed to hexidecimal. This makes a lot of elements rendering without colors. How can I preserve rgba() in my build process? ex; component.scss background: rgba(0, 0, 0, .5); ng […]

Categorized as angular, css, less, sass Tagged , , ,

Can’t scroll while using pointer-events: auto; property

I’m using pointer-event. and the problem is i can’t use scroll no more. how can i scroll ? pointer-events: auto; div{ pointer-events: none; height: 100px; overflow: scroll; } <div> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus […]

By Hamza
Categorized as angular, css, html, less, reactjs Tagged , , , ,

How do I get rid of the Material DatetimePicker time underline

I am using Angular Material DatetimePicker, I have a problem, I am trying to remove this underline, could not find a way to do it. here’s DEMO stackblitz Source: Angular Questions

By Hamza
Categorized as angular, css, html, less Tagged , , ,

Less mixin is not applied with a variable selector

I’m trying to write a LESS mixin that accepts two parameters. First is a position value and second is a CSS selector, second is optional. .mixin-sticky-column-left-fix(@positionLeftWithUnit; @selector: ‘.action-menu-column’) { &@{selector} { left: @positionLeftWithUnit !important; } } I’m calling this like this in two places. mat-cell, mat-header-cell { .mixin-sticky-column-left-fix(443.99px); .mixin-sticky-column-left-fix(339.99px; ‘.left339’); } I expect that the […]

By vignesh
Categorized as angular, css, less Tagged , ,

How do I click through an element that serves as an overlay while maintaining the overlay element’s click event using CSS?

I know that pointer-events: none; allows me to click through an element with css. I’m trying to allow click-through of an overlaying <span> tag to a span tag underneath that has an important event associated with it. The span tag underneath when click is held down will add a class that allows a table column […]

By blucky 36
Categorized as angular, css, html, less, ngx-datatable Tagged , , , ,

How to instruct Angular CLI to not manipulate LESS url() at build time?

We have an Angular 11 application, which needs to be served from a CDN (we build once and deploy to multiple environments and each environment has it’s own CDNs). We use LESS for writing our styles. So, to fetch lazy chunks and assets we set the __webpack_public_path__ in the following manner (we cannot set –deploy-url […]

By Amritraj
Categorized as angular, javascript, less, sass, webpack Tagged , , , ,

Error: unable to get local issuer certificate. Error in Resource

I am trying to build angular application using gulp it throws following error less error: resource ‘,200,300,400,500,600,700,800,900’ gave this Error: Error: unable to get local issuer certificate in file /Users/…../……../src/styles/main.less line no. 1 /Users/…./node_modules/…../lib/gulp/styles.js:48 throw new Error(‘less failures’); ^ Error: less failures at Duplexify.errorHandler (/Users/…./node_modules/……/lib/gulp/styles.js:48:17) at Duplexify.emit (events.js:203:15) at Duplexify.EventEmitter.emit (domain.js:448:20) at Duplexify._destroy (/Users/…../node_modules/duplexify/index.js:191:15) at […]

By Prabakaran A
Categorized as angular, angularjs, gulp, less, node.js Tagged , , , ,

Angular component with NgZorro Input inside and Storybook

I’m trying to implement custom component uses NgZorro components and test it through Storybook. First (as described in numerous articles) I created a component story: export default { component: SomeComponent, title: ‘Some Component’, decorators: [ moduleMetadata({ imports: [NzInputModule, SomeComponentModule] } ] } as Meta; export const Test: Story<SomeComponentModule> = () => ({ template: `<app-some-component> <input […]

By North Halcyon
Categorized as angular, less, ng-zorro-antd, storybook Tagged , , ,

Less Cannot find variable ‘xxx’

I am trying to implement a dark theme in ngx-charts. I am quite new in using less. Below is the code My IDE is complaining Cannot find variable ‘color-bg-darker’ and compilation fails Error: ./src/styles.less Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js): ModuleBuildError: Module build failed (from ./node_modules/less-loader/dist/cjs.js): */ $color-bg-darkest: #13141b; ^ Unrecognised input Error in C:UsersKOTIENO1DesktopProjectsGariambaInvoicingangular-invoicing-frontendsrcstyles.less (line […]

By Owen Kelvin
Categorized as angular, css, less, ngx-charts Tagged , , ,
1 2 3

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us