Skip to content

Commit b37514b

Browse files
committed
Trying to optimize GFonts loading
1 parent 80d66b4 commit b37514b

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

faq-accordion-card-main/css/main.css

+17-15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@import url("https://fonts.googleapis.com/css2?family=Kumbh+Sans:wght@400;700&display=swap");
2+
13
* {
24
box-sizing: border-box;
35
margin: 0;
@@ -10,8 +12,8 @@ body {
1012
min-height: 100vh;
1113
font-size: 12px;
1214

13-
padding-top: 5em;
14-
padding-bottom: 5em;
15+
padding-top: 5rem;
16+
padding-bottom: 5rem;
1517

1618
display: flex;
1719
flex-flow: column nowrap;
@@ -25,26 +27,26 @@ div.card {
2527
}
2628

2729
.faq-panel-2 h1 {
28-
font-size: 3em;
30+
font-size: 3rem;
2931
font-weight: bold;
30-
margin-bottom: 0.8em;
32+
margin-bottom: 0.8rem;
3133
letter-spacing: 1px;
3234
}
3335

3436
div.qa-accordion {
3537
border-bottom: 1px solid hsl(240, 5%, 91%);
36-
padding: 1.2em 0 1.2em;
38+
padding: 1.2em 0 1.2rem;
3739
position: relative;
3840
}
3941

4042
div.qa-accordion:last-child {
41-
margin-bottom: 4em;
43+
margin-bottom: 4rem;
4244
}
4345

4446
.qa-accordion span {
4547
display: inline-block;
4648
width: 90%;
47-
line-height: 1.3em;
49+
line-height: 1.3rem;
4850
font-size: 13px;
4951
color: hsl(237, 12%, 33%);
5052
transition: .2s ease-out;
@@ -63,7 +65,7 @@ div.qa-accordion:last-child {
6365
.qa-accordion span:after {
6466
display: inline-block;
6567
position: absolute;
66-
top: 1.2em;
68+
top: 1.2rem;
6769
right: 0;
6870
background-image: url('../images/icon-arrow-down.svg');
6971
content: '';
@@ -77,9 +79,9 @@ div.qa-accordion:last-child {
7779
}
7880

7981
.qa-accordion p {
80-
margin-top: 1em;
82+
margin-top: 1rem;
8183
color: hsl(240, 6%, 50%);
82-
line-height: 1.5em;
84+
line-height: 1.5rem;
8385

8486
/* Hide */
8587
min-height: 0;
@@ -99,7 +101,7 @@ div.qa-accordion:last-child {
99101
.attribution {
100102
color: whitesmoke;
101103
font-weight: 400;
102-
padding: 2em;
104+
padding: 2rem;
103105
}
104106

105107
.attribution a {
@@ -120,7 +122,7 @@ div.qa-accordion:last-child {
120122

121123
main {
122124
width: 90%;
123-
padding-top: 7em;
125+
padding-top: 7rem;
124126
}
125127

126128
div.card {
@@ -134,7 +136,7 @@ div.qa-accordion:last-child {
134136
}
135137

136138
div.faq-panel-1 {
137-
padding-bottom: 3em;
139+
padding-bottom: 3rem;
138140
position: relative;
139141
}
140142

@@ -229,13 +231,13 @@ div.qa-accordion:last-child {
229231
}
230232

231233
div.faq-panel-2 {
232-
padding-right: 5em;
234+
padding-right: 5rem;
233235
flex-basis: 50%;
234236
flex-grow: 0;
235237
flex-shrink: 0;
236238
}
237239

238240
.faq-panel-2 h1 {
239-
margin-top: 2em;
241+
margin-top: 2rem;
240242
}
241243
}

faq-accordion-card-main/index.html

-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
<meta charset="UTF-8">
55
<meta content="width=device-width, initial-scale=1.0" name="viewport">
66
<!-- displays site properly based on user's device -->
7-
87
<link href="images/favicon-32x32.png" rel="icon" sizes="32x32" type="image/png">
9-
<link href="https://fonts.googleapis.com/css2?family=Kumbh+Sans:wght@400;700&display=swap" rel="stylesheet">
108
<link href="css/minireset.css" rel="stylesheet">
119
<link href="css/main.css" rel="stylesheet">
1210
<title>Artu | Frontend Mentor | FAQ Accordion Card</title>

0 commit comments

Comments
 (0)