Block

Simple block and inline block display utility classes with module mixins for responsive modifiers.

Examples

.block {
  display: block;
}

.block-inline {
  display: inline-block;
}

Responsive mixins

Responsive modifier mixins are also provided with no pre-defined breakpoints so they can be included as modules with custom SCSS breakpoints, or alternatively enabled in the breakpoints included with the framework (see below). The following demonstrates the static and responsive names for the .block utility.

.block
.block-xl
.block-lg
.block-md
.block-sm
.block-xs

Using the module

Add the sassmods.scss to your custom styles as below then include the Sass mixin(s) anywhere below.

custom.scss
@use "sassmods/scss/sassmods" as *;
@include block-css;

// Example breakpoint
@media (max-width: 480px) {
  @include block-sm-css;
}

Source

_block.scss
//  ------------------------------------------------------------
//  Block
//  ------------------------------------------------------------

@mixin block-css {
  .block {
    display: block;
  }
  
  .block-inline {
    display: inline-block;
  }
}

@mixin block-xl-css {
  .block-xl {
    display: block;
  }
  
  .block-inline-xl {
    display: inline-block;
  }
}

@mixin block-lg-css {
  .block-lg {
    display: block;
  }
  
  .block-inline-lg {
    display: inline-block;
  }
}

@mixin block-md-css {
  .block-md {
    display: block;
  }
  
  .block-inline-md {
    display: inline-block;
  }
}

@mixin block-sm-css {
  .block-sm {
    display: block;
  }
  
  .block-inline-sm {
    display: inline-block;
  }
}

@mixin block-xs-css {
  .block-xs {
    display: block;
  }
  
  .block-inline-xs {
    display: inline-block;
  }
}