Skip to content

Instantly share code, notes, and snippets.

@builtbylane
Created June 13, 2014 15:01
Show Gist options
  • Save builtbylane/209ed86aa5d0c8b959ef to your computer and use it in GitHub Desktop.
Save builtbylane/209ed86aa5d0c8b959ef to your computer and use it in GitHub Desktop.

Revisions

  1. builtbylane created this gist Jun 13, 2014.
    36 changes: 36 additions & 0 deletions toolbox.scss
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,36 @@
    // cover e-v-e-r-y-t-i-n-g
    @mixin coverer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    }

    // center
    @mixin centerer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    }

    @mixin word-wrap() {
    word-break: break-word;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    hyphens: auto;
    }

    @mixin ellipsis() {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    }

    @function black($opacity) {
    @return rgba(black, $opacity)
    }
    @function white($opacity) {
    @return rgba(white, $opacity)
    }