Skip to content
This repository has been archived by the owner on Mar 17, 2022. It is now read-only.

Commit

Permalink
clean up whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
xadn committed Feb 26, 2015
1 parent 488f682 commit 4892d0c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions src/retina/_background.scss
Expand Up @@ -2,19 +2,19 @@

/**
* Mixin for retina backgrounds where you can't use a sprite.
*
*
* - Make sure you have a file@2x.png file additional to your file.png.
* - The mixin prepends $imgPath, which should be set globally at some point. Default is: "img/"
*
* Examples:
* li {
* @include retina-background(arrow, no-repeat 10px 15px)
* }
*
*
* a.external {
* @include retina-background(external, no-repeat right)
* }
*
*
* @param {String} $file Path to file relative to images folder defined in config.rb and without a file extension
* @param {Object} [$attr] Additional attributes like position or repetition. E.g. `no-repeat top right`
* @param {String} [$type] The file type.
Expand All @@ -31,7 +31,7 @@

$width: image-width($image);
$height: image-height($image);

@include retina {
background-image: image-url($image2x);
background-size: $width $height;
Expand Down
14 changes: 7 additions & 7 deletions src/retina/_sprite.scss
Expand Up @@ -19,13 +19,13 @@ $retina-sprite-urls2x : 0;
* A mixin to create retina sprites with hover & active states
*
* You have to register a pair of sprites using `{@link #retina-sprite-add}` and then you can use this mixin:
*
*
* @include retina-sprite-add(icons, "icons/*.png", "icons-retina/*.png");
*
* .my-icon {
* @include retina-sprite(icon-name, icons);
* }
*
*
* @param {String} $name
* @param {String} [$sprite-name]
* @param {Boolean} [$hover=false]
Expand All @@ -43,7 +43,7 @@ $retina-sprite-urls2x : 0;

$sprite : nth($retina-sprite-sprites, $index);
$sprite-url : nth($retina-sprite-urls, $index);

$sprite2x : nth($retina-sprite-sprites2x, $index);
$sprite-url2x : nth($retina-sprite-urls2x, $index);

Expand Down Expand Up @@ -97,7 +97,7 @@ $retina-sprite-urls2x : 0;
//
@mixin _retina-sprite($name, $sprite, $sprite-url, $sprite2x, $sprite-url2x, $hover, $active, $dimensions: true, $pad: 0) {
display: inline-block;

background-image: $sprite-url;
@include _retina-sprite-bg-pos($sprite, $name, $pad);

Expand All @@ -113,11 +113,11 @@ $retina-sprite-urls2x : 0;
@if $active == true {
&:active { @include _retina-sprite-bg-pos($sprite, $name + _active, $pad); }
}

@if $pad > 0 {
padding: $pad;
}

@include retina {
background-image: $sprite-url2x;
@include background-size(ceil(image-width(sprite-path($sprite2x)) / 2) auto);
Expand All @@ -126,7 +126,7 @@ $retina-sprite-urls2x : 0;
// you have sprites that have an odd-number of pixels in width

@include _retina-sprite-bg-pos($sprite2x, $name, $pad, 2);

@if $hover == true {
&:hover { @include _retina-sprite-bg-pos($sprite2x, $name + _hover, $pad, 2); }
}
Expand Down

0 comments on commit 4892d0c

Please sign in to comment.