From e182245d3205d929881f51da9b48d6c4ed97a682 Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Thu, 8 Feb 2024 16:36:31 -0600 Subject: Commit inicial --- _sass/neat/grid/_direction-context.scss | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 _sass/neat/grid/_direction-context.scss (limited to '_sass/neat/grid/_direction-context.scss') diff --git a/_sass/neat/grid/_direction-context.scss b/_sass/neat/grid/_direction-context.scss new file mode 100644 index 0000000..7b0d46e --- /dev/null +++ b/_sass/neat/grid/_direction-context.scss @@ -0,0 +1,33 @@ +@charset "UTF-8"; + +/// Changes the direction property used by other mixins called in the code block argument. +/// +/// @param {String} $direction [left-to-right] +/// Layout direction to be used within the block. Can be `left-to-right` or `right-to-left`. +/// +/// @example scss - Usage +/// @include direction-context(right-to-left) { +/// .right-to-left-block { +/// @include span-columns(6); +/// } +/// } +/// +/// @example css - CSS Output +/// .right-to-left-block { +/// float: right; +/// ... +/// } + +@mixin direction-context($direction: left-to-right) { + $scope-direction: $layout-direction; + + @if to-lower-case($direction) == "left-to-right" { + $layout-direction: LTR !global; + } @else if to-lower-case($direction) == "right-to-left" { + $layout-direction: RTL !global; + } + + @content; + + $layout-direction: $scope-direction !global; +} -- cgit v1.2.3