Skip to content

Commit

Permalink
Add comments to link hard-coded indentation level and CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewserong committed May 1, 2023
1 parent ca8ec6d commit 5e9068c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/block-editor/src/components/list-view/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,9 @@ $block-navigation-max-indent: 8;
}
}

// When updating the margin for each indentation level, the corresponding
// indentation in `use-list-view-drop-zone.js` must be updated as well
// to ensure the drop zone is aligned with the indentation.
@for $i from 0 to $block-navigation-max-indent {
.block-editor-list-view-leaf[aria-level="#{ $i + 1 }"] .block-editor-list-view__expander {
@if $i - 1 >= 0 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ import { store as blockEditorStore } from '../../store';
* 'inside' refers to nesting as an inner block.
*/

// When the indentation level, the corresponding left margin in `style.scss`
// must be updated as well to ensure the drop zone is aligned with the indentation.
export const NESTING_LEVEL_INDENTATION = 28;

/**
Expand Down

0 comments on commit 5e9068c

Please sign in to comment.