ngx-responsive icon indicating copy to clipboard operation
ngx-responsive copied to clipboard

FR: Apply classes based on breakpoint size

Open photostu opened this issue 8 years ago • 3 comments

similar to the way you can do [class.hidden]="amIHidden" with core ng2

Something like this would be stellar :-) [class.iamsmall]="{max:768}"

(or whatever syntax is appropriate.

photostu avatar Feb 24 '17 14:02 photostu

You should considering CSS option :

@mixin smallViewport {
  @media (max-width: #{$smallViewport - 1px}) {
    @content;
  }
}

.wrapper {
  display: block;

  @include smallViewport {
    display: none;
  }
}

ShakurOo avatar Aug 26 '18 10:08 ShakurOo

Hello,

I would like to do the same but based on a responsive-window parent container size not the whole page. It would be great to have such a feature for class or even for attributes.

Thanks

no-more avatar Dec 02 '18 06:12 no-more

Is there any potential update on the package related to this enhancement request ?

chaityashah avatar Oct 29 '19 19:10 chaityashah