Skip to content
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

HDS-2032 Update grid and breakpoint docs about Header max width #1170

Merged
merged 2 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Changes that are not related to specific components

Changes that are not related to specific components
- [Component] What has been changed
- Updated grid documentation with information about the new Header

#### Fixed

Expand Down
4 changes: 2 additions & 2 deletions site/src/docs/foundation/design-tokens/breakpoints/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ The breakpoint tokens are divided into two sets;
- **Breakpoint tokens** define exact widths (in pixels) where the next breakpoint comes into effect.
- **Container width token** defines maximum container width.

When breakpoints change the left and right padding of the container changes. It is recommended to use the provided padding values because they match with <InternalLink href="/components/navigation">HDS Navigation</InternalLink> and <InternalLink href="/components/footer">HDS Footer</InternalLink> paddings. You can find these paddings on the <InternalLink href="/foundation/design-tokens/breakpoints/tokens">HDS Breakpoints tokens tab.</InternalLink>
When breakpoints change the left and right padding of the container changes. It is recommended to use the provided padding values because they match with <InternalLink href="/components/footer">HDS Footer</InternalLink> paddings. You can find these paddings on the <InternalLink href="/foundation/design-tokens/breakpoints/tokens">HDS Breakpoints tokens tab.</InternalLink>

The maximum content container width is always `--container-width-xl` (1200px). When the viewport width is below this value, the content container always takes all available space.
The maximum content container width is always `--container-width-xl` (1200px). When the viewport width is below this value, the content container always takes all available space. Note that the <InternalLink href="/components/header">Header component</InternalLink> is an exception with maximum width of 1440 pixels so it should not be placed inside the grid container.
1 change: 1 addition & 0 deletions site/src/docs/foundation/guidelines/grid.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import InternalLink from '../../../components/InternalLink';
## Principles

- HDS uses a standard 12 column grid whose maximum width is 1200 pixels. Container width and the number of columns change each breakpoint.
- The <InternalLink href="/components/header">Header component</InternalLink> is an exception with maximum width of 1440 pixels so it should not be placed inside the grid container.
- Larger screen sizes use 24-pixel gutters while on mobile screen widths they shrink to 16 pixels and eventually to 12 pixels in the smallest breakpoint.
- Even though HDS does not include grid implementation, it recommends and suggests methods how to handle changing amount of columns and column stacking. See [Layout columns](#layout-columns) for more information.
- HDS also offers a Container component that helps to follow breakpoints and container widths. For more info refer to <InternalLink href="/foundation/design-tokens/breakpoints">Breakpoints documentation.</InternalLink>
Expand Down
Loading