Last active
August 29, 2015 14:21
-
-
Save airen/ffd4e5cfcaf9bd23f3e4 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
// ---- | |
// 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); | |
} |
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
.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