Skip to content
This repository was archived by the owner on Feb 15, 2025. It is now read-only.

Commit 4e7204b

Browse files
committed
optimized font-size
1 parent b4dd5f8 commit 4e7204b

File tree

5 files changed

+83
-38
lines changed

5 files changed

+83
-38
lines changed

src/components/buttons/GithubButton/styles.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
border-radius: 3px;
66
border: none;
77

8-
font-size: 18px;
8+
font-size: var(--ifm-font-size-18);
99
font-weight: bold;
1010

1111
cursor: pointer;

src/components/buttons/PrimaryButton/styles.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
border-radius: 3px;
55
border: none;
66

7-
font-size: 18px;
7+
font-size: var(--ifm-font-size-18);
88
font-weight: bold;
99

1010
cursor: pointer;

src/css/custom.scss

Lines changed: 73 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,33 @@
3434
--ifm-color-gray-darkest: #262630;
3535
--ifm-color-gray-dark: #3c3c4c;
3636

37+
// ==============================================================================
38+
// Font Sizes
39+
// ==============================================================================
40+
41+
--ifm-font-size-12: .75rem;
42+
--ifm-font-size-14: .875rem;
43+
--ifm-font-size-16: 1rem;
44+
--ifm-font-size-18: 1.125rem;
45+
--ifm-font-size-20: 1.25rem;
46+
--ifm-font-size-24: 1.5rem;
47+
--ifm-font-size-28: 1.75rem;
48+
--ifm-font-size-30: 1.875rem;
49+
--ifm-font-size-32: 2rem;
50+
--ifm-font-size-36: 2.25rem;
51+
--ifm-font-size-40: 2.5rem;
52+
--ifm-font-size-48: 3rem;
53+
--ifm-font-size-56: 3.5rem;
54+
--ifm-font-size-64: 4rem;
55+
--ifm-font-size-72: 4.5rem;
56+
57+
--ifm-font-size-small: var(--ifm-font-size-14);
58+
--ifm-font-size-body: var(--ifm-font-size-16);
59+
--ifm-font-size-large: var(--ifm-font-size-20);
60+
--ifm-font-size-display: var(--ifm-font-size-48);
61+
--ifm-font-size-display-small: var(--ifm-font-size-24);
62+
--ifm-font-size-display-large: var(--ifm-font-size-72);
63+
3764
// ==============================================================================
3865
// Theme Colors
3966
// ==============================================================================
@@ -107,37 +134,55 @@
107134
--ifm-navbar-shadow: 0 1px 0 0 var(--ifm-color-primary-lightest);
108135
--ifm-dropdown-background-color: var(--ifm-color-background-2);
109136
--ifm-dropdown-hover-background-color: var(--ifm-color-background-3);
137+
}
110138

139+
// ==============================================================================
140+
// Global
141+
// ==============================================================================
111142

112-
// ==============================================================================
113-
// Scrollbar
114-
// ==============================================================================
143+
html,
144+
body {
145+
height: 100%;
146+
}
115147

116-
/* Firefox */
117-
* {
118-
scrollbar-color: var(--ifm-color-primary-lightest)
119-
var(--ifm-color-primary-darkest);
120-
scrollbar-width: thin;
121-
}
148+
body {
149+
margin: 0;
150+
transition: var(--ifm-transition-fast) ease color;
151+
}
122152

123-
/* WebKit / Blink */
124-
::-webkit-scrollbar {
125-
width: 7px !important;
126-
height: 7px !important;
127-
}
153+
#__docusaurus {
154+
min-height: 100%;
155+
display: flex;
156+
flex-direction: column;
157+
}
128158

129-
::-webkit-scrollbar-track {
130-
background: var(--ifm-color-primary-darkest) !important;
131-
}
159+
// ==============================================================================
160+
// Scrollbar
161+
// ==============================================================================
132162

133-
::-webkit-scrollbar-thumb {
134-
border-radius: 0 !important;
135-
background: var(--ifm-color-primary-lightest) !important;
136-
}
163+
/* Firefox */
164+
* {
165+
scrollbar-color: var(--ifm-color-primary-lightest) var(--ifm-color-primary-darkest);
166+
scrollbar-width: thin;
167+
}
137168

138-
::-webkit-scrollbar-corner {
139-
background: var(--ifm-color-primary-dark) !important;
140-
}
169+
/* WebKit / Blink */
170+
::-webkit-scrollbar {
171+
width: 7px !important;
172+
height: 7px !important;
173+
}
174+
175+
::-webkit-scrollbar-track {
176+
background: var(--ifm-color-primary-darkest) !important;
177+
}
178+
179+
::-webkit-scrollbar-thumb {
180+
border-radius: 0 !important;
181+
background: var(--ifm-color-primary-lightest) !important;
182+
}
183+
184+
::-webkit-scrollbar-corner {
185+
background: var(--ifm-color-primary-dark) !important;
141186
}
142187

143188
// ==============================================================================
@@ -167,10 +212,10 @@
167212

168213
/* For default Admonition */
169214
background-color: rgba(
170-
121,
171-
118,
172-
171,
173-
0.5
215+
121,
216+
118,
217+
171,
218+
0.5
174219
); /* var(--ra-admonition-color) gets somehow overwritten */
175220
border-left-color: var(--ra-admonition-color-dark);
176221

src/pages/LandingPage/components/HeaderView/styles.module.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
.HeaderTitle {
1919
color: var(--ifm-navbar-link-color);
20-
font-size: 4rem;
20+
font-size: var(--ifm-font-size-64);
2121
font-weight: bold;
2222
}
2323

@@ -35,7 +35,7 @@
3535

3636
.SeparatorText {
3737
color: var(--ifm-navbar-link-active-color);
38-
font-size: 1.25rem;
38+
font-size: var(--ifm-font-size-20);
3939
margin-left: 15px;
4040
margin-right: 15px;
4141
margin-bottom: 7px;
@@ -49,7 +49,7 @@
4949

5050
.DescriptionText {
5151
color: var(--ifm-color-primary-lightest);
52-
font-size: 1.5rem;
52+
font-size: var(--ifm-font-size-24);
5353
max-width: 400px;
5454
}
5555

@@ -75,15 +75,15 @@
7575

7676
@media (max-width: 768px) {
7777
.HeaderTitle {
78-
font-size: 2rem;
78+
font-size: var(--ifm-font-size-32);
7979
}
8080

8181
.SeparatorRight {
8282
width: 150px;
8383
}
8484

8585
.DescriptionText {
86-
font-size: 1.3rem;
86+
font-size: var(--ifm-font-size-20);
8787
}
8888

8989
.ButtonContainer {

src/theme/Footer/styles.module.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@
5858
.Tagline {
5959
max-width: 250px;
6060
margin-bottom: 0;
61-
font-size: 16px;
61+
font-size: var(--ifm-font-size-16);
6262
color: var(--ifm-color-on-background-2);
6363
font-weight: var(--ifm-font-weight-semibold);
6464
}
6565

6666
.GithubButton {
6767
justify-self: start !important;
68-
font-size: 12px !important;
68+
font-size: var(--ifm-font-size-12) !important;
6969
}
7070

7171
.SectionContainer {
@@ -78,7 +78,7 @@
7878
.LinkItemTitle {
7979
margin-bottom: 1.25rem;
8080
font-weight: var(--ifm-font-weight-bold);
81-
font-size: 18px;
81+
font-size: var(--ifm-font-size-18);
8282
list-style: none;
8383
}
8484

0 commit comments

Comments
 (0)