Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 2 additions & 32 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,39 +98,9 @@ const config: Config = {
tagName: "link",
attributes: {
rel: "preload",
href: "/fonts/Nacelle/Nacelle-Light.otf",
href: "/fonts/Satoshi/Satoshi-Variable.ttf",
as: "font",
type: "font/otf",
crossorigin: "anonymous",
},
},
{
tagName: "link",
attributes: {
rel: "preload",
href: "/fonts/Nacelle/Nacelle-Regular.otf",
as: "font",
type: "font/otf",
crossorigin: "anonymous",
},
},
{
tagName: "link",
attributes: {
rel: "preload",
href: "/fonts/Nacelle/Nacelle-SemiBold.otf",
as: "font",
type: "font/otf",
crossorigin: "anonymous",
},
},
{
tagName: "link",
attributes: {
rel: "preload",
href: "/fonts/Nacelle/Nacelle-Bold.otf",
as: "font",
type: "font/otf",
type: "font/ttf",
crossorigin: "anonymous",
},
},
Expand Down
46 changes: 14 additions & 32 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

.theme-doc-sidebar-item-category-level-1 > .menu__list-item-collapsible > .menu__link--sublist {
margin-bottom: 6px;
font-size: 13px;
font-size: 14px !important;
font-weight: 600;
line-height: 20px;
color: #213547;
Expand Down Expand Up @@ -531,6 +531,7 @@ html {

body {
font-family: var(--ifm-font-family-base);
letter-spacing: 0.02em;
}

.navbar {
Expand All @@ -539,11 +540,11 @@ body {

.navbar__title {
font-family: var(--ifm-font-family-base);
font-weight: 600;
}

.menu__link {
font-family: var(--ifm-font-family-base);
font-variation-settings: 'wght' 600;
}
Comment on lines 545 to 548
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Don’t force weight via font-variation-settings on all menu links

This overrides font-weight (500/600) states and breaks fallbacks. Use font-weight only.

-  font-variation-settings: 'wght' 600; 
+  /* rely on font-weight declarations above (500) and in active/hover states */
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.menu__link {
font-family: var(--ifm-font-family-base);
font-variation-settings: 'wght' 600;
}
.menu__link {
font-family: var(--ifm-font-family-base);
/* rely on font-weight declarations above (500) and in active/hover states */
}
🤖 Prompt for AI Agents
In src/css/custom.css around lines 545 to 548, the .menu__link rule is forcing
weight via font-variation-settings which overrides font-weight states and breaks
fallbacks; remove the font-variation-settings declaration and replace it with an
explicit font-weight (e.g. font-weight: 600;) so that normal font-weight
fallbacks and non-variable fonts work correctly, or limit
font-variation-settings to a selector that only applies when you know a variable
font is loaded.


.markdown {
Expand Down Expand Up @@ -835,35 +836,11 @@ table,
}
}

@font-face {
font-family: 'Nacelle';
src: url('/fonts/Nacelle/Nacelle-Light.otf') format('opentype');
font-weight: 300;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: 'Nacelle';
src: url('/fonts/Nacelle/Nacelle-Regular.otf') format('opentype');
font-weight: 400;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: 'Nacelle';
src: url('/fonts/Nacelle/Nacelle-SemiBold.otf') format('opentype');
font-weight: 500;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: 'Nacelle';
src: url('/fonts/Nacelle/Nacelle-Bold.otf') format('opentype');
font-weight: 600;
font-style: normal;
font-family: 'Satoshi';
src: url('/fonts/Satoshi/Satoshi-Variable.ttf') format('truetype');
font-weight: 400 680;
font-style: normal italic;
font-display: swap;
}

Expand Down Expand Up @@ -900,7 +877,12 @@ table,
}

:root {
--ifm-font-family-base: 'Nacelle';
--ifm-heading-font-family: 'Nacelle';
--ifm-font-family-base: 'Satoshi';
--ifm-heading-font-family: 'Satoshi';
--ifm-font-family-monospace: 'IBM Mono';
--font-weight-light: 400;
--font-weight-regular: 480;
--font-weight-medium: 560;
--font-weight-semibold: 640;
--font-weight-bold: 680;
}
Binary file removed static/fonts/Nacelle/Nacelle-Bold.otf
Binary file not shown.
Binary file removed static/fonts/Nacelle/Nacelle-Light.otf
Binary file not shown.
Binary file removed static/fonts/Nacelle/Nacelle-Regular.otf
Binary file not shown.
Binary file removed static/fonts/Nacelle/Nacelle-SemiBold.otf
Binary file not shown.
Binary file added static/fonts/Satoshi/Satoshi-Variable.ttf
Binary file not shown.