This repository was archived by the owner on Dec 24, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathstyle.css
More file actions
87 lines (75 loc) · 1.37 KB
/
style.css
File metadata and controls
87 lines (75 loc) · 1.37 KB
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
/* Layout */
* {
box-sizing: border-box; /* pour maîtriser width et flex-basis */
}
html {
display: flex; flex-direction: column; /* correction bug IE de min-height non appliqué à body */
}
body {
display: flex; /* crée un contexte flex pour ses enfants */
flex-direction: column; /* affichage vertical */
min-height: 100vh; /* toute la hauteur du viewport */
padding: 1em;
}
.wrapper {
flex: 1 1 auto; /* occupe la hauteur restante */
display: flex; /* crée un contexte flex pour ses enfants */
}
nav,
aside {
width: 10em;
}
article {
flex: 1; /* occupe la largeur restante */
}
nav {
order: -1; /* nav s'affiche en premier */
}
/* Responsive (fenêtres de moins de 640px) */
@media (max-width: 640px) {
.wrapper {
flex-direction: column; /* affichage vertical */
}
nav,
aside {
width: auto; /* pour écraser la valeur 10em */
}
nav,
aside,
article {
flex-basis: auto; /* pour écraser la valeur 0, due au flex: 1 */
}
nav {
order: 0; /* nav reprend sa place */
}
}
/* Decoration */
body {
margin: 0;
background: #999;
font-family: arial, sans-serif;
}
header,
nav,
aside,
article,
footer {
margin: .4em;
padding: 1em;
border-radius: 6px;
}
header {
background: #ffeebb;
}
nav {
background: #ccccff;
}
aside {
background: #ccccff;
}
article {
background: #dddd88;
}
footer {
background: #ffeebb;
}