-
Notifications
You must be signed in to change notification settings - Fork 19
Feat/navbar vertical next inline collapse #2087
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| - link "Jump to Main content" | ||
| - link "Jump to Navigation" | ||
| - banner: | ||
| - link "Siemens logo": | ||
| - /url: "#/" | ||
| - heading "Navbar Vertical Next Example" [level=1] | ||
| - navigation: | ||
| - button "Toggle" | ||
| - button "Search..." | ||
| - link "Home": | ||
| - /url: "#/viewer/viewer/home" | ||
| - link "Energy & sustainability": | ||
| - /url: "#/viewer/viewer/energy" | ||
| - button "User management" | ||
| - group "User management" | ||
| - link "Test coverage": | ||
| - /url: "#/viewer/viewer/coverage" | ||
| - button "Documentation" | ||
| - group "Documentation" | ||
| - button "Action" | ||
| - link "Configuration": | ||
| - /url: "#/viewer/viewer/configuration" | ||
| - button "Toggle" | ||
| - main: | ||
| - heading "Here is a title" [level=2] | ||
| - text: Content with path 'home' Control panel | ||
| - checkbox "Always flyout" | ||
| - text: Always flyout | ||
| - checkbox "Inline collapse" [checked] | ||
| - text: Inline collapse |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| - link "Jump to Main content" | ||
| - link "Jump to Navigation" | ||
| - banner: | ||
| - link "Siemens logo": | ||
| - /url: "#/" | ||
| - heading "Navbar vertical next text only" [level=1] | ||
| - button "Jane Smith" | ||
| - navigation: | ||
| - button "Toggle" [expanded] | ||
| - button "Home" | ||
| - group "Home" | ||
| - button "Documentation" | ||
| - group "Documentation" | ||
| - text: All the rest | ||
| - link "Energy & Operations": | ||
| - /url: "#/viewer/viewer/energy" | ||
| - link "Test Coverage": | ||
| - /url: "#/viewer/viewer/coverage" | ||
| - link "Configuration": | ||
| - /url: "#/viewer/viewer/configuration" | ||
| - main: | ||
| - heading "Here is a title" [level=2] | ||
| - text: Here goes the content Control panel | ||
| - checkbox "Always flyout" | ||
| - text: Always flyout | ||
| - checkbox "Inline collapse" | ||
| - text: Inline collapse |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -95,7 +95,7 @@ nav { | |
| --si-layout-header-first-element-offset: 0; | ||
| } | ||
|
|
||
| :host:not(.nav-text-only) { | ||
| :host:not(.nav-text-only):not(.nav-inline-collapse) { | ||
| padding-inline-start: $vertical-nav-collapsed-width; | ||
|
|
||
| .mobile-drawer { | ||
|
|
@@ -104,7 +104,7 @@ nav { | |
| } | ||
| } | ||
|
|
||
| :host:not(.nav-text-only) { | ||
| :host:not(.nav-text-only):not(.nav-inline-collapse) { | ||
| nav { | ||
| inline-size: $vertical-nav-collapsed-width; | ||
|
|
||
|
|
@@ -116,7 +116,58 @@ nav { | |
| } | ||
|
|
||
| @include all-variables.media-breakpoint-up(lg) { | ||
| :host:not(.nav-collapsed) { | ||
| :host:not(.nav-collapsed):not(.nav-inline-collapse) { | ||
| padding-inline-start: $vertical-nav-width; | ||
| } | ||
| } | ||
|
|
||
| .nav-content { | ||
| display: flex; | ||
| flex-direction: column; | ||
| flex: 1 1 auto; | ||
| min-block-size: 0; | ||
| } | ||
|
|
||
| :host(.nav-inline-collapse) { | ||
| nav { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| // The in-nav toggle must clip out as the nav collapses to inline-size 0. | ||
| overflow: hidden; | ||
| } | ||
|
|
||
| &.nav-collapsed .mobile-drawer { | ||
| inline-size: 0; | ||
| } | ||
|
|
||
| @include all-variables.media-breakpoint-up(lg) { | ||
| &:not(.nav-collapsed) { | ||
| padding-inline-start: $vertical-nav-width; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| .inline-collapse-toggle { | ||
| display: block; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| margin-block-start: map.get(all-variables.$spacers, 6); | ||
| margin-inline-start: map.get(all-variables.$spacers, 9); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. margin inline shouldn't always be 32px but it should change to 16px based on breakpoint logic same as si-layout-main-padding |
||
| block-size: calc(1lh + (2 * map.get(all-variables.$spacers, 2))); | ||
| opacity: 1; | ||
| transition-property: opacity, block-size, margin-block-start; | ||
| transition-duration: all-variables.element-transition-duration(0.25s); | ||
| transition-delay: all-variables.element-transition-duration(0.25s); | ||
| transition-timing-function: ease; | ||
|
|
||
| &.fade-enter { | ||
| @starting-style { | ||
| opacity: 0; | ||
| block-size: 0; | ||
| margin-block-start: 0; | ||
| } | ||
| } | ||
|
|
||
| &.fade-leave { | ||
| opacity: 0; | ||
| block-size: 0; | ||
| margin-block-start: 0; | ||
| transition-delay: 0s; | ||
| } | ||
| } | ||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hover state is not working once in expanded view