Sha256: 140bfd5e00dc7b91978a8a8cea0ef759ea1e181e3590b3ff4af003997fb55e77

Contents?: true

Size: 1.62 KB

Versions: 20

Compression:

Stored size: 1.62 KB

Contents

// Text overflow is still a vendor-prefixed property for IE8
// clip | ellipsis | string
@mixin text-overflow($overflow) {
  -webkit-text-overflow: $overflow;
  -khtml-text-overflow:  $overflow;
  -moz-text-overflow:    $overflow;
  -o-text-overflow:      $overflow;
  text-overflow:         $overflow;
  overflow: hidden;
  white-space: nowrap;
}

@mixin font-size($font-size, $line_height: 1.5){
  font-size:    $font-size * 10px;
  font-size:    $font-size * 1rem;
  line-height:  $line_height;
}

// Utility mixin for setting spacing (margin + padding). Useful for inside
// mediaqueries where the standard spacing classes cannot be @extended
//
// returns [$method]: $size;
// returns [$method]-$direction: size;
@mixin spacing($method, $size, $direction: false) {
  @if $direction {
    #{$method}-#{$direction}: get_spacing($size);
  } @else {
    #{$method}: get_spacing($size);
  }
}

@mixin margin($size, $direction: false) {
  @include spacing(margin, $size, $direction);
}

@mixin padding($size, $direction: false) {
  @include spacing(padding, $size, $direction);
}

@function strip_unit($value) {
  @return $value / ($value * 0 + 1);
}

@function to_rem($value){
  @return strip_unit($value) * 1rem;
}

@mixin hardware_accelerate() {
  -webkit-transform: translateZ(0);
  -webkit-perspective: 1000;
  -webkit-backface-visibility: hidden;
}

// Makes items un-selectable. I.e. if you tap and hold on a button, it won't get selected.
@mixin noselect {
  @include prefixer(user-select, none, webkit moz o spec);

  -webkit-touch-callout: none;
}

@mixin antialiased {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
kayessess-0.4.0 app/assets/stylesheets/kayessess/lib/_mixins.scss
kayessess-0.3.0 app/assets/stylesheets/kayessess/lib/_mixins.scss
kayessess-0.2.11 app/assets/stylesheets/kayessess/lib/_mixins.scss
kayessess-0.2.10 app/assets/stylesheets/kayessess/lib/_mixins.scss
kayessess-0.2.9 app/assets/stylesheets/kayessess/lib/_mixins.scss
kayessess-0.2.8 app/assets/stylesheets/kayessess/lib/_mixins.scss
kayessess-0.2.7 app/assets/stylesheets/kayessess/lib/_mixins.scss
kayessess-0.2.5 app/assets/stylesheets/kayessess/lib/_mixins.scss
kayessess-0.2.4 app/assets/stylesheets/kayessess/lib/_mixins.scss
kayessess-0.2.3 app/assets/stylesheets/kayessess/lib/_mixins.scss
kayessess-0.2.2 app/assets/stylesheets/kayessess/lib/_mixins.scss
kayessess-0.2.1 app/assets/stylesheets/kayessess/lib/_mixins.scss
kayessess-0.2.0 app/assets/stylesheets/lib/_mixins.scss
kayessess-0.1.6 app/assets/stylesheets/lib/_mixins.scss
kayessess-0.1.5 app/assets/stylesheets/lib/_mixins.scss
kayessess-0.1.4 app/assets/stylesheets/lib/_mixins.scss
kayessess-0.1.3 app/assets/stylesheets/lib/_mixins.scss
kayessess-0.1.2 app/assets/stylesheets/lib/_mixins.scss
kayessess-0.1.1 app/assets/stylesheets/lib/_mixins.scss
kayessess-0.1.0 app/assets/stylesheets/lib/_mixins.scss