~sirn/fanboi2

ref: a68873a108d20a6a49a1b6caf374bfb2cf6a94fe fanboi2/assets/app/stylesheets/_mixins.scss -rw-r--r-- 808 bytes
a68873a1Kridsada Thanabulpong Coding style cleanups and setup pre-commit hooks (#42) 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* Retina
 * ------------------------------------------------------------------------ */

@mixin retina-background($image, $extension, $width, $height) {
    background-image: url($image+"."+$extension);
    background-position: 0 50%;
    background-repeat: no-repeat;
    background-size: $width $height;

    @media (min-device-pixel-ratio: 1.3), (min-resolution: 1.3dppx) {
        background-image: url($image+"@2x."+$extension);
    }

    @media (min-device-pixel-ratio: 2.3), (min-resolution: 2.3dppx) {
        background-image: url($image+"@3x."+$extension);
    }
}

/* Hacks
 * ------------------------------------------------------------------------ */

@mixin clearfix {
    &:before,
    &:after {
        content: "";
        display: table;
    }

    &:after {
        clear: both;
    }
}