Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

226
Vistas
@if condition not working in scss when passing dynamic value from html?

In my html file i am passing value for --is-item-status as :-

<ion-label class="textColor label-md black-shade-light" style="--is-item-status: {{item.status}}" >{{item.status | formatEnum | async}}</ion-label>

(Note:- this is populated inside *ngFor condition).

in the browser i am able to see the value getting populated as :-

enter image description here

In my scss file i have code like :-

.textColor {
  @if var(--is-item-status) ==  'INVOICE_OPEN' {
    color: blue;
  } @else if var(--is-item-status) == ('PAYMENT_STATUS_CANCELLED'  or 'INVOICE_CANCELLED' or 'ORDER_CANCELLED') {
    color: red;
  } @else if var(--is-item-status) == ('PAYMENT_STATUS_PARTLY_APPLIED' or 'INVOICE_PARTLY_PAID' or 'ORDER_CLOSED') {
    color: black;
  } @else if var(--is-item-status) == ('PAYMENT_STATUS_APPLIED' or 'INVOICE_PARTLY_PAID' or 'ORDER_INVOICED') {
    color: green;
  }  @else {
    color: yellow;
  }
}

But the if conditions are not getting satisfied. Could someone tell me what am i doing wrong in this?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda