From 7a98c73dc870393b5729fe26de80eabeef9520aa Mon Sep 17 00:00:00 2001 From: gabrielucido Date: Thu, 14 Jul 2022 16:15:31 -0400 Subject: [PATCH] fix(docs-like-code): Patched Techdocs Sidebar layout for medium devices. Signed-off-by: gabrielucido --- .changeset/mighty-penguins-tap.md | 5 +++++ .../techdocs/src/reader/transformers/styles/rules/layout.ts | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/mighty-penguins-tap.md diff --git a/.changeset/mighty-penguins-tap.md b/.changeset/mighty-penguins-tap.md new file mode 100644 index 0000000000..0958e71ffd --- /dev/null +++ b/.changeset/mighty-penguins-tap.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-techdocs': patch +--- + +Fixed techdocs sidebar layout bug for medium devices. diff --git a/plugins/techdocs/src/reader/transformers/styles/rules/layout.ts b/plugins/techdocs/src/reader/transformers/styles/rules/layout.ts index 2488504dd9..3ef8becaf1 100644 --- a/plugins/techdocs/src/reader/transformers/styles/rules/layout.ts +++ b/plugins/techdocs/src/reader/transformers/styles/rules/layout.ts @@ -61,7 +61,7 @@ export default ({ theme, sidebar }: RuleOptions) => ` scrollbar-width: thin; } .md-sidebar .md-sidebar__scrollwrap { - width: calc(16rem - 10px); + width: calc(12.1rem); } .md-sidebar--secondary { right: ${theme.spacing(3)}px; @@ -169,7 +169,7 @@ export default ({ theme, sidebar }: RuleOptions) => ` width: 12.1rem !important; z-index: 200; left: ${ - sidebar.isPinned ? 'calc(-12.1rem + 242px)' : 'calc(-12.1rem + 72px)' + sidebar.isPinned ? 'calc(-12.1rem + 224px)' : 'calc(-12.1rem + 72px)' } !important; } .md-sidebar--secondary:not([hidden]) {