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

Style cdkdrag while dragging in angular

Discussão em 'Angular' iniciado por Vishnu, Junho 4, 2025.

  1. Vishnu

    Vishnu Guest

    I am using .cdk-drag-preview to style while dragging my tab, but I should use own class and also I should not use ! important

    If am trying to add higher css specify also it's not working.

    How to do that

    Html

    `<div cdkDrag>
    {{name}}
    <mat-icon> settings</mat-icon>
    </div>`



    Css


    .cdk-drag-preview{
    width : fit-content ! important;
    height: fit-content ! important;
    background-color - white;
    }


    I tried to add one class above this and tried

    .tab .cdk-drag-preview {}

    It doesn't work

    Continue reading...

Compartilhe esta Página