-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle-grid.css
More file actions
191 lines (147 loc) · 3.37 KB
/
Copy pathstyle-grid.css
File metadata and controls
191 lines (147 loc) · 3.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
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
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
177
178
179
180
181
182
183
184
185
186
187
body {
margin: 4em;
#background-color: yellow;
background-color: #333;
font-family: "Abel";
color: #fff;
}
@media (min-width: 600px) {
.grid-container { display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
gap: 2em;
grid-auto-flow: column;
grid-template-areas:
"Box1 Box2"
"Box1 Box2"
"Box3 Box4"
"Box3 Box4"
"Box5 Box6"
"Box5 Box6"
"Box7 Box8"
"Box7 Box8"
"Box9 Box10"
"Box9 Box10"
"Box11 Box12"
"Box11 Box12"
"Box13 Box14"
"Box13 Box14"
"Box15 Box16"
"Box15 Box16";
margin:3em;
opacity: 0.8;"
}
}
@media (min-width: 1200px) {
.grid-container { display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
grid-template-rows: 1fr 1fr 1fr 1fr;
gap: 2em;
grid-auto-flow: row;
grid-template-areas:
"Box1 Box1 Box2 Box3 Box3 Box4 Box4 Box5"
"Box6 Box6 Box7 Box8 Box9 Box10 Box10 Box11"
"Box6 Box6 Box7 Box12 Box13 Box10 Box10 Box11"
"Box14 Box14 Box14 Box15 Box15 Box16 Box16 Box16";
margin:3em;
opacity: 0.8;"
}
}
.Box1 {
grid-area: Box1;
}
.Box2 {
grid-area: Box2;
font-size: 1.5em;
text-align: center;
border: 0.1em solid white;
}
.Box5 {
grid-area: Box5;
font-size: 1.5em;
text-align: center;
border: 0.1em solid white;
}
.Box3 { grid-area: Box3; }
.Box4 {
grid-area: Box4;
display: inline-block;
}
.Box5 { grid-area: Box5; }
.Box6 {
grid-area: Box6;
}
.Box7 { grid-area: Box7; }
.Box8 { grid-area: Box8; }
.Box9 { grid-area: Box9; }
.Box10 { grid-area: Box10; }
.Box11 { grid-area: Box11; }
.Box12 { grid-area: Box12; }
.Box13 { grid-area: Box13; }
.Box14 { grid-area: Box14; }
.Box15 { grid-area: Box15; }
.Box16 { grid-area: Box16; }
#text {
padding: 2em;
}
/*
In grid-template-areas You can’t create a non-rectangular area,
so the property can’t be used to create an ‘L’ or ‘T’ shaped area
*/
/*
The media query order is important:
That's by design of CSS — Cascading Style Sheet.
It means that, if you apply two rules that collide to the same elements,
it will choose the last one that was declared, unless the first one has the !important marker or is more specific
*/
.bg1 {
background-image: url('./images/bg1.jpg');
}
.bg2 {
background-image: url('./images/bg2.jpg');
}
.patt1 {
background-image: url('./images/pattern2.jpg');
}
.grid-container > div {
/*background-color: rgba(255, 255, 255, 0.8);*/
background-size: cover;
background-attachment: fixed;
padding: 1em 0;
}
.flex-container {
/*display: flex;*/
display: inline-block;
flex-direction: column;
/*gap: 1em;*/
/*this centers the text horizontally*/
/*justify-content: center;*/
/*this centers the text vertically*/
align-items: center;
text-align: center;
}
.flex-container a {
text-decoration: none;
text-align: center;
background-color: #000000AA;
color: white;
/*border: 0.1em solid white;*/
border-radius: 0.5em;
margin-bottom: 0.5em;
/*margin-left: 1em;*/
/* required for next position absolute*/
position: relative;
/* inline-block per andare a capo*/
display: inline-block;
width: 14em;
}
.flex-container a:hover {
background-color: #777777;
}
.flex-container a i {
position: absolute;
top: 50%;
left: 0.5em;
transform: translateY(-50%);
/*font-size: 10px;*/
}