Skip to content

Commit d256501

Browse files
committed
updated CSS with new style sheet
1 parent 8097666 commit d256501

1 file changed

Lines changed: 56 additions & 57 deletions

File tree

Wireframe/style.css

Lines changed: 56 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,88 @@
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 */
6-
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 ====== */
1+
/*====== Design Palette ====== */
192
:root {
203
--paper: oklch(7 0 0);
214
--ink: color-mix(in oklab, var(--color) 5%, black);
225
--font: 100%/1.5 system-ui;
236
--space: clamp(6px, 6px + 2vw, 15px);
24-
--line: 1px solid;
25-
--container: 1280px;
7+
--line: 1px solid rgb(201, 198, 198);
268
}
27-
/* ====== Base Elements ======
28-
General rules for basic HTML elements in any context */
9+
10+
2911
body {
3012
background: var(--paper);
3113
color: var(--ink);
3214
font: var(--font);
15+
display: block;
16+
margin: 0 auto;
17+
background-color: rgb(213, 230, 224);
18+
max-width: 1200px;
3319
}
34-
a {
20+
h1{
21+
font-size: 90px;
22+
text-align: center;
23+
color: rgb(47, 16, 77);
3524
padding: var(--space);
25+
}
26+
h2, p{
27+
margin: var(--space);
28+
}
29+
30+
a {
31+
display: block;
32+
padding: 10px;
33+
margin: 0 auto;
3634
border: var(--line);
3735
max-width: fit-content;
36+
border-radius: 5px;
37+
background-color: rgb(221, 149, 191);
38+
color: black;
39+
text-decoration: none;
3840
}
3941
img,
4042
svg {
4143
width: 100%;
4244
object-fit: cover;
4345
}
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;
51-
}
46+
47+
5248
footer {
53-
position: fixed;
49+
padding: var(--space);
50+
margin: var(--space);
5451
bottom: 0;
5552
text-align: center;
5653
}
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-
}
71-
}
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-
*/
54+
7755
article {
7856
border: var(--line);
57+
border-radius: 5px;
7958
padding-bottom: var(--space);
8059
text-align: left;
60+
gap: 20px;
61+
background-color: rgb(233, 210, 243);
62+
}
63+
.firstrow {
64+
display: grid;
65+
grid-template-columns: 1fr;
66+
padding: 0 0 20px;
67+
68+
}
69+
.secondrow {
8170
display: grid;
82-
grid-template-columns: var(--space) 1fr var(--space);
83-
> * {
84-
grid-column: 2/3;
71+
grid-template-columns: 1fr 1fr;
72+
gap: 20px;
73+
}
74+
#readmeimg{
75+
display: block;
76+
margin: 0 auto;
77+
width: 500px;
78+
}
79+
@media (max-width: 800px){
80+
.firstrow, .secondrow{
81+
display: grid;
82+
grid-template-columns: 1fr;
83+
gap: 20px;
8584
}
86-
> img {
87-
grid-column: span 3;
85+
#readmeimg{
86+
width: 100%;
8887
}
8988
}

0 commit comments

Comments
 (0)