summaryrefslogtreecommitdiff
path: root/_sass/tiny/_mixins.scss
blob: 3afa7e92f2841d63b726d4302ff525accf03427f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Clearfix
//
// Clears floats via mixin (avoid using as a class).

@mixin clearfix {
  &:before {
    display: table;
    content: "";
  }

  &:after {
    display: table;
    clear: both;
    content: "";
  }
}

// Text hiding for image based text replacement.
// Higher performance than -9999px because it only renders
// the size of the actual text, not a full 9999px box.

@mixin hide-text() {
  overflow: hidden;
  text-indent: 100%;
  white-space: nowrap;
}

@mixin gradient($start: #fafafa, $end: #eaeaea) {
  background-color: $end;
  // FF 3.6+
  background-image: -moz-linear-gradient($start, $end);
  // Safari 5.1+, Chrome 10+
  background-image: -webkit-linear-gradient($start, $end);
  background-image: linear-gradient($start, $end);
  background-repeat: repeat-x;
}