// Container clear fix for floats @mixin clear-fix { &::after { content: ""; display: table; clear: both; } } // Reset an inline-block element to defaults @mixin reset-inline-block { display: inline-block; position: relative; vertical-align: middle; } // Reset a list and remove default styles @mixin reset-list { list-style: none; margin: 0; padding: 0; } // Position an element to take up the whole screen @mixin full-screen($position: fixed) { @if ($position != "") { position: $position; } top: 0; left: 0; height: 100%; width: 100%; } // Align an element in the center of another element @mixin position-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); } @mixin size-small { font-size: $small-size; padding: $small-padding; } @mixin size-medium { font-size: $medium-size; padding: $medium-padding; } @mixin size-large { font-size: $large-size; padding: $large-padding; } // Generate a self selector or parent selector for assigning size classes @mixin is-size($size, $self: true, $parent: false) { $selectors: (); @if $self { $selectors: $selectors, unquote("&" + $size); } @if $parent { $selectors: $selectors, unquote($size + " &"); } #{$selectors} { @content; } } @mixin is-small($self: true, $parent: false) { @if $enable-small-size { @include is-size($size-small-class, $self, $parent) { @content; } } } @mixin is-large($self: true, $parent: false) { @if $enable-large-size { @include is-size($size-large-class, $self, $parent) { @content; } } }