@use "@theholocron/config/src" as config;
@use "@theholocron/css-syntaxes/src" as syntaxes;
@use "../utils";

/// The width prefixerty
/// @since 0.1.0
/// @link https://developer.mozilla.org/en-US/docs/Web/CSS/width
/// @param {String} $className ["width"] - a CSS class name that will prefix all helpers
/// @param {Map} $breakpoints [config.$breakpoints] - a map of grid breakpoints
/// @param {Map} $sizing [config.$sizing] - a map of sizing prefixs
/// @example scss
///   @include width($className: w, $breakpoints: ("sm": 480px));
@mixin width($className: "width", $breakpoints: config.$breakpoints, $sizing: config.$sizing) {
	@each $prefix in config.$sizing-prefixes {
		@include utils.responsive-properties-map($properties: $sizing, $property: "#{$prefix}width", $className: #{$prefix}#{$className}, $breakpoints: $breakpoints);
		@include utils.responsive-syntaxes-list($syntaxes: syntaxes.$width, $property: "#{$prefix}width", $className: #{$prefix}#{$className}, $breakpoints: $breakpoints);
	}
}
