aboutsummaryrefslogtreecommitdiff
path: root/themes/docsy/assets/scss/support/_utilities.scss
blob: ce9bc2e267844e318f372122e044bed5f8363964 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// Mixins

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

@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;
    }
}

// Common util classes.

.td-border-top {
    border: none;
    border-top: 1px solid #eee;
}

.td-border-none {
    border: none;
}

.td-block-padding {
    padding-top: $td-block-space-top-base ;
    padding-bottom: $td-block-space-bottom-base;

    @include media-breakpoint-up(md) {
        padding-top: $td-block-space-top-base * 1.25;
        padding-bottom: $td-block-space-bottom-base * 1.25;
    }
}

.td-overlay {
    position: relative;

    &::after {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
    }

    &--dark::after {
        background-color: rgba($dark, 0.3);
    }

    &--light::after {
        background-color: rgba($light, 0.3);
    }

    &__inner {
        position: relative;
        z-index: 1;
    }
}

.td-max-width-on-larger-screens {
    @include media-breakpoint-up(lg) {
        max-width: 80%;
    }

}