@use 'sass:string';
@use '../../functions/math/with-unit/with-unit.scss' as *;

/**
 * Sets the element size.
 * Shorthand for both `width` and `height` properties.
 *
 * @param    {number}    $width              The width of the element.
 * @param    {number}    $height [$width]    The height of element.
 */
@mixin box($width, $height: $width) {
	$width: with-unit($width);
	$height: with-unit($height);

	width: if($width == 'n', null, string.unquote(#{$width}));
	height: if($height == 'n', null, string.unquote(#{$height}));
}
