summaryrefslogtreecommitdiffstats
path: root/webapp/sass/utils/_mixins.scss
blob: e252086aec51c0cd34773cbc72f2b867934299b5 (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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@charset 'UTF-8';

@mixin file-icon($path) {
    @include background-size(60px auto);
    background-color: $white;
    background-image: url($path);
    background-position: center;
    background-repeat: no-repeat;
}

@mixin alpha-property($property, $color, $opacity) {
    #{$property}: rgba($color, $opacity);
}

@mixin font-smoothing($value: antialiased) {
    @if $value == antialiased {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    @else {
        -webkit-font-smoothing: subpixel-antialiased;
        -moz-osx-font-smoothing: auto;
    }
}

@mixin cursor($value) {
    cursor: -webkit-$value;
    cursor: zoom-$value;
}

// Webrtc button
@mixin webrtc-button {
    .webrtc__button {
        @include border-radius(50px);
        display: block;
        height: 32px;
        width: 32px;

        &.on,
        &:hover {
            background: darken($button--ready, 5%);
        }

        &:hover circle {
            fill: darken($button--ready, 5%);
        }

        circle {
            fill: $button--ready;

            &.offline {
                fill: $video-circle-offline;
            }
        }

        path {
            .on {
                display: none;
            }

            .off {
                display: block;
            }
        }

        &.on {
            path {
                .on {
                    display: block;
                }

                .off {
                    display: none;
                }
            }

            circle {
                fill-opacity: 0;
            }
        }
    }

    a {
        &[disabled] {
            .webrtc__button {
                &:hover {
                    background: none;
                    box-shadow: none;
                }

                &:hover {
                    circle {
                        fill: $video-circle-offline;
                    }
                }
            }
        }
    }
}