X-Git-Url: https://git.danix.xyz/?a=blobdiff_plain;f=assets%2Fsass%2Fbourbon%2Fbourbon%2Flibrary%2F_size.scss;fp=assets%2Fsass%2Fbourbon%2Fbourbon%2Flibrary%2F_size.scss;h=c90f36ea0b20d410ff7e4993248a99410ecb88b3;hb=2d3ca553a3d3345ec8ecdf0faedc6924cd0e2f5d;hp=0000000000000000000000000000000000000000;hpb=2ae9d02fd007f6d0bab6576f8f26d66570358605;p=theme-danix.xyz.git diff --git a/assets/sass/bourbon/bourbon/library/_size.scss b/assets/sass/bourbon/bourbon/library/_size.scss new file mode 100644 index 0000000..c90f36e --- /dev/null +++ b/assets/sass/bourbon/bourbon/library/_size.scss @@ -0,0 +1,50 @@ +@charset "UTF-8"; + +/// Sets the `width` and `height` of the element in one statement. +/// +/// @argument {number (with unit) | string} $width +/// +/// @argument {number (with unit) | string} $height [$width] +/// +/// @example scss +/// .first-element { +/// @include size(2em); +/// } +/// +/// // CSS Output +/// .first-element { +/// width: 2em; +/// height: 2em; +/// } +/// +/// @example scss +/// .second-element { +/// @include size(auto, 10em); +/// } +/// +/// // CSS Output +/// .second-element { +/// width: auto; +/// height: 10em; +/// } +/// +/// @require {function} _is-size + +@mixin size( + $width, + $height: $width +) { + @if _is-size($height) { + height: $height; + } @else { + @error "`#{$height}` is not a valid length for the `$height` argument " + + "in the `size` mixin."; + } + + @if _is-size($width) { + width: $width; + } @else { + @error "`#{$width}` is not a valid length for the `$width` argument " + + "in the `size` mixin."; + } +}