aboutsummaryrefslogtreecommitdiff
path: root/themes/docsy/assets/scss/support/_mixins.scss
blob: 24e2cd1ab08e1ff2b11078b8e770ca96f22037b1 (plain)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
// Some simple mixins.

@mixin bg-gradient-variant($parent, $color) {
    #{$parent} {
        background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x !important;
    }
}

@mixin link-variant($parent, $color, $hover-color, $underline: false) {
    #{$parent} {
        color: $color;

        @if $underline {
            text-decoration: underline;
        }
    }
}

@mixin optional-at-root($sel) {
    @at-root #{if(not &, $sel, selector-append(&, $sel))} {
        @content;
    }
}

// placeholder allows styling of the placeholder used in search input etc.
@mixin placeholder {
    @include optional-at-root("::-webkit-input-placeholder") {
        @content;
    }


    @include optional-at-root(":-moz-placeholder") {
        @content;
    }


    @include optional-at-root("::-moz-placeholder") {
        @content;
    }


    @include optional-at-root(":-ms-input-placeholder") {
        @content;
    }
}