joeni

Move nav more to the left

Author
Maarten Vangeneugden
Date
July 26, 2018, 7:03 p.m.
Hash
310cf863aa2f3f72ba889f7d649c2618c5ff14b2
Parent
8c5913dc86daa60acef075b2b04036bd6ad46a5e
Modified file
static/css/header.scss

static/css/header.scss

1 addition and 0 deletions.

View changes Hide changes
1
1
    float: left;
2
2
    margin-right: 50px;
3
3
    position: fixed;
4
4
    //display: flow;
5
5
    //height: 100%;
6
6
    z-index: 3;
7
7
    padding: $header-padding;
8
8
    top: 0;
9
9
    width: $header-width;
10
10
    height: 100%;
11
11
    //background-color: $uhasselt-color;
12
12
    color: white;
13
13
    img {
14
14
        //margin-left: -8px; // idem
15
15
        //margin-bottom: -10px;  // When you want to attach logo to menu
16
16
        width: 80%;
17
17
    }
18
18
    nav {
19
19
        //margin-top: -10px; // idem
20
20
        // border: white solid 0.4em; // idem
21
21
    }
22
22
    nav ul {
23
23
        overflow-wrap: break-word;  // Breaks the word if it overlaps with the right border
24
24
        //list-style: none;
25
25
        list-style: none;
26
26
        }
+
27
        }
27
28
    a {
28
29
        text-decoration: none;
29
30
        color: white;
30
31
        &:hover {
31
32
            text-decoration: underline solid white;
32
33
            text-transform: uppercase;
33
34
            font-weight: bold;
34
35
        }
35
36
    }
36
37
37
38
    div.menu-background {
38
39
        display: none;
39
40
        z-index: 1;
40
41
    }
41
42
42
43
    @media print {
43
44
        display: none; // Header is pretty useless on printed sheets
44
45
    }
45
46
}
46
47
47
48
@media print {
48
49
    footer, header, input#header-mobile, label[for="header-mobile"] {
49
50
        visibility: collapse;
50
51
        display: none;
51
52
    }
52
53
    main {
53
54
        margin-left: 0;
54
55
    }
55
56
}
56
57
57
58
@media screen
58
59
and (max-device-width: 440px)
59
60
and (max-device-height: 800px) {
60
61
61
62
//and (-webkit-min-device-pixel-ratio: 2) {
62
63
    main {
63
64
        margin-left: 2%;
64
65
        margin-right: 2%;
65
66
    }
66
67
    label[for="header-mobile"] {
67
68
        z-index: 4;
68
69
        color: white;
69
70
        position: absolute;
70
71
        top: 1.5em;
71
72
        left: 1em;
72
73
    }
73
74
74
75
    input#header-mobile {
75
76
        z-index: 4;
76
77
        position: absolute;
77
78
        top: 2em;
78
79
        left: 1em;
79
80
        opacity: 0;
80
81
        /* XXX: Why not send the checkbox to -9999 top? Because some dumb mobile
81
82
        phones don't allow clicking the label to check the box. */
82
83
83
84
        &:checked ~ header {
84
85
            display: block;
85
86
            position: relative;
86
87
            /* FIXME: Currently I set the height of the header to a ridiculous
87
88
            300%, but it should be made that it overlaps the other elements. */
88
89
            height: 300%;
89
90
            top: 0;
90
91
            width: 100%;
91
92
            nav {
92
93
                display: block;
93
94
                position: relative;
94
95
            }
95
96
        }
96
97
97
98
    }
98
99
99
100
    header {
100
101
        position: relative;
101
102
        z-index: 3;
102
103
        margin-top: 0;
103
104
        margin-right: 0;
104
105
        width: 100%;
105
106
        height: 2em;
106
107
        img {
107
108
            height: 2em;
108
109
        }
109
110
110
111
        nav {
111
112
            display: none;
112
113
        }
113
114
    }
114
115
}
115
116