This repository has been archived by the owner on Sep 13, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 879
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Phil LaPier
committed
Apr 19, 2014
1 parent
ccf954f
commit 9154ef4
Showing
21 changed files
with
310 additions
and
394 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,44 @@ | ||
@mixin size($size) { | ||
$height: nth($size, 1); | ||
$width: $height; | ||
@if length($size) == 1 { | ||
@if $size == auto { | ||
width: $size; | ||
height: $size; | ||
} | ||
|
||
@if length($size) > 1 { | ||
$height: nth($size, 2); | ||
} | ||
@else if unitless($size) { | ||
width: $size + px; | ||
height: $size + px; | ||
} | ||
|
||
@if $height == auto or (type-of($height) == number and not unitless($height)) { | ||
height: $height; | ||
@else if not(unitless($size)) { | ||
width: $size; | ||
height: $size; | ||
} | ||
} | ||
|
||
@if $width == auto or (type-of($height) == number and not unitless($width)) { | ||
width: $width; | ||
// Width x Height | ||
@if length($size) == 2 { | ||
$width: nth($size, 1); | ||
$height: nth($size, 2); | ||
|
||
@if $width == auto { | ||
width: $width; | ||
} | ||
@else if not(unitless($width)) { | ||
width: $width; | ||
} | ||
@else if unitless($width) { | ||
width: $width + px; | ||
} | ||
|
||
@if $height == auto { | ||
height: $height; | ||
} | ||
@else if not(unitless($height)) { | ||
height: $height; | ||
} | ||
@else if unitless($height) { | ||
height: $height + px; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.