feat(techdocs): make sidebar positioning configurable via CSS custom properties (#33908)

* feat(techdocs): make sidebar positioning configurable via CSS custom properties

Replace hardcoded Backstage app sidebar widths (224px/72px) in the
TechDocs layout CSS with CSS custom properties that inherit through
the shadow DOM boundary, allowing apps with custom sidebar widths
to override the defaults.

- `--techdocs-sidebar-closed-offset-pinned` (default: 224px)
- `--techdocs-sidebar-closed-offset-collapsed` (default: 72px)
- `--techdocs-sidebar-open-translate` (default: 16rem)

Also extract all magic values into named constants.

Signed-off-by: Johan Persson <johanopersson@gmail.com>

* Add PR #33908 to patch release

Signed-off-by: Johan Persson <johanopersson@gmail.com>

---------

Signed-off-by: Johan Persson <johanopersson@gmail.com>
This commit is contained in:
Johan Persson
2026-04-16 14:02:54 +02:00
committed by GitHub
parent a9b556d70d
commit 8d1e093ae8
3 changed files with 21 additions and 13 deletions
+1
View File
@@ -0,0 +1 @@
Make TechDocs sidebar positioning configurable via CSS custom properties