-
Notifications
You must be signed in to change notification settings - Fork 25
[Docs] Spacing & layout - content restructure (2 of 5) #5573
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: layout-content-2
Are you sure you want to change the base?
Conversation
Co-authored-by: julauxen <[email protected]>
|
| Spacing guides users' eyes through the page, helping them understand the relationships | ||
| between different elements. The HPE Design System minimizes use of borders to separate | ||
| content. Instead spacing, typography, and background color are combined to create visual | ||
| hierarchy. |
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.
| Spacing guides users' eyes through the page, helping them understand the relationships | |
| between different elements. The HPE Design System minimizes use of borders to separate | |
| content. Instead spacing, typography, and background color are combined to create visual | |
| hierarchy. | |
| Effective spacing guides a user's eye through the interface, making it easier to understand how elements relate to one another. The HPE Design System minimizes use of borders to separate | |
| content. Instead spacing, typography, and background color are combined to create clear visual | |
| hierarchy. |
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.
Adopted.
| The following spacing scale may be applied to create separation between [content | ||
| containers](/insert-link-when-available) (gap), between a content container's boundary | ||
| and its content (padding), and within content subsections (gap). |
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.
| The following spacing scale may be applied to create separation between [content | |
| containers](/insert-link-when-available) (gap), between a content container's boundary | |
| and its content (padding), and within content subsections (gap). | |
| Use spacing to: | |
| - Create separation between content containers (gaps) | |
| - Set space between a container’s boundary and its content (padding) | |
| - Define spacing within subsections of content (gaps) |
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.
Adopted.
| <Notification | ||
| alignSelf="start" | ||
| status="warning" | ||
| title="Avoid use of margin" | ||
| message={ | ||
| <Paragraph margin="none"> | ||
| Use of margin can lead to unpredictable responsive and/or adaptive layouts | ||
| and should be used with caution, if not avoided. All layouts may be | ||
| achieved using gap and padding, resulting in more flexible, predictable, | ||
| and maintainable layouts. | ||
| </Paragraph> | ||
| } | ||
| /> |
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.
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.
I like this idea. Do you have a supporting graphic / illustration in mind? I am blanking on a illustrative scenario at the moment.
| Spacing sizes are a subset of the [scale system](/foundation/scale-system) | ||
| using proximity principles to define relationships between content and create | ||
| hierarchy within a page. Spacing design tokens define the padding within, margin | ||
| around, or gap between content. |
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.
| Spacing sizes are a subset of the [scale system](/foundation/scale-system) | |
| using proximity principles to define relationships between content and create | |
| hierarchy within a page. Spacing design tokens define the padding within, margin | |
| around, or gap between content. | |
| Spacing sizes are a subset of the [scale system](/foundation/scale-system), | |
| supporting proximity principles to shape relationships between content and establish hierarchy on a page. These principles are applied through [spacing tokens](/design-tokens/layout-and-spacing/spacing), which define the padding within, margin | |
| around, or gap between content. |
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.
Adopted.
| message: `Use spacing design tokens to style element-level components. | ||
| Instead, use component-specific tokens or element tokens which ensure | ||
| correct sizing of elements across screen sizes.`, |
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.
| message: `Use spacing design tokens to style element-level components. | |
| Instead, use component-specific tokens or element tokens which ensure | |
| correct sizing of elements across screen sizes.`, | |
| message: `Use spacing design tokens to style element-level components. | |
| Instead, use component-specific tokens or [element tokens](https://design-system.hpe.design/design-tokens/element) which ensure | |
| correct sizing of elements across screen sizes.`, |
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.
Adopted.
| Use of margin can lead to unpredictable responsive and/or adaptive layouts | ||
| and should be used with caution, if not avoided. All layouts may be | ||
| achieved using gap and padding, resulting in more flexible, predictable, | ||
| and maintainable layouts. |
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.
| Use of margin can lead to unpredictable responsive and/or adaptive layouts | |
| and should be used with caution, if not avoided. All layouts may be | |
| achieved using gap and padding, resulting in more flexible, predictable, | |
| and maintainable layouts. | |
| Relying on margin can lead to unpredictable responsive and/or adaptive layouts and should be used with caution, if at all. Most layouts can be achieved using only gap and padding, resulting in more flexible, predictable, and maintainable designs. |
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.
Adopted.
oliverHPE
left a comment
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.
Looks great.

Deploy Preview
What does this PR do?
This is the second of a series of chained PRs building upon #5521. The PRs should be reviewed and merged in order.
This pull request reorganizes and expands the foundation documentation structure for the design system, introducing a new "Spacing" section and improving the categorization of related content. The main changes include moving and reclassifying the "T-shirt sizing" and "Scale system" cards under a new "Layout" category, adding a new "Spacing" card and related documentation, and implementing supporting example components for the new section.
Foundation structure and categorization improvements:
New documentation and examples for spacing:
spacing.mdxdocumentation page, providing guidance, best practices, and interactive examples for spacing, including a visual scale and a call-to-action for design tokens.SpacingScale, which visually displays the spacing scale;SpacingTokensCTA, a button linking to spacing design tokens; andSpacingBestPractices, for illustrating best and worst practices. These are now exported and used in the new documentation. [1] [2] [3]Supporting exports and cleanup:
What are the relevant issues?
Where should the reviewer start?
https://deploy-preview-5573--keen-mayer-a86c8b.netlify.app/foundation/spacing
How should this be manually tested?
Any background context you want to provide?
Screenshots (if appropriate)
Should this PR be mentioned in Design System updates?
Is this change backwards compatible or is it a breaking change?