Skip to content

Commit 45be23f

Browse files
committed
tweak typography and styling
1 parent 287730c commit 45be23f

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

src/css/custom.css

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787

8888
--ifm-code-padding-horizontal: 0.3em;
8989

90-
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.07);
90+
--docusaurus-highlighted-code-line-bg: hsla(45, 97%, 72%, 0.3);
9191

9292
--codeblock-background-color: #f6f8fa;
9393
}
@@ -139,14 +139,19 @@
139139
--ifm-home-color-highlight: hsl(var(--primary-hue), 100%, 78.6%);
140140
--ifm-home-color-border: #f7f7ff;
141141

142-
--docusaurus-highlighted-code-line-bg: rgba(255, 255, 255, 0.07);
142+
--docusaurus-highlighted-code-line-bg: hsla(45, 77%, 25%, 0.3);
143143

144144
--codeblock-background-color: #282a35;
145145
}
146146

147+
:not([data-theme='dark']) body {
148+
-webkit-font-smoothing: auto;
149+
-moz-osx-font-smoothing: auto;
150+
}
151+
147152
h1 {
148153
font-family: var(--ifm-heading-font-family);
149-
font-size: 2.75rem;
154+
font-size: 2rem;
150155
letter-spacing: -0.022em;
151156
margin-top: 0;
152157
margin-bottom: 0.5rem;
@@ -157,7 +162,7 @@ h1 {
157162

158163
h2 {
159164
font-family: var(--ifm-heading-font-family);
160-
font-size: 2rem;
165+
font-size: 1.5rem;
161166
letter-spacing: -0.018em;
162167
margin-top: 2.25rem;
163168
margin-bottom: 0.5rem;
@@ -170,7 +175,7 @@ h2 {
170175

171176
h3 {
172177
font-family: var(--ifm-heading-font-family);
173-
font-size: 1.5rem;
178+
font-size: 1.25rem;
174179
letter-spacing: -0.014em;
175180
margin-top: 2rem;
176181
margin-bottom: 0.5rem;
@@ -180,7 +185,7 @@ h3 {
180185

181186
h4 {
182187
font-family: var(--ifm-heading-font-family);
183-
font-size: 1.25rem;
188+
font-size: 1.125rem;
184189
letter-spacing: -0.012em;
185190
margin-top: 1.75rem;
186191
margin-bottom: 0.5rem;
@@ -190,7 +195,7 @@ h4 {
190195

191196
h5 {
192197
font-family: var(--ifm-heading-font-family);
193-
font-size: 1.125rem;
198+
font-size: 1.0625rem;
194199
letter-spacing: -0.01em;
195200
margin-top: 1.5rem;
196201
margin-bottom: 0.5rem;
@@ -265,6 +270,8 @@ article p {
265270
.navbar {
266271
padding: 0;
267272
background-color: transparent;
273+
box-shadow: none;
274+
border-bottom: 1px solid var(--ifm-toc-border-color);
268275
}
269276

270277
.navbar::before {
@@ -370,6 +377,10 @@ article p {
370377
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E");
371378
}
372379

380+
.theme-doc-sidebar-menu {
381+
margin-right: var(--ifm-menu-link-padding-horizontal);
382+
}
383+
373384
.menu {
374385
font-size: 87.5%;
375386
font-weight: var(--ifm-font-weight-normal);
@@ -432,9 +443,8 @@ article p {
432443
color: var(--ifm-color-emphasis-1000);
433444
}
434445

435-
.menu__link {
436-
border-top-right-radius: 0;
437-
border-bottom-right-radius: 0;
446+
.menu__link--active {
447+
font-weight: var(--ifm-font-weight-semibold);
438448
}
439449

440450
.menu__link--sublist-caret:after {
@@ -724,8 +734,6 @@ pre code:has(.code-block-diff-remove-line) {
724734

725735
code {
726736
border-width: 1px;
727-
-webkit-font-smoothing: auto;
728-
-moz-osx-font-smoothing: auto;
729737
}
730738

731739
.blog-wrapper .container aside nav {

0 commit comments

Comments
 (0)