less

Angular Material Dropdown inside Bootstrap Modal

China☆狼群 提交于 2020-01-05 05:31:06
问题 I have an Angular 5 app that must use Angular Material's mat-select inside a Bootstrap modal. The issue is that the dropdown options appear behind the modal. My code looks like this: <mat-form-field class="mdb-form-field form-adjustments"> <mat-select placeholder="What fruit are you looking for?" [formControl]="fruitType" [(ngModel)]="defaultFruitType"> <mat-option *ngFor="let fruitType of fruitTypes" [value]="fruitType">{{ fruitType }} </mat-option> </mat-select> </mat-form-field> I know I

Use unknown values as selectors in Less

时光总嘲笑我的痴心妄想 提交于 2020-01-05 05:24:05
问题 Given this markup: <div class="parent" data-active="typeA"> <div class="child" data-show="typeA">Show only when parent=typeA</div> <div class="child" data-show="typeB">Show only when parent=typeB</div> <div class="child" data-show="typeC">Show only when parent=typeC</div> </div> I'm trying to write a globally applicable LESS rule that only displays a child when its data-show attribute matches the parent's data-active attribute. Something like this: .parent { .child { display:none; } &[data

less, producing the wrong output

若如初见. 提交于 2020-01-05 04:24:10
问题 Main file @import (reference) './kendo1.less'; .FadedGrid { @import (reference) './kendo2.less'; } .FadedGrid { @import (reference) './kendo2.less'; .k-grid-header th { background-color: @input-background-color; } } kendo1.less @input-background-color: #000; kendo2.less @input-background-color: #fff; This produces .FadedGrid .k-grid-header th { background-color: #000000; } But the colour here should be #ffffff, not #000000 回答1: You need to change you import from reference to multiple. If you

Change bootstrap webpage font size when

大憨熊 提交于 2020-01-05 03:44:13
问题 How can I allow users to change web page -built with bootstrap- font size when clicking on a button? I would like to change all components font size relatively. Is this possible? Thanks, 回答1: This is usually done with Javascript and cookies. Here's an example using jQuery: Quick and Easy jQuery Font Resizer Tutorial 回答2: Bootstrap uses global @baseFontSize parameter that controls font size of all elements, but changing it would require re-compilation of the css with less. 来源: https:/

Grunt compile all .less to .css in each directory

馋奶兔 提交于 2020-01-04 14:16:40
问题 So I have setup my site to use modules, in which each module has it's own .less file which needs to be compiled into .css. Folder Structure: /common/modules/{module-name}/style.less I need all the style.less files to be converted into style.css files in the same directory. For example: /common/modules/clock/style.less would need to be compiled to /common/modules/clock/style.css I don't want to have to add each of the modules individually to my grunt file, is there a way to do this dynamically

Can I override global variables from the calling scope

删除回忆录丶 提交于 2020-01-04 13:42:07
问题 I need to override some global variables used within a mixin. However I'm reluctant to just change the variables in global space (wouldn't be overriding then) Consider this given mixin with the required variable defined. // Mixin and adjust the regular image class .thumbnail { display: block; padding: @thumbnail-padding; margin-bottom: @line-height-computed; line-height: @line-height-base; background-color: @thumbnail-bg; border: 1px solid @thumbnail-border; border-radius: @thumbnail-border

Can I override global variables from the calling scope

拥有回忆 提交于 2020-01-04 13:41:08
问题 I need to override some global variables used within a mixin. However I'm reluctant to just change the variables in global space (wouldn't be overriding then) Consider this given mixin with the required variable defined. // Mixin and adjust the regular image class .thumbnail { display: block; padding: @thumbnail-padding; margin-bottom: @line-height-computed; line-height: @line-height-base; background-color: @thumbnail-bg; border: 1px solid @thumbnail-border; border-radius: @thumbnail-border

Can I override global variables from the calling scope

☆樱花仙子☆ 提交于 2020-01-04 13:41:04
问题 I need to override some global variables used within a mixin. However I'm reluctant to just change the variables in global space (wouldn't be overriding then) Consider this given mixin with the required variable defined. // Mixin and adjust the regular image class .thumbnail { display: block; padding: @thumbnail-padding; margin-bottom: @line-height-computed; line-height: @line-height-base; background-color: @thumbnail-bg; border: 1px solid @thumbnail-border; border-radius: @thumbnail-border

Convert rgba colour definition string in LESS to color instance

最后都变了- 提交于 2020-01-04 09:07:20
问题 Suppose I've parsed my mixin parameters and colours are provided using rgba function. Now I would like to mix two of those colours, but LESS mix function requires parameter instances of type color . What I tried ...and doesn't work calling color("rgba(0,0,0,.5)") mix(@first, ~"@{second}") where @second is a string like rgba(0,0,0,0.5) How do I convert to color? 回答1: I'm afraid you won't find a built in function to do this in LESS. The color() functions argument needs to be a hexadecimal or

Convert rgba colour definition string in LESS to color instance

自古美人都是妖i 提交于 2020-01-04 09:07:07
问题 Suppose I've parsed my mixin parameters and colours are provided using rgba function. Now I would like to mix two of those colours, but LESS mix function requires parameter instances of type color . What I tried ...and doesn't work calling color("rgba(0,0,0,.5)") mix(@first, ~"@{second}") where @second is a string like rgba(0,0,0,0.5) How do I convert to color? 回答1: I'm afraid you won't find a built in function to do this in LESS. The color() functions argument needs to be a hexadecimal or