-
Notifications
You must be signed in to change notification settings - Fork 19
/
demo.scss
143 lines (114 loc) · 2.55 KB
/
demo.scss
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
html {
font-size: 20px;}
body {
display: grid;
grid-template-rows: 180px 3fr 1fr;
min-height: 90vh;
box-sizing: border-box;
>header, >footer {
background-color: rgba(60,110,60,0.5);
display:flex;
flex-direction: column;
align-items: stretch;
padding: 1rem;
#layoutinfo {
color: rgb(160,50,160);
border: 2px rgb(160,50,160) solid;
max-width: 80vw;
margin: auto;
}
}
}
main {
border: 2px solid red;
min-height: 80vh;
background-color: rgba(180,20,20,0.05);
transition: all 5s ease;
>*, article>* {
border: 2px solid blue;
margin: 5px;
padding: 5px;
background-color: rgba(30, 30,200,0.1);
transition: all 5s ease;
}
h1 > span {
background-color: yellow;
border: 2px solid magenta;
}
>nav {
background-color: rgba(40,40,100,0.3)
}
>aside {
background-color: rgba(100,70,120,0.3)
}
>article {
}
>footer {
background-color: rgba(40,40,100,0.3)
}
}
main.make_flex_column{
display: flex;
flex-direction: column;
align-items: stretch;
}
main.make_flex_reverse{
display: flex;
flex-direction: row-reverse;
}
main.make_flex {
display: flex;
>* {
}
}
main.make_grid {
display: grid;
grid-template-areas: "nav nav nav"
"aside article article"
"footer footer footer";
>nav {
grid-area: nav;
}
>aside {
grid-area: aside;
}
>article {
grid-area: article;
display: grid;
grid-template-columns: 1fr 3fr;
grid-template-rows: 1fr 3fr;
>header {
grid-column: 1/3;
}
}
>footer {
grid-area: footer;
}
> {
}
}
/* Not really relevant for today but I want you to see how I modified content with pure CSS */
/* p.normal:nth-of-type(2)::after { */
/* content: ' - Mwahahahahhaha'; */
/* background-color: purple; */
/* } */
/* put our media queries here */
@media screen and (max-width: 800px) {
html {
font-size: 18px;
}
main.make_grid {
grid-template-areas: "nav" "aside" "article" "footer";
}
}
@media screen and (max-width: 500px) {
html {
font-size: 16px;
}
body {
grid-template-rows: 140px 3fr 1fr;
}
main.make_grid {
grid-template-areas: "nav" "article" "aside" "footer";
}
}