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

Grid gap keywords #1178

Merged
merged 9 commits into from
Apr 12, 2023
Merged

Grid gap keywords #1178

merged 9 commits into from
Apr 12, 2023

Conversation

gavin-ts
Copy link
Contributor

@gavin-ts gavin-ts commented Apr 11, 2023

Summary

Adds grid-gap, vertical-gap, and horizontal-gap keywords to customize gap size in grids.

Details

before/after

Screen Shot 2023-04-10 at 8 04 49 PM

@gavin-ts gavin-ts marked this pull request as ready for review April 11, 2023 03:11
@gavin-ts gavin-ts requested a review from a team April 11, 2023 03:11
@gavin-ts gavin-ts enabled auto-merge April 11, 2023 03:13
Copy link
Collaborator

@alixander alixander left a comment

Choose a reason for hiding this comment

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

gap 0 looks particularly useful.

d2layouts/d2grid/grid_diagram.go Outdated Show resolved Hide resolved
@ejulio-ts
Copy link
Contributor

I don't have any preference, but I wonder which one is better grid-gap-rows or grid-rows-gap.

@alixander
Copy link
Collaborator

oh true, we should flip it to match what css chose:

Screen Shot 2023-04-11 at 7 14 30 AM

grid-row-gap

@alixander
Copy link
Collaborator

actually maybe this is an opportunity to just let users control vertical/horizontal spacing between nodes. can be used for sequence diagrams and others too: #1183

vertical-gap and horizontal-gap

d2layouts/d2grid/grid_diagram.go Outdated Show resolved Hide resolved
@alixander alixander mentioned this pull request Apr 11, 2023
@gavin-ts
Copy link
Contributor Author

actually maybe this is an opportunity to just let users control vertical/horizontal spacing between nodes. can be used for sequence diagrams and others too: #1183

vertical-gap and horizontal-gap

so we are deciding between gap, vertical-gap, horizontal-gap and grid-gap, grid-row-gap, grid-column-gap?

another option is gap, row-gap, and column-gap https://developer.mozilla.org/en-US/docs/Web/CSS/gap

@alixander
Copy link
Collaborator

let's do grid-gap, vertical-gap and horizontal-gap.

in a grid, the shorthand for both is useful. but when used elsewhere, it's not.

@gavin-ts gavin-ts disabled auto-merge April 12, 2023 18:56
@gavin-ts gavin-ts merged commit 1a81930 into terrastruct:master Apr 12, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

customize gap sizes in grid diagram
3 participants