/
page.css
184 lines (157 loc) · 2.54 KB
/
page.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
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
* {
box-sizing: border-box;
font-family: 'Helvetica Neue', Arial, sans-serif;
}
aside {
border-top: 1px solid gray;
padding-top: 20px;
}
dl {
display: grid;
grid-gap: 2px 15px;
grid-template-columns: 2fr 1fr;
max-width: 300px;
}
dt {
text-align: right;
}
dd {
margin: 0;
}
#app {
display: grid;
grid-gap: 10px 20px;
margin: 20px auto;
min-width: 500px;
}
@media only screen and (max-width: 999px) {
#app {
grid-template-areas:
'store basket'
'image name'
'image options'
'image buy'
'reco reco';
grid-template-columns: 4fr 3fr;
}
}
@media only screen and (min-width: 1000px) {
#app {
grid-template-areas:
'store basket reco'
'image name reco'
'image options reco'
'image buy reco';
grid-template-columns: 4fr 3fr 200px;
width: 1000px;
}
}
#store {
font-weight: 400;
grid-area: store;
}
#basket {
align-self: baseline;
background-color: seagreen;
border-radius: 5px;
color: white;
grid-area: basket;
justify-self: end;
margin-top: 31px;
padding: 5px 10px;
}
#basket.empty {
background-color: gray;
}
#image {
grid-area: image;
width: 100%;
}
#image > div {
padding-top: 100%;
position: relative;
}
#image img {
bottom: 0;
left: 0;
max-width: 100%;
position: absolute;
right: 0;
top: 0;
}
#name {
font-weight: 400;
grid-area: name;
height: 3em;
}
#name small {
font-size: 1em;
font-weight: 200;
}
#options {
align-self: center;
display: flex;
grid-area: options;
}
#options button {
border: none;
border-bottom: 2px solid white;
cursor: pointer;
display: block;
margin: 2px;
outline: none;
padding: 0;
}
#options button.active,
#options button:hover {
border-bottom-color: seagreen;
}
#options img {
display: block;
max-width: 100%;
}
#buy {
align-self: center;
background: none;
border: 1px solid gray;
border-radius: 20px;
cursor: pointer;
font-size: 20px;
grid-area: buy;
outline: none;
padding: 20px;
}
#buy:hover {
border-color: black;
}
#buy:active {
border-color: seagreen;
}
#reco {
align-items: center;
display: flex;
flex-wrap: wrap;
grid-area: reco;
justify-content: space-around;
}
@media only screen and (max-width: 999px) {
#reco {
border-top: 1px dashed gray;
margin-top: 20px;
padding-top: 20px;
}
}
@media only screen and (min-width: 1000px) {
#reco {
border-left: 1px dashed gray;
padding-top: 14px;
}
}
#reco h3 {
font-weight: 400;
}
#reco img {
display: block;
height: 180px;
width: 180px;
}