This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin column-width($fraction: $column-width-default, $persistent: false) | |
{ | |
@if $persistent { | |
width: fraction-to-percentage($fraction) !important; | |
} | |
@else { | |
width: fraction-to-percentage($fraction); | |
} | |
@if $column-breakpoint { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin container-behavior($use-margin: false) | |
{ | |
@if $use-margin { | |
margin-left: 0; | |
margin-right: 0; | |
} | |
@else { | |
padding-left: 0; | |
padding-right: 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin root($hide-overflow: true, $root-max-width: $root-max-width, $set-display: false) | |
{ | |
@if $set-display { | |
display: block; | |
} | |
@if $hide-overflow { | |
overflow: hidden; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin bleed($fraction: -1/2, $persistent: false) | |
{ | |
@include column-spacing($fraction, true); | |
@if $persistent == false { | |
@if $column-breakpoint { | |
@include breakpoint( $column-breakpoint ) { | |
@include column-spacing($fraction/2, true); | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin column-spacing($fraction: 1/2, $use-margin: false, $persistent: false) | |
{ | |
@if ($use-margin) { | |
margin-left: horizontal-rhythm($fraction); | |
margin-right: horizontal-rhythm($fraction); | |
@if $persistent == false { | |
@if $column-breakpoint { | |
@include breakpoint( $column-breakpoint ) { | |
margin-left: horizontal-rhythm($fraction/2); | |
margin-right: horizontal-rhythm($fraction/2); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin column($fraction: 1/1, $persistent: false, $apply-padding: 1/2, $apply-margin: false) | |
{ | |
@include column-behavior(); | |
@include column-width($fraction, $persistent); | |
@if $apply-padding { | |
@include column-spacing($apply-padding); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin move($fraction, $persistent: false) | |
{ | |
position: relative; | |
left: fraction-to-percentage($fraction); | |
@if $persistent and $column-breakpoint { | |
@include breakpoint( $column-breakpoint ) { | |
position: static; | |
position: initial; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@function horizontal-rhythm($fraction: 1/2) | |
{ | |
$value: return-unitless( $fraction * $column-spacing ); | |
@if $column-spacing-unit == 1rem { | |
@return $value/10*1rem; | |
} | |
@if $column-spacing-unit == 1em { | |
@return $value/$base-font-size*1em; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Accepts a value and returns it without a value | |
@function return-unitless($value) | |
{ | |
@if unitless($value) { | |
@return $value; | |
} | |
$unit: unit($value); | |
@if $unit=="px" { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@function fraction-to-percentage($fraction: 1/3) { | |
@return $fraction*100%; | |
} |