Utility Classes

Other topics

Generate .hidden-* classes for all breakpoints - SCSS

// Mixin to generate hidden classes
@mixin generate-hidden-classes {
  @each $bp in map-keys($grid-breakpoints) {
    .hidden-#{$bp} {
      @include media-breakpoint-only($bp) {
        display: none !important;
      }
    }
  }
}

// Call to the mixin
@include generate-hidden-classes();

Contributors

Topic Id: 6217

Example Ids: 21521

This site is not affiliated with any of the contributors.