Created
January 12, 2015 09:22
-
-
Save S3ak/fe2cea23116e09fc48ec to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/// Mixin helping defining both `width` and `height` simultaneously. | |
/// | |
/// @author Hugo Giraudel | |
/// | |
/// @access public | |
/// | |
/// @param {Length} $width - Element's `width` | |
/// @param {Length} $height ($width) - Element's `height` | |
/// | |
/// @example scss - Usage | |
/// .foo { | |
/// @include size(10em); | |
/// } | |
/// | |
/// .bar { | |
/// @include size(100%, 10em); | |
/// } | |
/// | |
/// @example css - CSS output | |
/// .foo { | |
/// width: 10em; | |
/// height: 10em; | |
/// } | |
/// | |
/// .bar { | |
/// width: 100%; | |
/// height: 10em; | |
/// } | |
@mixin size($width, $height: $width) { | |
width: $width; | |
height: $height; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment