Skip to content

Commit 3242072

Browse files
edit css
1 parent cbd2e26 commit 3242072

1 file changed

Lines changed: 122 additions & 80 deletions

File tree

Wireframe/style.css

Lines changed: 122 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -16,154 +16,196 @@ As well as useful links to learn more */
1616
https://web.dev/articles/min-max-clamp
1717
https://scrimba.com/learn-css-variables-c026
1818
====== Design Palette ====== */
19-
:root{
20-
--ink:#111;
21-
--line:#222;
22-
--muted:#6a6a6a;
23-
--bg:#fafafa;
24-
--card:#ffffff;
25-
--accent:#111;
19+
:root {
20+
--ink: #111;
21+
--line: #222;
22+
--muted: #6a6a6a;
23+
--bg: #fafafa;
24+
--card: #ffffff;
25+
--accent: #111;
2626
}
2727

28-
*{box-sizing:border-box}
29-
html,body{margin:0;padding:0}
30-
body{
31-
font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
32-
color:var(--ink);
33-
background:var(--bg);
34-
line-height:1.55;
28+
* {
29+
box-sizing: border-box;
30+
}
31+
html,
32+
body {
33+
margin: 0;
34+
padding: 0;
35+
}
36+
body {
37+
font-family:
38+
"Inter",
39+
system-ui,
40+
-apple-system,
41+
Segoe UI,
42+
Roboto,
43+
Arial,
44+
sans-serif;
45+
color: var(--ink);
46+
background: var(--bg);
47+
line-height: 1.55;
48+
padding-bottom: 70px;
3549
}
3650

37-
.container{
51+
.container {
3852
max-width: 920px;
3953
margin: 0 auto;
4054
padding: 0 16px 48px;
4155
}
4256

4357
/* Header matches the sketchy title style */
44-
.page-hero{
45-
text-align:center;
58+
.page-hero {
59+
text-align: center;
4660
padding: 28px 16px 8px;
4761
}
48-
.page-title{
62+
.page-title {
4963
font-family: "Kalam", cursive;
5064
font-size: 42px;
5165
margin: 12px 0 4px;
5266
letter-spacing: 1px;
5367
text-transform: uppercase;
5468
}
55-
.page-subtitle{
69+
.page-subtitle {
5670
font-family: "Kalam", cursive;
57-
color:var(--muted);
71+
color: var(--muted);
5872
font-size: 14px;
59-
margin:0;
60-
letter-spacing: .5px;
73+
margin: 0;
74+
letter-spacing: 0.5px;
6175
}
6276

6377
/* Cards */
64-
.card{
65-
background:var(--card);
66-
border:2px solid var(--line);
67-
border-radius:2px;
78+
.card {
79+
background: var(--card);
80+
border: 2px solid var(--line);
81+
border-radius: 2px;
6882
margin: 18px 0;
69-
overflow:hidden;
83+
overflow: hidden;
7084
}
71-
.card--featured{
85+
.card--featured {
7286
/* visually wider like the top box in the wireframe */
7387
}
74-
.card__media{
75-
position:relative;
88+
.card__media {
89+
position: relative;
7690
height: 240px;
77-
border-bottom:2px solid var(--line);
91+
border-bottom: 2px solid var(--line);
7892
}
79-
.card--featured .card__media{ height: 280px; }
80-
81-
.fake-img{
82-
background:#fff;
83-
}
84-
.fake-img .diag{
85-
position:absolute;
86-
top:0;left:0;right:0;bottom:0;
87-
pointer-events:none;
88-
}
89-
.fake-img .diag.left{
90-
background: linear-gradient( to bottom right, transparent 49%, var(--line) 50%, transparent 51% );
91-
opacity:.7;
93+
.card--featured .card__media {
94+
height: 280px;
9295
}
93-
.fake-img .diag.right{
94-
background: linear-gradient( to top right, transparent 49%, var(--line) 50%, transparent 51% );
95-
opacity:.7;
96+
97+
.fake-img {
98+
background: #fff;
99+
}
100+
.fake-img .diag {
101+
position: absolute;
102+
top: 0;
103+
left: 0;
104+
right: 0;
105+
bottom: 0;
106+
pointer-events: none;
107+
}
108+
.fake-img .diag.left {
109+
background: linear-gradient(
110+
to bottom right,
111+
transparent 49%,
112+
var(--line) 50%,
113+
transparent 51%
114+
);
115+
opacity: 0.7;
116+
}
117+
.fake-img .diag.right {
118+
background: linear-gradient(
119+
to top right,
120+
transparent 49%,
121+
var(--line) 50%,
122+
transparent 51%
123+
);
124+
opacity: 0.7;
96125
}
97126

98-
.card__body{
127+
.card__body {
99128
padding: 16px 20px 20px;
129+
display: flex;
130+
flex-direction: column;
131+
height: 100%;
100132
}
101-
.card__title{
102-
font-family:"Kalam", cursive;
133+
.card__title {
134+
font-family: "Kalam", cursive;
103135
font-size: 20px;
104136
margin: 0 0 6px;
105137
}
106-
.card__summary{
138+
.card__summary {
107139
margin: 0 0 12px;
108-
color:#333;
140+
color: #333;
109141
font-size: 14px;
110142
}
111143

112-
.btn{
113-
display:inline-block;
114-
border:2px solid var(--line);
115-
padding:6px 12px;
116-
font-size:13px;
117-
color:var(--accent);
118-
text-decoration:none;
119-
border-radius:3px;
120-
background:#f7f7f7;
144+
.btn {
145+
display: block;
146+
border: 2px solid var(--line);
147+
padding: 6px 12px;
148+
font-size: 13px;
149+
color: var(--accent);
150+
text-decoration: none;
151+
border-radius: 3px;
152+
background: #f7f7f7;
153+
text-align: center;
121154
}
122155

123156
/* Two-column grid for the lower row */
124-
.grid{
125-
display:grid;
157+
.grid {
158+
display: grid;
126159
grid-template-columns: 1fr 1fr;
127160
gap: 22px;
128161
margin-top: 22px;
129162
}
130163

131-
.details{
164+
.details {
132165
max-width: 920px;
133166
margin: 10px auto 0;
134167
padding: 0 2px;
135168
}
136-
.details h3{
169+
.details h3 {
137170
font-size: 16px;
138171
margin: 22px 0 8px;
139-
font-weight:600;
172+
font-weight: 600;
140173
}
141-
.details ul{
174+
.details ul {
142175
margin: 0 0 8px 18px;
143176
}
144177

145178
/* Footer */
146-
.site-footer{
147-
border-top:2px solid var(--line);
148-
margin-top: 36px;
179+
.site-footer {
180+
position: fixed;
181+
bottom: 0;
182+
left: 0;
183+
width: 100%;
184+
border-top: 2px solid var(--line);
149185
padding: 18px 12px;
150-
text-align:center;
151-
font-family:"Kalam", cursive;
152-
font-size:12px;
153-
color:#222;
186+
text-align: center;
187+
font-family: "Kalam", cursive;
188+
font-size: 12px;
189+
color: #222;
190+
background: var(--bg);
154191
}
155192

156193
/* Responsiveness */
157-
@media (max-width: 780px){
158-
.grid{ grid-template-columns: 1fr; }
159-
.card__media{ height: 200px; }
160-
.card--featured .card__media{ height: 220px; }
194+
@media (max-width: 780px) {
195+
.grid {
196+
grid-template-columns: 1fr;
197+
}
198+
.card__media {
199+
height: 200px;
200+
}
201+
.card--featured .card__media {
202+
height: 220px;
203+
}
161204
}
162205

163-
164206
.card__media img {
165207
width: 100%;
166208
height: 220px;
167209
object-fit: cover;
168210
display: block;
169-
}
211+
}

0 commit comments

Comments
 (0)