@charset "UTF-8";

// @description
// * `area` mixin.
// * This mixin provides a convenient way to set the `area` to
// * a value using the specified vendor prefixes for better
// * cross-browser compatibility.

// @access public

// @version 1.1.0

// @author Khaled Mohamed

// @license MIT

// @repository: https://github.com/Black-Axis/sass-pire

// @reference: https://developer.mozilla.org/en-US/docs/Web/CSS/grid-area

// @namespace grid

// @module grid/area

// @dependencies:
// * - meta.type-of (SASS function).
// * - Error.throw (function).

// @param {String} $value
// * The value to set to grid-area property.

// @example
// * .example {
// *   @include area("2 / 1 / span 2 / span 3");
// * }

// @output:
// * .example {
// *   -ms-grid-row: 2 / 1 / span 2 / span 3;
// *   grid-area: 2 / 1 / span 2 / span 3;
// * }

@use "sass:meta";
@use "../../development-utils/toggle-error-message" as Error;

@mixin area($value) {
    @if meta.type-of($value) != string {
        content: Error.throw("The parameters of area mixin must be in a string type.");
    } @else {
        $grid-area-prefixes-values: (-ms-grid-row, grid-area) !default;

        @each $item in $grid-area-prefixes-values {
            #{$item}: #{$value};
        }
    }
}
