Sha256: a33263e91ad8669a604bb8edb90c09445ebf1ea1a702dafb2c51594f7ef6312b
Contents?: true
Size: 1.58 KB
Versions: 5
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: $white_opacity_1; border-color: $white_opacity_1; } @else if $color == 'transparent' { border-color: transparent; } @else { background: $white; border-color: $sky; } } @if $side == 'right' { border-width: 0 0 0 1px; border-style: solid; @if $color == 'dark' { background: $white_opacity_1; border-color: $white_opacity_1; } @else if $color == 'transparent' { border-color: transparent; } @else { background: $white; border-color: $sky; } } } }
Version data entries
5 entries across 5 versions & 1 rubygems