0

I have this style:

.main-panel{
  height: 100%;
  display: grid;
  grid-template-rows: 4rem auto;
  grid-template-columns: 14rem auto;
  grid-template-areas: 'header header''sidebar body';
}

Now how do I change the style grid-template-areas in angular

for example :

grid-template-columns: 14rem auto;
grid-template-areas: 'header header''sidebar body';

to >>>

grid-template-columns: 100%;
grid-template-areas: 'header header''sidebar sidebar';

Doesn't angular support styles from css grid????!!!!!

SiddAjmera
  • 38,129
  • 5
  • 72
  • 110

2 Answers2

1

Can you share your HTML? Maybe you need to target :host /deep/

like that:

What does :host /deep/ selector mean?

Dima Shivrin
  • 99
  • 2
  • 11
1

You can create two class, and dynamic change class of an element. example css

.A{
grid-template-columns: 14rem auto;
grid-template-areas: 'header header''sidebar body';
}

.B{
grid-template-columns: 100%;
grid-template-areas: 'header header''sidebar sidebar';
}

in HTML

<div [ngClass]="{
 'A': isA,
 'B': isB
}"></div>
Stanislav
  • 23
  • 4