wikimedia/eventmetrics

View on GitHub
app/Resources/assets/css/_mixins.scss

Summary

Maintainability
Test Coverage
$bootstrap-darker-gray: #888;
$bootstrap-dark-gray: #ddd;
$bootstrap-gray: #777;
$bootstrap-link-gray: #555;
$bootstrap-text: #333;
$bootstrap-primary: #337ab7;
$bootstrap-success: #dff0d8;
$bootstrap-success-text: #3c763d;
$bootstrap-info-bg: #d9edf7;
$bootstrap-info-border: #bce8f1;
$bootstrap-info-text: #31708f;
$bootstrap-warning-bg: #fcf8e3;
$bootstrap-warning-text: #8a6d3b;
$bootstrap-danger-bg: #f2dede;
$bootstrap-danger-text: #a94442;

$bootstrap-sm: 767px;
$bootstrap-md: 992px;
$bootstrap-lg: 1200px;

$diff-pos: #006400;
$diff-neg: #8B0000;
$diff-zero: #A2A9B1;

@mixin prefix($prop, $val) {
    @each $pre in -webkit-, -moz-, -ms-, -o- {
        #{$pre}#{$prop}: #{$val};
    }
    #{$prop}: #{$val};
}

@mixin center($direction: '', $position: 'absolute') {
    position: unquote($position);

    @if($direction == 'vertical') {
        top: 50%;
        @include prefix(transform, translateY(-50%));
    } @else if($direction == 'horizontal') {
        left: 50%;
        @include prefix(transform, translateX(-50%));
    } @else {
        left: 50%;
        top: 50%;
        @include prefix(transform, translate(-50%, -50%));
    }
}