Skip to content

Commit 8edb614

Browse files
committed
Feat: added the styling
1 parent 6c6749d commit 8edb614

4 files changed

Lines changed: 68 additions & 79 deletions

File tree

Wireframe/images/branch.webp

28.3 KB
Loading

Wireframe/images/md.png

34 KB
Loading
38.9 KB
Loading

Wireframe/style.css

Lines changed: 68 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,78 @@
1-
/* 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
5-
As well as useful links to learn more */
1+
body {
2+
margin: 0;
3+
box-sizing: border-box;
4+
line-height: 1.5;
5+
font-family: "Cantarell", sans-serif;
6+
font-weight: 400;
7+
}
68

7-
/* ====== 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
18-
====== Design Palette ====== */
19-
: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;
9+
.container {
10+
width: 80%;
11+
max-width: 1200px;
12+
margin: 0 auto;
2613
}
27-
/* ====== Base Elements ======
28-
General rules for basic HTML elements in any context */
29-
body {
30-
background: var(--paper);
31-
color: var(--ink);
32-
font: var(--font);
14+
article {
15+
border: 1px solid #fb8500;
16+
}
17+
18+
.article-feature-text {
19+
padding: 0 0 2em 2em;
20+
}
21+
22+
.article-secondary-flex {
23+
display: flex;
24+
justify-content: space-between;
25+
}
26+
27+
.article-sec {
28+
margin-top: 1.5em;
29+
padding: 1.5em;
30+
width: 44%
3331
}
34-
a {
35-
padding: var(--space);
36-
border: var(--line);
37-
max-width: fit-content;
32+
img{
33+
width: 100%;
3834
}
39-
img,
40-
svg {
41-
width: 100%;
42-
object-fit: cover;
35+
36+
h1 {
37+
font-weight: 900;
38+
font-style: italic;
39+
color: #c1121f;
40+
margin-bottom:0;
4341
}
44-
/* ====== Site Layout ======
45-
Setting the overall rules for page regions
46-
https://www.w3.org/WAI/tutorials/page-structure/regions/
47-
*/
48-
main {
49-
max-width: var(--container);
50-
margin: 0 auto calc(var(--space) * 4) auto;
42+
43+
.site-tagline {
44+
color: #780000;
45+
margin-top: 0;
46+
font-size: 18px;
47+
font-weight: 700;
5148
}
49+
50+
/* ====== Header ====== */
51+
header {
52+
text-align: center;
53+
margin: 0;
54+
padding: 20px;
55+
}
56+
5257
footer {
53-
position: fixed;
54-
bottom: 0;
55-
text-align: center;
58+
text-align: center;
5659
}
57-
/* ====== Articles Grid Layout ====
58-
Setting the rules for how articles are placed in the main element.
59-
Inspect this in Devtools and click the "grid" button in the Elements view
60-
Play with the options that come up.
61-
https://developer.chrome.com/docs/devtools/css/grid
62-
https://gridbyexample.com/learn/
63-
*/
64-
main {
65-
display: grid;
66-
grid-template-columns: 1fr 1fr;
67-
gap: var(--space);
68-
> *:first-child {
69-
grid-column: span 2;
70-
}
60+
61+
/* ====== Navigation ====== */
62+
.article-read-more {
63+
text-decoration: none;
64+
border: 1px solid #03045e;
65+
padding: .7em 1.2em;
66+
color: #fff;
67+
background: #e76f51;
68+
border-radius: 2px;
7169
}
72-
/* ====== Article Layout ======
73-
Setting the rules for how elements are placed in the article.
74-
Now laying out just the INSIDE of the repeated card/article design.
75-
Keeping things orderly and separate is the key to good, simple CSS.
76-
*/
77-
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-
}
70+
71+
.article-read-more:hover,
72+
.article-read-more:focus {
73+
background: #ffc300;
74+
color: black;
75+
font-size: 20px;
8976
}
77+
78+

0 commit comments

Comments
 (0)