Subversion Repository Public Repository

Nextrek

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/// 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(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;
}

Commits for Nextrek/Aiba_backup/public/sass/plug-in/neat/grid/_direction-context.scss

Diff revisions: vs.
Revision Author Commited Message
1464 MOliva picture MOliva Tue 13 Oct, 2020 11:16:56 +0000