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
10 changes: 1 addition & 9 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ const config: Config = {
"docusaurus-theme-redoc",
],
headTags: [
// add css to the head
// Main font, so pre-load it.
...["InterVariable.woff2?v=4.0"].map((font: string) => ({
tagName: "link",
attributes: {
Expand All @@ -241,14 +241,6 @@ const config: Config = {
href: `/docs/fonts/${font.includes("Inter") ? "Inter" : "JetBrainsMono"}/${font}`,
},
})),
{
tagName: "link",
attributes: {
rel: "stylesheet",
type: "text/css",
href: "/docs/fonts/fonts.css",
},
},
],
scripts: [
// Needed as a workaround for https://answers.netlify.com/t/trailing-slash-missing-on-proxied-netlify-site/36367
Expand Down
336 changes: 335 additions & 1 deletion src/css/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,341 @@
@import "tailwindcss/theme.css" layer(theme);
@import "tailwindcss/utilities.css" layer(utilities);

/**
* fonts in this file are being loaded from the main website to improve
* caching.
*/

@font-face {
font-family: InterVariable;
font-style: normal;
font-weight: 100 900;
font-display: swap;
src: url("../static/fonts/Inter/InterVariable.woff2?v=4.0") format("woff2");
}

@font-face {
font-family: InterVariable;
font-style: italic;
font-weight: 100 900;
font-display: swap;
src: url("../static/fonts/Inter/InterVariable-Italic.woff2?v=4.0")
format("woff2");
}

/* legacy name "Inter var" (Oct 2023) */
@font-face {
font-family: "Inter var";
font-style: normal;
font-weight: 100 900;
font-display: swap;
src: url("../static/fonts/Inter/InterVariable.woff2?v=4.0") format("woff2");
}

@font-face {
font-family: "Inter var";
font-style: italic;
font-weight: 100 900;
font-display: swap;
src: url("../static/fonts/Inter/InterVariable-Italic.woff2?v=4.0")
format("woff2");
}

/* static, legacy fonts */
@font-face {
font-family: Inter;
font-style: normal;
font-weight: 100;
font-display: swap;
src: url("../static/fonts/Inter/Inter-Thin.woff2?v=4.0") format("woff2");
}

@font-face {
font-family: Inter;
font-style: italic;
font-weight: 100;
font-display: swap;
src: url("../static/fonts/Inter/Inter-ThinItalic.woff2?v=4.0") format("woff2");
}

@font-face {
font-family: Inter;
font-style: normal;
font-weight: 200;
font-display: swap;
src: url("../static/fonts/Inter/Inter-ExtraLight.woff2?v=4.0") format("woff2");
}

@font-face {
font-family: Inter;
font-style: italic;
font-weight: 200;
font-display: swap;
src: url("../static/fonts/Inter/Inter-ExtraLightItalic.woff2?v=4.0")
format("woff2");
}

@font-face {
font-family: Inter;
font-style: normal;
font-weight: 300;
font-display: swap;
src: url("../static/fonts/Inter/Inter-Light.woff2?v=4.0") format("woff2");
}

@font-face {
font-family: Inter;
font-style: italic;
font-weight: 300;
font-display: swap;
src: url("../static/fonts/Inter/Inter-LightItalic.woff2?v=4.0")
format("woff2");
}

@font-face {
font-family: Inter;
font-style: normal;
font-weight: 400;
font-display: swap;
src: url("../static/fonts/Inter/Inter-Regular.woff2?v=4.0") format("woff2");
}

@font-face {
font-family: Inter;
font-style: italic;
font-weight: 400;
font-display: swap;
src: url("../static/fonts/Inter/Inter-Italic.woff2?v=4.0") format("woff2");
}

@font-face {
font-family: Inter;
font-style: normal;
font-weight: 500;
font-display: swap;
src: url("../static/fonts/Inter/Inter-Medium.woff2?v=4.0") format("woff2");
}

@font-face {
font-family: Inter;
font-style: italic;
font-weight: 500;
font-display: swap;
src: url("../static/fonts/Inter/Inter-MediumItalic.woff2?v=4.0")
format("woff2");
}

@font-face {
font-family: Inter;
font-style: normal;
font-weight: 600;
font-display: swap;
src: url("../static/fonts/Inter/Inter-SemiBold.woff2?v=4.0") format("woff2");
}

@font-face {
font-family: Inter;
font-style: italic;
font-weight: 600;
font-display: swap;
src: url("../static/fonts/Inter/Inter-SemiBoldItalic.woff2?v=4.0")
format("woff2");
}

@font-face {
font-family: Inter;
font-style: normal;
font-weight: 700;
font-display: swap;
src: url("../static/fonts/Inter/Inter-Bold.woff2?v=4.0") format("woff2");
}

@font-face {
font-family: Inter;
font-style: italic;
font-weight: 700;
font-display: swap;
src: url("../static/fonts/Inter/Inter-BoldItalic.woff2?v=4.0") format("woff2");
}

@font-face {
font-family: Inter;
font-style: normal;
font-weight: 800;
font-display: swap;
src: url("../static/fonts/Inter/Inter-ExtraBold.woff2?v=4.0") format("woff2");
}

@font-face {
font-family: Inter;
font-style: italic;
font-weight: 800;
font-display: swap;
src: url("../static/fonts/Inter/Inter-ExtraBoldItalic.woff2?v=4.0")
format("woff2");
}

@font-face {
font-family: Inter;
font-style: normal;
font-weight: 900;
font-display: swap;
src: url("../static/fonts/Inter/Inter-Black.woff2?v=4.0") format("woff2");
}

@font-face {
font-family: Inter;
font-style: italic;
font-weight: 900;
font-display: swap;
src: url("../static/fonts/Inter/Inter-BlackItalic.woff2?v=4.0")
format("woff2");
}

@font-face {
font-family: "JetBrains Mono";
font-display: swap;
src: url("../static/fonts/JetBrainsMono/JetBrainsMono-Bold.woff2")
format("woff2");
font-weight: bold;
font-style: normal;
}

@font-face {
font-family: "JetBrains Mono";
font-display: swap;
src: url("../static/fonts/JetBrainsMono/JetBrainsMono-BoldItalic.woff2")
format("woff2");
font-weight: bold;
font-style: italic;
}

@font-face {
font-family: "JetBrains Mono";
font-display: swap;
src: url("../static/fonts/JetBrainsMono/JetBrainsMono-ExtraBold.woff2")
format("woff2");
font-weight: 800;
font-style: normal;
}

@font-face {
font-family: "JetBrains Mono";
font-display: swap;
src: url("../static/fonts/JetBrainsMono/JetBrainsMono-ExtraBoldItalic.woff2")
format("woff2");
font-weight: 800;
font-style: italic;
}

@font-face {
font-family: "JetBrains Mono";
font-display: swap;
src: url("../static/fonts/JetBrainsMono/JetBrainsMono-ExtraLight.woff2")
format("woff2");
font-weight: 200;
font-style: normal;
}

@font-face {
font-family: "JetBrains Mono";
font-display: swap;
src: url("../static/fonts/JetBrainsMono/JetBrainsMono-ExtraLightItalic.woff2")
format("woff2");
font-weight: 200;
font-style: italic;
}

@font-face {
font-family: "JetBrains Mono";
font-display: swap;
src: url("../static/fonts/JetBrainsMono/JetBrainsMono-Italic.woff2")
format("woff2");
font-weight: normal;
font-style: italic;
}

@font-face {
font-family: "JetBrains Mono";
font-display: swap;
src: url("../static/fonts/JetBrainsMono/JetBrainsMono-Light.woff2")
format("woff2");
font-weight: 300;
font-style: normal;
}

@font-face {
font-family: "JetBrains Mono";
font-display: swap;
src: url("../static/fonts/JetBrainsMono/JetBrainsMono-LightItalic.woff2")
format("woff2");
font-weight: 300;
font-style: italic;
}

@font-face {
font-family: "JetBrains Mono";
font-display: swap;
src: url("../static/fonts/JetBrainsMono/JetBrainsMono-Medium.woff2")
format("woff2");
font-weight: 500;
font-style: normal;
}

@font-face {
font-family: "JetBrains Mono";
font-display: swap;
src: url("../static/fonts/JetBrainsMono/JetBrainsMono-MediumItalic.woff2")
format("woff2");
font-weight: 500;
font-style: italic;
}

@font-face {
font-family: "JetBrains Mono";
font-display: swap;
src: url("../static/fonts/JetBrainsMono/JetBrainsMono-Regular.woff2")
format("woff2");
font-weight: normal;
font-style: normal;
}

@font-face {
font-family: "JetBrains Mono";
font-display: swap;
src: url("../static/fonts/JetBrainsMono/JetBrainsMono-SemiBold.woff2")
format("woff2");
font-weight: 600;
font-style: normal;
}

@font-face {
font-family: "JetBrains Mono";
font-display: swap;
src: url("../static/fonts/JetBrainsMono/JetBrainsMono-SemiBoldItalic.woff2")
format("woff2");
font-weight: 600;
font-style: italic;
}

@font-face {
font-family: "JetBrains Mono";
font-display: swap;
src: url("../static/fonts/JetBrainsMono/JetBrainsMono-Thin.woff2")
format("woff2");
font-weight: 100;
font-style: normal;
}

@font-face {
font-family: "JetBrains Mono";
font-display: swap;
src: url("../static/fonts/JetBrainsMono/JetBrainsMono-ThinItalic.woff2")
format("woff2");
font-weight: 100;
font-style: italic;
}

:root {
--ifm-font-family-base-fallback: sans-serif;
--ifm-font-family-monospace-fallback: monospace;
Expand Down Expand Up @@ -30,7 +365,6 @@
var(--ifm-font-family-base-fallback);
}
}

/* If you have a different syntax highlighting theme for dark mode. */
[data-theme="dark"] {
/* Color which works with dark mode syntax highlighting theme */
Expand Down
Loading
Loading