Skip to content

Instantly share code, notes, and snippets.

@airen
Last active August 29, 2015 14:21
Show Gist options
  • Save airen/ffd4e5cfcaf9bd23f3e4 to your computer and use it in GitHub Desktop.
Save airen/ffd4e5cfcaf9bd23f3e4 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.13)
// Compass (v1.0.3)
// ----
/// 元素宽度和高度的设置,当`$width`和`$height`大小一样时,实现一个正方形。
/// @access public
/// @author 大漠
/// @example
/// //SCSS
///
/// .square {
/// @include box(50px);
/// }
/// .rectangle {
/// @include box(100px, 50px);
/// }
///
/// //Output CSS
///
/// .square {
/// width: 50px;
/// height: 50px;
/// }
/// .rectangle {
/// width: 100px;
/// height: 50px;
/// }
/// @link https://gist.github.com/ffd4e5cfcaf9bd23f3e4
/// @param {number} $width - 盒子宽度
/// @param {number} $height:$width - 盒子高度
@mixin box($width, $height:$width){
width: $width;
height: $height;
}
.square {
@include box(50px);
}
.rectangle {
@include box(100px, 50px);
}
.square {
width: 50px;
height: 50px; }
.rectangle {
width: 100px;
height: 50px; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment