Sha256: 052c601b5f50fa5e5b0c969ae9c794aa7287320c0356046f400dd751a546ba34

Contents?: true

Size: 1.39 KB

Versions: 4

Compression:

Stored size: 1.39 KB

Contents

/* Typographic control for fitting text and elements */

// Float an element, like a box, to the top of bottom of a page (print only)
.float-top#{$edition-suffix} {
  float: top;
}
.float-bottom#{$edition-suffix} {
  float: bottom;
}
.float-top#{$edition-suffix} + p, .float-bottom#{$edition-suffix} + p {
  text-indent: $line-height-default; // If a paragraph would normally be flush left after an element, but that element is floated away, it should get its indent back.
}
 
// These classes control letter-spacing (tracking), usually to save widows and orphans.
@for $i from 1 through 100 {
  $add-space: $i * 0.001em;
  .tighten-#{$i}#{$edition-suffix} {
    letter-spacing: $letter-spacing-text - $add-space;
    font-style: inherit;
    background-color: $highlight-tightened;
  }
  .loosen-#{$i}#{$edition-suffix} {
    letter-spacing: $letter-spacing-text + $add-space;
    font-style: inherit;
    background-color: $highlight-loosened;
  }
}

// These classes set the height of any element relative to the $line-height-default.
// Especially useful for controlling the height of images to retain a baseline grid.
// $line-height-default should be set in a non-relative unit, like points,
// otherwise you'll get exponential differences in height.
@for $i from 1 through 100 {
  $height: $i * $line-height-default;
  .height-#{$i}#{$edition-suffix} {
    height: $height;
  }
}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
electric-book-classic-theme-0.1.3 _sass/partials/_print-fitting.scss
electric-book-classic-theme-0.1.2 _sass/partials/_print-fitting.scss
electric-book-classic-theme-0.1.1 _sass/partials/_print-fitting.scss
electric-book-classic-theme-0.1.0 _sass/partials/_print-fitting.scss