metanorma/isodoc

View on GitHub
lib/isodoc/base_style/bands.scss

Summary

Maintainability
Test Coverage
@mixin docBandTitle($length, $fontWeight: 400, $fontFamily: null, $color: white) {
  position: relative;
  width: 25px;

  @if $fontFamily {
    font-family: unquote($fontFamily);
  }

  font-weight: $fontWeight;

  @if $length {
    height: $length;
  }

  color: $color;
  text-transform: uppercase;
  font-size: 0.9em;
  font-weight: 400;
  letter-spacing: 0.05em;
  margin: 0;
  margin-left: 6px;
  writing-mode: tb-rl;
    -webkit-transform: rotate(180deg);
    -moz-transform: rotate(180deg);
    -o-transform: rotate(180deg);
    white-space: nowrap;
    display: block;
  bottom: 0;
}


@mixin docBand(
    $order,
    $textLength: null,
    $offset: 0,
      $color: white,
    $fontWeight: 400,
    $fontFamily: null) {

  left: 0;
  top: $offset;
  height: 100%;
  position: fixed;
  display: block;

  z-index: 100 + $order;

  @if $order == 1 {
    box-shadow: -5px 0px 10px #1d1d1d;
  }

  > :first-child {
    @include docBandTitle($textLength, $fontWeight, $fontFamily, $color);
  }

  @media print {
    display: none;
  }
}


@each $key, $val in $doctype-colors-list {
  ##{$key}-band {
    background-color: #{$val};
  }
  ##{$key} {
    border-bottom: solid 3px #{$val};
  }
}


@each $key, $val in $docstage-colors-list {
  ##{$key}-band {
    background-color: #{$val};
  }
  ##{$key} {
    border-bottom: solid 3px #{$val};
  }
}