Skip to content

Commit a7a294d

Browse files
committed
Added CSS
1 parent 1ccaf13 commit a7a294d

1 file changed

Lines changed: 77 additions & 53 deletions

File tree

Wireframe/style.css

Lines changed: 77 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,69 @@
11
/* Here are some starter styles
2-
You can edit these or replace them entirely
3-
It's showing you a common way to organise CSS
4-
And includes solutions to common problems
2+
You can edit these or replace them entirely
3+
It's showing you a common way to organise CSS
4+
And includes solutions to common problems
55
As well as useful links to learn more */
66

7+
78
/* ====== Design Palette ======
8-
This is our "design palette".
9-
It sets out the colours, fonts, styles etc to be used in this design
10-
At work, a designer will give these to you based on the corporate brand, but while you are learning
11-
You can design it yourself if you like
12-
Inspect the starter design with Devtools
13-
Click on the colour swatches to see what is happening
14-
I've put some useful CSS you won't have learned yet
15-
For you to explore and play with if you are interested
16-
https://web.dev/articles/min-max-clamp
17-
https://scrimba.com/learn-css-variables-c026
9+
This is our "design palette".
10+
It sets out the colours, fonts, styles etc to be used in this design
11+
At work, a designer will give these to you based on the corporate brand, but while you are learning
12+
You can design it yourself if you like
13+
Inspect the starter design with Devtools
14+
Click on the colour swatches to see what is happening
15+
I've put some useful CSS you won't have learned yet
16+
For you to explore and play with if you are interested
17+
https://web.dev/articles/min-max-clamp
18+
https://scrimba.com/learn-css-variables-c026
1819
====== Design Palette ====== */
1920
:root {
20-
--paper: oklch(7 0 0);
21-
--ink: color-mix(in oklab, var(--color) 5%, black);
22-
--font: 100%/1.5 system-ui;
23-
--space: clamp(6px, 6px + 2vw, 15px);
24-
--line: 1px solid;
25-
--container: 1280px;
21+
--paper: oklch(7 0 0);
22+
--ink: blue;
23+
--font: 100%/1.5 system-ui;
24+
--space: clamp(6px, 6px + 2vw, 15px);
25+
--line: 1px solid;
26+
--container: 1280px;
2627
}
2728
/* ====== Base Elements ======
28-
General rules for basic HTML elements in any context */
29+
General rules for basic HTML elements in any context */
30+
header {
31+
text-align: center;
32+
}
33+
/* Futuristic font */
2934
body {
30-
background: var(--paper);
31-
color: var(--ink);
32-
font: var(--font);
35+
background: var(--paper);
36+
color: var(--ink);
37+
font: var(--font);
38+
font-family: "Orbitron", "Rajdhani", "Segoe UI", sans-serif;
3339
}
3440
a {
35-
padding: var(--space);
36-
border: var(--line);
37-
max-width: fit-content;
41+
padding: var(--space);
42+
border: var(--line);
43+
max-width: fit-content;
3844
}
3945
img,
4046
svg {
41-
width: 100%;
42-
object-fit: cover;
47+
width: 100%;
48+
height: 250px;
49+
object-fit: cover;
50+
border: 3px solid blue;
51+
border-radius: 20px;
4352
}
44-
/* ====== Site Layout ======
53+
/* ====== Site Layout ======
4554
Setting the overall rules for page regions
4655
https://www.w3.org/WAI/tutorials/page-structure/regions/
4756
*/
4857
main {
49-
max-width: var(--container);
50-
margin: 0 auto calc(var(--space) * 4) auto;
58+
max-width: var(--container);
59+
margin: 0 auto calc(var(--space) * 4) auto;
5160
}
5261
footer {
53-
position: fixed;
54-
bottom: 0;
55-
text-align: center;
62+
text-align: center;
63+
font-size: 0.8rem;
64+
color: var(--ink);
65+
margin-top: 40px;
66+
padding: 20px;
5667
}
5768
/* ====== Articles Grid Layout ====
5869
Setting the rules for how articles are placed in the main element.
@@ -62,28 +73,41 @@ https://developer.chrome.com/docs/devtools/css/grid
6273
https://gridbyexample.com/learn/
6374
*/
6475
main {
65-
display: grid;
66-
grid-template-columns: 1fr 1fr;
67-
gap: var(--space);
68-
> *:first-child {
69-
grid-column: span 2;
70-
}
76+
display: grid;
77+
grid-template-columns: 1fr 1fr;
78+
gap: var(--space);
79+
> *:first-child {
80+
grid-column: span 2;
81+
}
7182
}
72-
/* ====== Article Layout ======
73-
Setting the rules for how elements are placed in the article.
83+
/* ====== Article Layout ======
84+
Setting the rules for how elements are placed in the article.
7485
Now laying out just the INSIDE of the repeated card/article design.
7586
Keeping things orderly and separate is the key to good, simple CSS.
7687
*/
7788
article {
78-
border: var(--line);
79-
padding-bottom: var(--space);
80-
text-align: left;
81-
display: grid;
82-
grid-template-columns: var(--space) 1fr var(--space);
83-
> * {
84-
grid-column: 2/3;
85-
}
86-
> img {
87-
grid-column: span 3;
88-
}
89+
border: var(--line);
90+
border-radius: 20px;
91+
box-shadow: 0 0 15px blue;
92+
padding-bottom: var(--space);
93+
text-align: left;
94+
display: grid;
95+
grid-template-columns: var(--space) 1fr var(--space);
96+
}
97+
article > * {
98+
grid-column: 2 / 3;
99+
}
100+
article > img {
101+
grid-column: 2 / 3;
102+
margin-top: var(--space);
103+
}
104+
> img {
105+
grid-column: 2 / 3;
106+
margin-top: var(--space);
107+
}
108+
h1,
109+
h2,
110+
a {
111+
text-transform: uppercase;
112+
letter-spacing: 1px;
89113
}

0 commit comments

Comments
 (0)