Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs Revamp – more theme work #23713

Merged
merged 2 commits into from
Aug 17, 2024
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
6 changes: 3 additions & 3 deletions docs/docs-next/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const config: Config = {
],
themeConfig: {
colorMode: {
defaultMode: 'dark',
defaultMode: 'light',
disableSwitch: false,
respectPrefersColorScheme: true,
},
Expand Down Expand Up @@ -90,8 +90,8 @@ const config: Config = {
image: 'img/docusaurus-social-card.jpg',
docs: {
sidebar: {
autoCollapseCategories: true,
hideable: true,
autoCollapseCategories: false,
hideable: false,
},
},

Expand Down
71 changes: 63 additions & 8 deletions docs/docs-next/src/styles/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,22 @@ html {
font-family: var(--ifm-font-family-base);
background: var(--theme-color-background-default);
}
.container {
max-width: 1600px;

article {
max-width: 720px;
margin: 0 auto;
}

.breadcrumbs {
display: flex;
flex-direction: row;
align-items: center;
}

/* Main content */
.theme-doc-markdown {
max-width: 1900px;
margin: 0 auto;
margin-top: 1rem;
padding-left: 3rem;
}

/* Custom code for PyObject */
Expand All @@ -42,19 +49,21 @@ a.pyobject {
}

&__item {
// use margin instead of padding so that the border-bottom
// on active looks better
border: 1px;
}

&__link {
font-weight: var(--ifm-font-weight-normal);
border-bottom: 3px solid transparent;
border-bottom: 2px solid transparent;

&--active {
color: var(--theme-color-accent-blue);
border-bottom-color: var(--theme-color-accent-blue);
}

&:hover {
color: var(--theme-color-accent-blue);
}
}
}

Expand Down Expand Up @@ -123,7 +132,7 @@ a.pyobject {
.menu {
padding-right: 0.5rem !important;
&__link {
font-size: 1rem;
font-size: 14px;
font-weight: var(--ifm-font-weight-normal);
color: var(--theme-color-text-light);
&:hover {
Expand All @@ -142,6 +151,52 @@ a.pyobject {
}
}

.menu__link--sublist-caret {
color: var(--theme-color-text-default);
font-weight: 500;
font-size: 16px;
&:after {
display: none;
}
}

.menu__list-item-collapsible {
.menu__caret:before {
background-image: url('/icons/chevron.svg');
background-size: 20px;
width: 16px;
height: 16px;
}
}

.menu__list-item:not(:first-child) {
margin-top: 0;
}

.theme-doc-sidebar-item-category-level-1 {
padding-top: 4px;
.menu__list {
border-left: 1px solid var(--theme-color-keyline);
margin-left: 12px;
padding-left: 4px;
margin-top: 0;
}
.menu__list-item-collapsible a {
font-size: 16px;
}
}

.theme-doc-sidebar-item-category-level-2 {
.menu__list-item-collapsible a {
font-size: 14px;
font-weight: 400;
color: var(--theme-color-text-light);
:after {
background: blue;
}
}
}

.card {
border: 1px solid rgba(200, 200, 200, 0.3);
}
Expand Down
99 changes: 99 additions & 0 deletions docs/docs-next/src/styles/infima.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
:root {
--ifm-background-color: var(--theme-color-background-default);
// --ifm-background-surface-color
// --ifm-button-background-color
--ifm-code-font-size: 90%;
// --ifm-color-black
// --ifm-color-content
// --ifm-color-content-inverse
// --ifm-color-content-secondary
// --ifm-color-emphasis-100
// --ifm-color-emphasis-200
// --ifm-color-emphasis-400
// --ifm-color-emphasis-600
// --ifm-color-emphasis-900
// --ifm-color-feedback-background
// --ifm-color-primary
// --ifm-color-primary-dark
// --ifm-color-primary-darker
// --ifm-color-primary-darkest
// --ifm-color-primary-light
// --ifm-color-primary-lighter
// --ifm-color-primary-lightest
// --ifm-color-secondary
// --ifm-color-secondary-darkest
// --ifm-color-secondary-lighter
// --ifm-color-white
// --ifm-container-width
// --ifm-font-base-color
// --ifm-font-base-color-inverse
// --ifm-font-color-base
// --ifm-font-color-base-inverse
// --ifm-font-color-secondary
--ifm-font-family-base: var(--theme-font-base);
--ifm-heading-font-family: var(--theme-font-base);
--ifm-font-family-monospace: var(--theme-font-mono);
--ifm-font-size-base: 14px;
--ifm-font-weight-semibold: 600;
--ifm-font-weight-bold: 700;
// --ifm-footer-background-color
// --ifm-global-border-width
// --ifm-global-radius
// --ifm-global-spacing
// --ifm-h2-font-size
// --ifm-h3-font-size
// --ifm-leading
// --ifm-leading-desktop
--ifm-navbar-height: 60px;
// --ifm-navbar-padding-horizontal
// --ifm-pre-line-height
// --ifm-pre-padding
// --ifm-spacing-horizontal
// --ifm-tabs-color-active
--ifm-toc-border-color: var(--theme-color-keyline);
--ifm-toc-link-color: var(--theme-color-link-default);
--ifm-link-color: var(--theme-color-link-default);

//Top Navbar
--ifm-navbar-height: 60px;
--ifm-navbar-background-color: var(--theme-color-background-default);
--ifm-navbar-item-padding-horizontal: 8px;
--ifm-navbar-padding-vertical: 0px;
--ifm-navbar-padding-horizontal: 20px;
--ifm-navbar-link-color: var(--theme-color-text-light);
--ifm-navbar-link-hover-color: var(--theme-color-text-default);

//Left Menu
--ifm-menu-color: var(--theme-color-text-light);
--ifm-hover-overlay: var(--theme-color-background-blue);
--ifm-menu-color-active: var(--theme-color-background-blue);

// docusaurus
--docusaurus-highlighted-code-line-bg: var(--theme-background-light);

// infima shadow levels
// generated from https://www.joshwcomeau.com/shadow-palette/
--shadow-color: 0deg 0% 63%;
--shadow-elevation-low: 0px 1px 1px hsl(var(--shadow-color) / 0.07),
0px 1.4px 1.4px -1.8px hsl(var(--shadow-color) / 0.06),
-0.1px 3px 2.9px -3.5px hsl(var(--shadow-color) / 0.04);
--shadow-elevation-medium: 0px 1px 1px hsl(var(--shadow-color) / 0.06),
0px 1.8px 1.7px -0.9px hsl(var(--shadow-color) / 0.05),
-0.1px 3.5px 3.4px -1.8px hsl(var(--shadow-color) / 0.05),
-0.1px 7.5px 7.3px -2.7px hsl(var(--shadow-color) / 0.04),
-0.3px 15px 14.5px -3.5px hsl(var(--shadow-color) / 0.03);
--shadow-elevation-high: 0px 1px 1px hsl(var(--shadow-color) / 0.06),
0px 2.1px 2px -0.4px hsl(var(--shadow-color) / 0.05),
-0.1px 3.4px 3.3px -0.8px hsl(var(--shadow-color) / 0.05),
-0.1px 5.2px 5px -1.2px hsl(var(--shadow-color) / 0.05),
-0.1px 7.9px 7.6px -1.6px hsl(var(--shadow-color) / 0.04),
-0.2px 12px 11.6px -2px hsl(var(--shadow-color) / 0.04),
-0.3px 17.9px 17.3px -2.4px hsl(var(--shadow-color) / 0.04),
-0.5px 25.9px 25.1px -2.8px hsl(var(--shadow-color) / 0.03),
-0.7px 36.5px 35.3px -3.2px hsl(var(--shadow-color) / 0.03),
-0.9px 50px 48.4px -3.5px hsl(var(--shadow-color) / 0.03);

--ifm-global-shadow-lw: var(--shadow-elevation-low);
--ifm-global-shadow-md: var(--shadow-elevation-medium);
--ifm-global-shadow-tl: var(--shadow-elevation-high);
}
16 changes: 8 additions & 8 deletions docs/docs-next/src/styles/theme-dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
--theme-color-background-default: var(--dagster-gray-990);
--theme-color-background-light: var(--dagster-gray-950);
--theme-color-background-lighter: var(--dagster-gray-850);
--theme-color-background-red: var(--dagster-red-translucent-15);
--theme-color-background-green: var(--dagster-green-translucent-15);
--theme-color-background-blue: var(--dagster-blue-translucent-15);
--theme-color-background-yellow: var(--dagster-yellow-translucent-15);
--theme-color-background-cyan: var(--dagster-cyan-translucent-15);
--theme-color-background-gray: var(--dagster-gray-translucent-15);
--theme-color-background-red: var(--dagster-red-translucent-20);
--theme-color-background-green: var(--dagster-green-translucent-20);
--theme-color-background-blue: var(--dagster-blue-translucent-20);
--theme-color-background-yellow: var(--dagster-yellow-translucent-20);
--theme-color-background-cyan: var(--dagster-cyan-translucent-20);
--theme-color-background-gray: var(--dagster-gray-translucent-20);

--theme-color-link-default: var(--dagster-blue-200);
--theme-color-link-hover: var(--dagster-blue-400);
Expand Down Expand Up @@ -58,6 +58,6 @@

//Left Menu
--ifm-menu-color: var(--theme-color-text-light);
--ifm-hover-overlay: var(--dagster-blue-translucent-25);
--ifm-menu-color-active: var(--dagster-blue-700);
--ifm-hover-overlay: var(--theme-color-background-blue);
--ifm-menu-color-active: var(--theme-color-background-blue);
}
4 changes: 2 additions & 2 deletions docs/docs-next/src/styles/theme-light.scss
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@

//Left Menu
--ifm-menu-color: var(--theme-color-text-light);
--ifm-hover-overlay: var(--dagster-blue-translucent-12);
--ifm-menu-color-active: var(--dagster-blue-700);
--ifm-hover-overlay: var(--theme-color-background-blue);
--ifm-menu-color-active: var(--theme-color-background-blue);

// docusaurus
--docusaurus-highlighted-code-line-bg: var(--theme-color-background-blue);
Expand Down
3 changes: 3 additions & 0 deletions docs/docs-next/static/icons/arrow_drop_down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/docs-next/static/icons/chevron.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading