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

chore: Document that Gap is not to be used on Grid #1553

Merged
merged 1 commit into from
Aug 30, 2024
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
4 changes: 3 additions & 1 deletion packages/css/src/components/gap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ The five sizes of [Component Space](/docs/brand-design-tokens-space--docs) are a
## Guidelines

- Use this utility class to vertically separate the children of a parent element from each other.
- It can be used on any element and sets the `gap` CSS property.
- Do not use it on the Grid component.
Grid is responsible for its own gaps.
- It can be used on any other element and sets the `gap` CSS property.
It also makes the element a grid container; the gap would be ignored otherwise.
These declarations are marked with the `!important` flag to ensure they override any other gaps and display modes.
- To add a gap between 2 siblings, the first one can be given a [Margin Bottom](/docs/utilities-css-margin--docs) instead.
Expand Down
2 changes: 2 additions & 0 deletions packages/css/src/components/grid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Multiple instances of the grid component are possible on a page, but the columns
Within the grid, you create cells containing the desired content.
A cell often spans multiple columns of the grid.

The Gap utility classes must not be used on the Grid component.

## Design

The [design choices](/docs/brand-design-tokens-grid--docs) are described in the general documentation.