Sha256: deae9e0fe6d39b96c4658d197b8613208e4668cde60380c29fa6cc9d83638d92
Contents?: true
Size: 1.58 KB
Versions: 18
Compression:
Stored size: 1.58 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 == '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 == 'transparent' { border-color: transparent; } @else { background: $white; border-color: $border_light; } } } }
Version data entries
18 entries across 18 versions & 1 rubygems