Skip to content

Commit 76fea66

Browse files
committed
refactor(typography): move typographical styles into dedicated file
* Use home-template typographical styles as new basis
1 parent 9730d63 commit 76fea66

4 files changed

Lines changed: 56 additions & 89 deletions

File tree

src/css/app.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/* Base */
2+
@import './base/typography.css';
23
@import './base/colors.css';
34

45
/* /1* Components *1/ */

src/css/base/typography.css

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
body {
2+
color: var(--text);
3+
font-family: 'Inter', sans-serif;
4+
font-size: 1rem;
5+
margin: 0;
6+
padding: 0;
7+
}
8+
9+
h1,
10+
h2,
11+
h3,
12+
h4,
13+
h5,
14+
h6 {
15+
font-family: 'Rubik', sans-serif;
16+
margin: 0;
17+
text-align: left;
18+
}
19+
20+
h2 {
21+
font-size: 2rem;
22+
font-weight: 700;
23+
line-height: normal;
24+
margin-bottom: 16px;
25+
text-transform: uppercase;
26+
}
27+
28+
h3 {
29+
font-size: 1.5rem;
30+
font-weight: 500;
31+
line-height: 2.25rem;
32+
}
33+
34+
a {
35+
box-shadow: inset 0 -2px 0 var(--yellow);
36+
color: inherit;
37+
padding-bottom: 1px;
38+
text-decoration: none;
39+
transition: all 0.15s ease-in-out;
40+
}
41+
42+
a:hover {
43+
box-shadow: inset 0 -2px 0 var(--red);
44+
}
45+
46+
@media (min-width: 834px) {
47+
h2 {
48+
font-size: 4.5rem;
49+
}
50+
51+
h3 {
52+
font-size: 2.625rem;
53+
line-height: 3rem;
54+
}
55+
}

src/css/pages/home.css

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,13 @@
11
.home-template {
2-
h1,
3-
h2,
4-
h3 {
5-
font-family: 'Rubik', sans-serif;
6-
margin: 0;
7-
text-align: left;
8-
}
9-
10-
h2 {
11-
font-size: 2rem;
12-
font-weight: 700;
13-
line-height: normal;
14-
text-transform: uppercase;
15-
margin-bottom: 16px;
16-
}
17-
18-
h3 {
19-
font-size: 1.5rem;
20-
font-weight: 500;
21-
line-height: 2.25rem;
22-
}
23-
242
h3#conferences {
253
background: none;
264
}
275

28-
p {
29-
font-family: 'Inter', sans-serif;
30-
}
31-
326
hr {
337
border: 3px solid var(--yellow);
348
width: 70px;
359
}
3610

37-
section {
38-
padding: 0;
39-
margin: 0;
40-
}
41-
4211
.home-template__hero {
4312
display: flex;
4413
flex-direction: column;
@@ -302,15 +271,6 @@
302271
}
303272

304273
@media (min-width: 834px) {
305-
h2 {
306-
font-size: 4.5rem;
307-
}
308-
309-
h3 {
310-
font-size: 2.625rem;
311-
line-height: 3rem;
312-
}
313-
314274
.home-template__hero {
315275
gap: 24px;
316276
padding: 96px 56px;

src/css/rubycentral.css

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -10,52 +10,3 @@
1010
html {
1111
scroll-behavior: smooth;
1212
}
13-
14-
body {
15-
margin: 0;
16-
padding: 0;
17-
font-family: 'Inter', sans-serif;
18-
color: var(--text);
19-
font-size: 16px;
20-
}
21-
22-
body p {
23-
line-height: 27px;
24-
margin: 0 0 27px 0;
25-
}
26-
27-
body p:last-child {
28-
margin: 0;
29-
}
30-
31-
body a {
32-
text-decoration: none;
33-
color: inherit;
34-
text-decoration: none;
35-
padding-bottom: 1px;
36-
box-shadow: inset 0 -2px 0 var(--yellow);
37-
transition: all .15s ease-in-out;
38-
}
39-
40-
body a:hover {
41-
box-shadow: inset 0 -2px 0 var(--red);
42-
transition: all .15s ease-in-out;
43-
}
44-
45-
h3 {
46-
font-size: 24px;
47-
font-weight: 600;
48-
font-family: 'Rubik';
49-
margin: 0 0 5px 0;
50-
}
51-
52-
@media screen and (max-width: 1200px) and (orientation: portrait),
53-
(max-width: 1097px) and (orientation: landscape) {
54-
}
55-
56-
@media screen and (max-width: 900px) and (orientation: portrait),
57-
(max-width: 823px) and (orientation: landscape) {
58-
h3 {
59-
font-size: 20px;
60-
}
61-
}

0 commit comments

Comments
 (0)