@import "typography";
@import "compass/utilities/general/float";

// Usage examples:
// As a top-level mixin, apply to any page that includes the stylesheet:
// <pre class="source-code sass">
// +blueprint-print
// </pre>
// Scoped by a presentational class:
// <pre class="source-code sass">
// body.blueprint
//  +blueprint-print(true)
// </pre>
// Scoped by semantic selectors:
// <pre class="source-code sass">
// body#page-1, body#page-2, body.a-special-page-type
//   +blueprint-print(true)
// </pre>
@mixin blueprint-print($nested: false) {
  @if $nested {
    @include blueprint-print-body;
    @include blueprint-print-defaults;
  } @else {
    body { @include blueprint-print-body; }
    @include blueprint-print-defaults;
  }
}

// This style is in blueprint, but it can be annoying and
// it doesn't work in all browsers.
// Feel free to mix it into anchors where you want it.
@mixin blueprint-show-link-urls {
  &:after {
    content: " (" attr(href) ")";
    font-size: 90%; } }

@mixin blueprint-print-body {
  line-height: 1.5;
  font-family: $blueprint-font-family;
  color: black;
  background: none;
  font-size: 10pt; }

@mixin blueprint-print-defaults {
  .container {
    background: none; }
  hr {
    background: #cccccc;
    color: #cccccc;
    width: 100%;
    height: 2px;
    margin: 2em 0;
    padding: 0;
    border: none;
    &.space {
      background: white;
      color: white; } }
  h1, h2, h3, h4, h5, h6 {
    font-family: $blueprint-font-family; }
  code {
    font: {
      size: 0.9em;
      family: $blueprint-fixed-font-family; }; }
  a {
    img {
      border: none; }
    &:link,
    &:visited {
      background: transparent;
      font-weight: 700;
      text-decoration: underline; } }
  p img.top {
    margin-top: 0; }
  blockquote {
    margin: 1.5em;
    padding: 1em;
    font-style: italic;
    font-size: 0.9em; }
  .small {
    font-size: 0.9em; }
  .large {
    font-size: 1.1em; }
  .quiet {
    color: #999999; }
  .hide {
    display: none; } }
