skip to Main Content

And selector referencing parent selector twice in SCSS

I want to do in SCSS something quite simple in vanilla CSS: targeting an element that has two classes. A simplified example is below: <div class="parent"> <div class="child"></div> <div class="child child--red"></div> <div class="child child--green"></div> <div class="child child--red child--green"></div> </div> I…

VIEW QUESTION

Html – Select class where parent is last child in

I have a simple html hierarchy: <div> <div> <div class="custom-class">whatever</div> </div> <div> <div class="custom-class">whatever</div> </div> <div> <div class="custom-class">thing i want to select</div> </div> </div> I am currently adding attributes to .custom-class but would like to add a specific attribute to…

VIEW QUESTION

Html – css property – initial-value overwrites setting from outside

I'm working on a angular-project. I have the following component class: export class ReservationTableComponent implements OnInit { @Input({ required: true }) table!: Table; @Input() set colMinWidth(value: string) { this.renderer.setStyle(this.el.nativeElement, "--grid-column-min-width", value); } @Input() set colMaxWidth(value: string) { this.renderer.setStyle(this.el.nativeElement, "--grid-column-max-width", value);…

VIEW QUESTION

Loop to assign mixins to classes in scss

I want to assign several @mixins to classes with the same name, something like: @each $herramienta in $listaHerramientas { .#{$herramienta} { @include #{$herramienta}; } } The compiler throws the error Expected identifier, which seems to mean the @include does not…

VIEW QUESTION
Back To Top
Search