anthonymidili/Recipedia

View on GitHub
app/assets/stylesheets/on_print.scss

Summary

Maintainability
Test Coverage
@use "sass:math";

@media print {
  html, body {
    background: none;
    background-image: none !important;
    height: 100%;
  }

  #wrap {
    min-height: 100%;
    display: flex;
    flex-direction: column;
  }

  #main {
    flex: 1 1 0%;
  }

  #main, .callout, .callout-transparent {
    border: none !important;
    box-shadow: none !important;
    background: none !important;
    padding: 0 !important;
  }

  .left-on-print{
    text-align: left !important;
  }

  .navbar, #search-box, footer, .hide-on-print, .messages {
    display: none !important;
  }

  a {
    text-decoration: none;
    color: $black;
  }

  a[href]:after {
    content: none;
  }

  .center-on-print {
    font-size: 2em;
    text-align: center;

  }

  h1 {
    font-size: 2rem;
  }

  // Add bootstrap large grid for page print.
  @for $n from 1 through 12 {
    .col-print-#{$n} {
      width: percentage(math.div($n, 12));
    }
  }

  /* Fixed to the bottom center of every page */
  .print-footer.hidden {
    display: flex;
    justify-content: center;
    width: 100%;
  }
}