-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
129 lines (113 loc) · 2.18 KB
/
style.css
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
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
/* Set the background color of the
* body to blue and text color to
* white
*/
body {
background: blue;
color: white;
font-family: sans-serif;
max-width: 40em;
margin: 1em;
}
/* Style all articles */
article {
background: lightgrey;
color: black;
padding: 1em;
border-radius: 1em;
}
/* Add padding of 1em to all direct
* children of article elements
*/
article>* {
padding: 1em;
}
/* Style all sections */
section {
background: white;
color: black;
border-radius: 0.5em;
margin-top: 0.5em;
padding: 1em;
}
article>h1 {
margin: 0;
padding: 0 0 0 1rem;
}
/* Style all h1 elements that are
* children of section elements
*/
section>h2,
section>h3 {
margin: 0;
}
/* All elements that we deem important
* can be rendered differently using this
* rule - just add...
* class="important"
* ...to the element.
*/
.important {
background: #CCFF00;
}
/* The first section should have a black border, for no reason
* other than "because we can"
*/
#rich1 {
border: 0.25em solid black;
}
/* make navigation links look like the typical blue
* buttons seen all over the web these days.
*/
nav a {
background: #2196F3;
color: white;
padding: 0.5em;
margin: 0.25em;
border-radius: 0.25em;
border: white solid 0.1em;
text-decoration: none;
}
/* This is a pseudo selector. The element
* it selects is different based on the
* contents of the URL fragment after
* the (#) hash - so when a user clicks
* on a nav link the target will change.
*/
:target {
background: #FFCC00;
}
/* The default layout is for mobile phones
* with a nav menu appearing as a column
* of text.
*/
nav {
display: flex;
flex-direction: column;
}
/* Remove the margin from below paragraphs so we
* don't have extra white space in the boxes.
*/
p {
margin-bottom: 0;
}
footer {
text-align: center;
}
/* Media query for screens wider than 30em */
@media (width>42em) {
/* We change the background - this isn't
* really necessary but it helps us know
* when we are changing between styles
*/
body {
background: black;
margin: 1em auto;
}
/* On wider screens we make the nav menu
* a horizontal row
*/
nav {
flex-direction: row;
}
}