// Hide visually

// See https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
// for discussion of different solutions

@mixin visuallyhidden($important: false) {
  @if ($important) {
    border: 0 !important;
    clip: rect(0 0 0 0) !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    width: 1px !important;
  } @else {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
  }
}

@mixin not-visuallyhidden() {
  clip: auto !important;
  height: auto !important;
  margin: 0 !important;
  overflow: visible !important;
  padding: 0 !important;
  position: static !important;
  width: auto !important;
}

@mixin hidetext {
  letter-spacing: -1ex;
  text-indent: -9999px;
  color: transparent;
  text-decoration: none;
  line-height: 1;
}
@mixin visuallyhidden-tablecell {
  position: static !important;
  border: 0 !important;
  padding: 0 !important;
  font-size: 0.00001px !important;
  line-height: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  color: transparent;
}

%visuallyhidden {
  @include visuallyhidden;
}

%visuallyhidden-tablecell {
  @include visuallyhidden-tablecell;
}

%hidetext {
  @include hidetext;
}
