Sha256: 0ec1ae34e14e3d617c4cd5bea07cb51443e63a39ac72c1e0755b3a3110993c76

Contents?: true

Size: 1.78 KB

Versions: 19

Compression:

Stored size: 1.78 KB

Contents

@import "../tokens/screen_sizes";

@function str_replace($string, $search, $replace: '') {
  $index: str_index($string, $search);
  @if $index {
    @return str_slice($string, 1, $index - 1) + $replace + str_replace(str_slice($string, $index + str_length($search)), $search, $replace);
  }
  @return $string;
}

@mixin layout_settings($size, $side, $color, $selector) {
  $parent_name: str_replace($selector, '.', '');
  $name: ".layout";
  display: grid;

  &.full {
    min-height: 100vh;
  }
  @if $side == 'left' {
    grid-template-areas: "#{$parent_name}_sidebar #{$parent_name}_body";
    grid-template-columns: $size auto;
  } @else {
    grid-template-areas: "#{$parent_name}_body #{$parent_name}_sidebar";
    grid-template-columns: auto $size;
  }

  > #{$name}_body {
    grid-area: #{$parent_name}_body;
    min-width: 0;
  }
  > #{$name}_sidebar {
    grid-area: #{$parent_name}_sidebar;
    @if $side == 'left' {
      border-width: 0 1px 0 0;
      border-style: solid;
      @if $color == 'dark' {
        background: $bg_dark;
        border-color: $border_dark;
      } @else if $color == 'gradient' {
        border-color: $border_dark;
        @include gradient;
      } @else if $color == 'transparent' {
        border-color: transparent;
      } @else {
        background: $white;
        border-color: $border_light;
      }
    }
    @if $side == 'right' {
      border-width: 0 0 0 1px;
      border-style: solid;
      @if $color == 'dark' {
        background: $bg_dark;
        border-color: $border_dark;
      } @else if $color == 'gradient' {
        border-color: $border_dark;
        @include gradient;
      } @else if $color == 'transparent' {
        border-color: transparent;
      } @else {
        background: $white;
        border-color: $border_light;
      }
    }
  }
}

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
playbook_ui-4.5.1 app/pb_kits/playbook/pb_layout/_layout_mixin.scss
playbook_ui-4.5.0 app/pb_kits/playbook/pb_layout/_layout_mixin.scss
playbook_ui-4.4.1 app/pb_kits/playbook/pb_layout/_layout_mixin.scss
playbook_ui-4.4.0 app/pb_kits/playbook/pb_layout/_layout_mixin.scss
playbook_ui-4.3.1 app/pb_kits/playbook/pb_layout/_layout_mixin.scss
playbook_ui-4.3.0 app/pb_kits/playbook/pb_layout/_layout_mixin.scss
playbook_ui-4.2.0 app/pb_kits/playbook/pb_layout/_layout_mixin.scss
playbook_ui-4.1.2 app/pb_kits/playbook/pb_layout/_layout_mixin.scss
playbook_ui-4.1.1 app/pb_kits/playbook/pb_layout/_layout_mixin.scss
playbook_ui-4.1.0 app/pb_kits/playbook/pb_layout/_layout_mixin.scss
playbook_ui-4.0.1 app/pb_kits/playbook/pb_layout/_layout_mixin.scss
playbook_ui-4.0.0 app/pb_kits/playbook/pb_layout/_layout_mixin.scss
playbook_ui-3.5.0 app/pb_kits/playbook/pb_layout/_layout_mixin.scss
playbook_ui-3.4.0 app/pb_kits/playbook/pb_layout/_layout_mixin.scss
playbook_ui-3.3.0 app/pb_kits/playbook/pb_layout/_layout_mixin.scss
playbook_ui-3.2.0 app/pb_kits/playbook/pb_layout/_layout_mixin.scss
playbook_ui-3.1.0 app/pb_kits/playbook/pb_layout/_layout_mixin.scss
playbook_ui-3.0.1 app/pb_kits/playbook/pb_layout/_layout_mixin.scss
playbook_ui-3.0.0 app/pb_kits/playbook/pb_layout/_layout_mixin.scss