1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

How can I set .scss variable value at runtime?

Discussão em 'Angular' iniciado por Ankit, Setembro 26, 2024.

  1. Ankit

    Ankit Guest

    I am coding in Ionic 3, trying to develop countdown timer. I need to set .scss value at runtime. How can I do it?

    .scss code

    $d: 300;
    $w: 20;
    $interval: 2;
    $rotation: 1;

    &:before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border: $w+px solid #fff;
    -webkit-animation-duration: $interval+s;
    -webkit-animation-iteration-count: $rotation;
    -webkit-animation-timing-function: linear;
    -webkit-animation-fill-mode: forwards;
    }


    The value of interval and rotation may be anything like 1,2,3,4,etc.. How can I set it at runtime?

    Continue reading...

Compartilhe esta Página