Sha256: a9fe994e69a644580f2555d433792506aa9abe5c690982a838bdc813e3dccfbe

Contents?: true

Size: 1.55 KB

Versions: 9

Compression:

Stored size: 1.55 KB

Contents

// 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%;
    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;
    }
}

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
titon-toolkit-1.5.3 scss/toolkit/mixins/_layout.scss
titon-toolkit-1.5.2 scss/toolkit/mixins/_layout.scss
titon-toolkit-1.5.1 scss/toolkit/mixins/_layout.scss
titon-toolkit-1.5.0 scss/toolkit/mixins/_layout.scss
titon-toolkit-1.4.1 scss/toolkit/mixins/_layout.scss
titon-toolkit-1.4.0 scss/toolkit/mixins/_layout.scss
titon-toolkit-1.3.2 scss/toolkit/mixins/_layout.scss
titon-toolkit-1.3.1 scss/toolkit/mixins/_layout.scss
titon-toolkit-1.3.0 scss/toolkit/mixins/_layout.scss