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

Update list view spacing #60713

Merged
merged 9 commits into from
Apr 23, 2024
Prev Previous commit
Try: 4px gutter, remove 2px gap, indent by multiples of 24
  • Loading branch information
jameskoster committed Apr 18, 2024
commit b695b841505f7e6955d11dc01e42f302941cb72c
5 changes: 2 additions & 3 deletions packages/block-editor/src/components/list-view/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -465,13 +465,12 @@ $block-navigation-max-indent: 8;
// Chevron container metrics.
.block-editor-list-view__expander {
height: $icon-size;
margin-right: $grid-unit-05 * 0.5; // Ensures chevron is spaced equally from left to right.
width: $icon-size;
cursor: pointer;
}

.block-editor-list-view-leaf[aria-level] .block-editor-list-view__expander {
margin-left: ($grid-unit-30 * $block-navigation-max-indent) + (($grid-unit-05 * 0.5) * $block-navigation-max-indent);
margin-left: ($grid-unit-30 * $block-navigation-max-indent);
}

// When updating the margin for each indentation level, the corresponding
Expand All @@ -481,7 +480,7 @@ $block-navigation-max-indent: 8;
.block-editor-list-view-leaf[aria-level="#{ $i + 1 }"]
.block-editor-list-view__expander {
@if $i - 1 >= 0 {
margin-left: ($grid-unit-30 * $i) + (($grid-unit-05 * 0.5) * $i); // Effectivly centers the expander below the parent's icon.
margin-left: ($grid-unit-30 * $i); // Effectivly centers the expander below the parent's icon.
} @else {
margin-left: 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
scrollbar-gutter: auto;

// The table cells use an extra pixels of space left and right. We compensate for that here.
padding: $grid-unit-10;
padding: $grid-unit-05;
}

.editor-list-view-sidebar__list-view-container {
Expand Down
Loading