Skip to content

Commit 4de4a77

Browse files
committed
second project switched to global styles
1 parent 1f4cd21 commit 4de4a77

File tree

4 files changed

+26
-330
lines changed

4 files changed

+26
-330
lines changed

2-counter/final/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<title>Counter</title>
7+
<!-- global styles -->
8+
<link rel="stylesheet" href="../../global.css" />
79
<!-- styles -->
810
<link rel="stylesheet" href="styles.css" />
911
</head>

2-counter/final/styles.css

Lines changed: 11 additions & 165 deletions
Original file line numberDiff line numberDiff line change
@@ -1,140 +1,21 @@
11
/*
22
===============
3-
Fonts
4-
===============
5-
*/
6-
@import url("https://fonts.googleapis.com/css?family=Open+Sans|Roboto:400,700&display=swap");
7-
8-
/*
9-
===============
10-
Variables
11-
===============
12-
*/
13-
14-
:root {
15-
/* dark shades of primary color*/
16-
--clr-primary-1: hsl(205, 86%, 17%);
17-
--clr-primary-2: hsl(205, 77%, 27%);
18-
--clr-primary-3: hsl(205, 72%, 37%);
19-
--clr-primary-4: hsl(205, 63%, 48%);
20-
/* primary/main color */
21-
--clr-primary-5: hsl(205, 78%, 60%);
22-
/* lighter shades of primary color */
23-
--clr-primary-6: hsl(205, 89%, 70%);
24-
--clr-primary-7: hsl(205, 90%, 76%);
25-
--clr-primary-8: hsl(205, 86%, 81%);
26-
--clr-primary-9: hsl(205, 90%, 88%);
27-
--clr-primary-10: hsl(205, 100%, 96%);
28-
/* darkest grey - used for headings */
29-
--clr-grey-1: hsl(209, 61%, 16%);
30-
--clr-grey-2: hsl(211, 39%, 23%);
31-
--clr-grey-3: hsl(209, 34%, 30%);
32-
--clr-grey-4: hsl(209, 28%, 39%);
33-
/* grey used for paragraphs */
34-
--clr-grey-5: hsl(210, 22%, 49%);
35-
--clr-grey-6: hsl(209, 23%, 60%);
36-
--clr-grey-7: hsl(211, 27%, 70%);
37-
--clr-grey-8: hsl(210, 31%, 80%);
38-
--clr-grey-9: hsl(212, 33%, 89%);
39-
--clr-grey-10: hsl(210, 36%, 96%);
40-
--clr-white: #fff;
41-
--clr-red-dark: hsl(360, 67%, 44%);
42-
--clr-red-light: hsl(360, 71%, 66%);
43-
--clr-green-dark: hsl(125, 67%, 44%);
44-
--clr-green-light: hsl(125, 71%, 66%);
45-
--clr-black: #222;
46-
--ff-primary: "Roboto", sans-serif;
47-
--ff-secondary: "Open Sans", sans-serif;
48-
--transition: all 0.3s linear;
49-
--spacing: 0.25rem;
50-
--radius: 0.5rem;
51-
--light-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
52-
--dark-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
53-
--max-width: 1170px;
54-
--fixed-width: 620px;
55-
}
56-
/*
57-
===============
58-
Global Styles
3+
Counter
594
===============
605
*/
616

62-
*,
63-
::after,
64-
::before {
65-
margin: 0;
66-
padding: 0;
67-
box-sizing: border-box;
68-
}
69-
body {
70-
font-family: var(--ff-secondary);
71-
background: var(--clr-grey-10);
72-
color: var(--clr-grey-1);
73-
line-height: 1.5;
74-
font-size: 0.875rem;
75-
}
76-
ul {
77-
list-style-type: none;
78-
}
79-
a {
80-
text-decoration: none;
81-
}
82-
img:not(.nav-logo) {
83-
width: 100%;
84-
display: block;
85-
}
86-
87-
h1,
88-
h2,
89-
h3,
90-
h4 {
91-
letter-spacing: var(--spacing);
92-
text-transform: capitalize;
93-
line-height: 1.25;
94-
margin-bottom: 0.75rem;
95-
font-family: var(--ff-primary);
96-
}
97-
h1 {
98-
font-size: 3rem;
99-
}
100-
h2 {
101-
font-size: 2rem;
102-
}
103-
h3 {
104-
font-size: 1.25rem;
105-
}
106-
h4 {
107-
font-size: 0.875rem;
7+
main {
8+
min-height: 100vh;
9+
display: grid;
10+
place-items: center;
10811
}
109-
p {
110-
margin-bottom: 1.25rem;
111-
color: var(--clr-grey-5);
12+
.container {
13+
text-align: center;
11214
}
113-
@media screen and (min-width: 800px) {
114-
h1 {
115-
font-size: 4rem;
116-
}
117-
h2 {
118-
font-size: 2.5rem;
119-
}
120-
h3 {
121-
font-size: 1.75rem;
122-
}
123-
h4 {
124-
font-size: 1rem;
125-
}
126-
body {
127-
font-size: 1rem;
128-
}
129-
h1,
130-
h2,
131-
h3,
132-
h4 {
133-
line-height: 1;
134-
}
15+
#value {
16+
font-size: 6rem;
17+
font-weight: bold;
13518
}
136-
/* global classes */
137-
13819
.btn {
13920
text-transform: uppercase;
14021
background: transparent;
@@ -148,44 +29,9 @@ p {
14829
cursor: pointer;
14930
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
15031
border-radius: var(--radius);
32+
margin: 0.5rem;
15133
}
15234
.btn:hover {
15335
color: var(--clr-white);
15436
background: var(--clr-black);
15537
}
156-
/* section */
157-
.section {
158-
padding: 5rem 0;
159-
}
160-
161-
.section-center {
162-
width: 90vw;
163-
margin: 0 auto;
164-
max-width: 1170px;
165-
}
166-
@media screen and (min-width: 992px) {
167-
.section-center {
168-
width: 95vw;
169-
}
170-
}
171-
/*
172-
===============
173-
Counter
174-
===============
175-
*/
176-
177-
main {
178-
min-height: 100vh;
179-
display: grid;
180-
place-items: center;
181-
}
182-
.container {
183-
text-align: center;
184-
}
185-
#value {
186-
font-size: 6rem;
187-
font-weight: bold;
188-
}
189-
.btn {
190-
margin: 0.5rem;
191-
}

2-counter/setup/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<title>Counter</title>
7+
<!-- global styles -->
8+
<link rel="stylesheet" href="../../global.css" />
79
<!-- styles -->
810
<link rel="stylesheet" href="styles.css" />
911
</head>

0 commit comments

Comments
 (0)