_gdpr.scss 5.23 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
#lap-cookies-banner {
    position: fixed;
    bottom: 0;
    background-color: #fff;
    padding-top: 1em;
    padding-bottom: 1em;
    z-index: 1000;
    left: 0;
    text-align: center;
    border-top: 1px solid #198cdc;
    width: 100%;
Laurent Heirendt's avatar
Laurent Heirendt committed
12 13
    display: none;
    /* hidden by default */
14
}
Laurent Heirendt's avatar
Laurent Heirendt committed
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36

#lap-cookies-banner .banner-intro {
    width: 40%;
    position: relative;
    left: 30%;
    text-align: left;
}

#lap-cookies-banner .banner-img {
    width: 50px;
    position: absolute;
    padding-top: 5px;
    height: 50px;
}

#lap-cookies-banner .banner-title {
    font-size: 120%;
    font-weight: bold;
    text-align: left;
    padding-left: 60px;
}

37
#lap-cookies-banner .banner-text {
Laurent Heirendt's avatar
Laurent Heirendt committed
38 39 40 41 42
    float: center;
    min-height: 40px;
    padding-left: 60px;
    font-size: 80%;
    text-align: left;
43
}
Laurent Heirendt's avatar
Laurent Heirendt committed
44

45 46
#lap-cookies-banner .banner-buttons {
    float: center;
47 48 49 50 51 52 53 54 55
    padding-top: 5px;
    height: 20px;
    margin-bottom: 10px;
}

#lap-cookies-banner .banner-buttons .banner-buttons-more {
    position: relative;
    left: 20%;
    top: -28px;
56
}
Laurent Heirendt's avatar
Laurent Heirendt committed
57

Laurent Heirendt's avatar
Laurent Heirendt committed
58 59
#lap-cookies-banner .banner-buttons .lap-accept,
#lap-cookies-banner .banner-buttons .lap-refuse,
60 61 62 63 64 65 66 67 68 69
#lap-cookies-banner .banner-buttons .lap-cookies-more,
#lap-cookies-banner .banner-buttons .btn.active {
    border: 1px solid #198cdc;
    font-weight: bold;
    background-color: #198cdc;
    color: #ffffff !important;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
}
Laurent Heirendt's avatar
Laurent Heirendt committed
70

Laurent Heirendt's avatar
Laurent Heirendt committed
71 72
#lap-cookies-banner .banner-buttons .lap-accept:hover,
#lap-cookies-banner .banner-buttons .lap-refuse:hover,
73
#lap-cookies-banner .banner-buttons .lap-cookies-more:hover,
Laurent Heirendt's avatar
Laurent Heirendt committed
74
#lap-cookies-banner .banner-buttons .btn.selected {
75 76 77 78 79 80 81 82
    background: white;
    color: #198cdc !important;
    border: 1px solid #198cdc;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    text-decoration: none;
}
Laurent Heirendt's avatar
Laurent Heirendt committed
83

84
#lap-cookies-banner .btn {
Laurent Heirendt's avatar
Laurent Heirendt committed
85
    text-decoration: none;
86 87 88 89 90 91 92
    display: inline-block;
    margin-bottom: 0;
    text-align: center;
    vertical-align: middle;
    touch-action: manipulation;
    background-image: none;
    white-space: nowrap;
Laurent Heirendt's avatar
Laurent Heirendt committed
93 94
    padding: 3px 10px;
    font-size: 9pt;
95
    line-height: 20px;
96 97 98 99
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
Laurent Heirendt's avatar
Laurent Heirendt committed
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176
}

// Small component to show a Material Design style input toggle
// ref: https://codepen.io/FezVrasta/pen/yNRgrB - MIT licensed
$toggle-w: 32px;
$toggle-h: 14px;
$handle-size: 18px;
$unchecked-handle-bg: #F1F1F1;
$checked-handle-bg: #198cdc;
$disabled-handle-bg: #BDBDBD;
$unchecked-toggle-bg: #848484;
$checked-toggle-bg: desaturate(lighten($checked-handle-bg, 28%), 32%); // kind of magic recipe
$disabled-toggle-bg: #D5D5D5;
label.input-toggle {
    line-height: 0;
    font-size: 0;
    display: inline-block;
    margin: 0;
    >span {
        display: inline-block;
        position: relative;
        background-image: linear-gradient( to right, $unchecked-toggle-bg 0%, $unchecked-toggle-bg 50%, $checked-toggle-bg 50%, $checked-toggle-bg 100%);
        background-size: $toggle-w*2 $toggle-h;
        background-position: 0%;
        border-radius: $toggle-w;
        width: $toggle-w;
        height: $toggle-h;
        cursor: pointer;
        transition: background-position 0.2s ease-in;
    }
    >input:checked+span {
        background-position: -100%;
    }
    >span:after {
        content: "";
        display: block;
        position: absolute;
        width: $handle-size;
        height: $handle-size;
        background: $unchecked-handle-bg;
        align-self: center;
        top: 50%;
        left: 0;
        transform: translateY(-50%);
        border-radius: 100%;
        //box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
        transition: left 0.2s ease-in, background-color 0.2s ease-in, transform 0.3s ease;
    }
    >input:checked+span:after {
        left: $handle-size;
        background-color: $checked-handle-bg;
    }
    // Jelly effect on click
    >span:active:after {
        //transform: translateY(-50%) scale3d(1.15, 0.85, 1);
    }
    // No jelly effect on disabled toggles
    >input:disabled+span:active:after {
        transform: translateY(-50%);
    }
    >input:disabled+span {
        cursor: default;
    }
    >input:disabled+span {
        background: $disabled-toggle-bg;
    }
    >input:disabled+span:after {
        background: $disabled-handle-bg;
    }
    // Hide original checkbox, but don't use `display: none` to allow focus on it using keyboard
    >input {
        display: block;
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
    }
Laurent Heirendt's avatar
Laurent Heirendt committed
177 178 179 180
}

#lap-cookies-banner .banner-checkboxes {
    font-size: 80%;
181
    margin-top: 1em;
Laurent Heirendt's avatar
Laurent Heirendt committed
182 183 184 185 186 187 188 189 190
}

#lap-cookies-banner .checkbox-label {
    margin-left: 0.3em;
    margin-right: 1.5em;
    top: -0.2em;
    position: relative;
}

191 192 193 194 195 196
@media(max-width: 1100px) {
    #lap-cookies-banner .banner-intro {
        width: 90%;
        position: relative;
        left: 5%;
        text-align: left;
Laurent Heirendt's avatar
Laurent Heirendt committed
197
    }
198 199 200 201 202 203 204 205 206 207 208 209 210 211
}

@media(max-width: 850px) {
    #lap-cookies-banner .banner-buttons {
        float: center;
        padding-top: 5px;
        height: 60px;
        margin-bottom: 10px;
    }
    #lap-cookies-banner .banner-buttons .banner-buttons-more {
        position: relative;
        left: unset;
        top: 10px;
    }
212
}