Skip to content

A platform for community discussion. Free, open, simple.

DEV: Sticky sidebar for styleguide (#36494)

Penar Musarajc6fe7a4a22db
diff --git a/plugins/styleguide/assets/stylesheets/styleguide.scss b/plugins/styleguide/assets/stylesheets/styleguide.scss
index 4dad91bbba8..dbc5887250a 100644
--- a/plugins/styleguide/assets/stylesheets/styleguide.scss
+++ b/plugins/styleguide/assets/stylesheets/styleguide.scss
@@ -2,8 +2,10 @@
@import "typography";
.styleguide {
+ position: relative;
display: flex;
- padding: 1rem 1rem;
+ padding: 1rem;
+ padding-left: 0;
.styleguide-note {
padding: 1em;
@@ -12,13 +14,22 @@
}
.styleguide-menu {
+ position: sticky;
+ top: calc(var(--header-offset) + 3rem);
+ max-height: calc(100vh - 3rem - var(--header-offset));
flex: 1 0 0;
+ overflow-y: auto;
+ margin-right: 2rem;
ul {
list-style: none;
margin: 0;
margin-bottom: 2em;
+ &:last-child {
+ margin-bottom: 0;
+ }
+
li.styleguide-heading {
color: var(--primary-medium);
text-transform: uppercase;