Skip to content

Commit

Permalink
Merge pull request #1647 from hashicorp/tiny-update-for-sidenav-docum…
Browse files Browse the repository at this point in the history
…entation

`SideNav` - Small update to the documentation about CSS variable for "desktop" viewport
  • Loading branch information
didoo authored Sep 19, 2023
2 parents a6573ef + 59cd589 commit 8e775a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion website/docs/components/side-nav/partials/code/how-to-use.md
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,8 @@ Alternatively, if you want to create a custom transition (or respond in a differ

As mentioned above, the full-fledged `Hds::SideNav` component is "responsive" by default:

- when the **viewport is `desktop`** the sidebar navigation is static and has a fixed width (the width at which the viewport is considered "desktop" is controlled by a dedicated CSS variable, see below for more details)
- when the **viewport is `desktop`** the sidebar navigation is static and has a fixed width
- the width at which the viewport is considered "desktop" is controlled by a dedicated CSS variable `--hds-app-desktop-breakpoint`; if needed it can be overwritten (at `:root` level) to define a custom "desktop" breakpoint
- when the **viewport is `mobile`** the sidebar navigation is responsive and the user can minimize or maximize its width via a toggle button (the component will take care automatically of the transitions between these two states)
- in this case the SideNav occupies only a minimum width in terms of page layout, even when expanded (it partially covers the main content)
- a toggle button is added to the SideNav, used to expand/minimize its width
Expand Down

2 comments on commit 8e775a2

@vercel
Copy link

@vercel vercel bot commented on 8e775a2 Sep 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

hds-showcase – ./packages/components

hds-components-hashicorp.vercel.app
hds-showcase.vercel.app
hds-showcase-hashicorp.vercel.app
hds-showcase-git-main-hashicorp.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 8e775a2 Sep 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.