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

Try: Remove dashed outlines for child and parent blocks. #18105

Merged
merged 1 commit into from
Dec 2, 2019
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
64 changes: 0 additions & 64 deletions packages/block-editor/src/components/block-list/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -199,70 +199,6 @@
opacity: 1;
}
}

// Add extra border to parent blocks when their children are selected.
&.has-child-selected {

> .block-editor-block-list__block-edit::before {
border: $border-width dashed $dark-opacity-light-600;

.is-dark-theme & {
border-color: $light-opacity-light-500;
}
}

> .block-editor-block-list__block-edit > [data-block] > div > .block-editor-inner-blocks > .block-editor-block-list__layout > .block-editor-block-list__block:not(.is-selected) > .block-editor-block-list__block-edit::before,
> .block-editor-block-list__block-edit > [data-block] > div > .wp-block-cover__inner-container > .block-editor-inner-blocks > .block-editor-block-list__layout > .block-editor-block-list__block:not(.is-selected) > .block-editor-block-list__block-edit::before,
> .block-editor-block-list__block-edit > [data-block] > div > .wp-block-group__inner-container > .block-editor-inner-blocks > .block-editor-block-list__layout > .block-editor-block-list__block:not(.is-selected) > .block-editor-block-list__block-edit::before {
border: $border-width dashed $dark-opacity-light-600;

.is-dark-theme & {
border-color: $light-opacity-light-500;
}
}

&.is-hovered > .block-editor-block-list__block-edit::before,
> .block-editor-block-list__block-edit > [data-block] > div > .block-editor-inner-blocks > .block-editor-block-list__layout > .block-editor-block-list__block.is-hovered:not(.is-selected) > .block-editor-block-list__block-edit::before,
> .block-editor-block-list__block-edit > [data-block] > div > .wp-block-cover__inner-container > .block-editor-inner-blocks > .block-editor-block-list__layout > .block-editor-block-list__block.is-hovered:not(.is-selected) > .block-editor-block-list__block-edit::before,
> .block-editor-block-list__block-edit > [data-block] > div > .wp-block-group__inner-container > .block-editor-inner-blocks > .block-editor-block-list__layout > .block-editor-block-list__block.is-hovered:not(.is-selected) > .block-editor-block-list__block-edit::before {
border-style: solid;
border-color: $dark-opacity-light-500;
border-left-color: transparent;

.is-dark-theme & {
border-color: $light-opacity-light-400;
border-left-color: transparent;
}
}
}

// Add extra border to child blocks when they are selected.
&.is-selected {

> .block-editor-block-list__block-edit > [data-block] > div > .block-editor-inner-blocks > .block-editor-block-list__layout > .block-editor-block-list__block:not(.is-selected),
> .block-editor-block-list__block-edit > [data-block] > div > .wp-block-cover__inner-container > .block-editor-inner-blocks > .block-editor-block-list__layout > .block-editor-block-list__block:not(.is-selected),
> .block-editor-block-list__block-edit > [data-block] > div > .wp-block-group__inner-container > .block-editor-inner-blocks > .block-editor-block-list__layout > .block-editor-block-list__block:not(.is-selected) {

> .block-editor-block-list__block-edit::before {
border: $border-width dashed $dark-opacity-light-600;

.is-dark-theme & {
border-color: $light-opacity-light-500;
}
}

&.is-hovered > .block-editor-block-list__block-edit::before {
border-style: solid;
border-color: $dark-opacity-light-500;
border-left-color: transparent;

.is-dark-theme & {
border-color: $light-opacity-light-400;
border-left-color: transparent;
}
}
}
}
}

/**
Expand Down
17 changes: 0 additions & 17 deletions packages/block-library/src/columns/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -170,23 +170,6 @@ div.block-core-columns.is-vertically-aligned-bottom {
right: 0;
}

/**
* Add extra padding when the parent block is selected, for easier interaction.
*/
[data-type="core/columns"].is-selected > .block-editor-block-list__block-edit > [data-block] > div > .block-editor-inner-blocks,
[data-type="core/columns"].has-child-selected > .block-editor-block-list__block-edit > [data-block] > div > .block-editor-inner-blocks,
[data-type="core/column"].is-selected > .block-editor-block-list__block-edit > [data-block] > div > .block-editor-inner-blocks,
[data-type="core/column"].has-child-selected > .block-editor-block-list__block-edit > [data-block] > div > .block-editor-inner-blocks {
padding: $block-padding;

// Negate this padding for the placeholder.
> .components-placeholder {
margin: -$block-padding;
width: calc(100% + #{$block-padding * 2});
}
}


// Fullwide: show margin left/right to ensure there's room for the side UI.
// This is not a 1:1 preview with the front-end where these margins would presumably be zero.
[data-type="core/columns"][data-align="full"] .wp-block-columns {
Expand Down
14 changes: 0 additions & 14 deletions packages/block-library/src/group/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -86,20 +86,6 @@
}
}

// Add padding when the block is selected, for easier interaction.
.block-editor-block-list__layout .block-editor-block-list__block[data-type="core/group"].has-child-selected > .block-editor-block-list__block-edit > [data-block] > .wp-block-group,
.block-editor-block-list__layout .block-editor-block-list__block[data-type="core/group"].is-selected > .block-editor-block-list__block-edit > [data-block] > .wp-block-group {

> .wp-block-group__inner-container > .block-editor-inner-blocks {
padding: $block-padding;
}

&:not(.has-background) > .wp-block-group__inner-container > .block-editor-inner-blocks > .block-editor-block-list__layout {
margin-top: -$block-padding * 2;
margin-bottom: -$block-padding * 2;
}
}

// Place block list appender in the same place content will appear.
[data-type="core/group"].is-selected {

Expand Down