// 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; } // Align an element in the center of another element @mixin position-center { position: absolute; left: 50%; top: 50%; @include 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) { @include is-size($size-small-class, $self, $parent) { @content; } } @mixin is-medium($self: true, $parent: false) { @include is-size($size-medium-class, $self, $parent) { @content; } } @mixin is-large($self: true, $parent: false) { @include is-size($size-large-class, $self, $parent) { @content; } }