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 adding focus outline for blocks that don't have input fields #3951

Merged
merged 5 commits into from
Dec 13, 2017
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
5 changes: 0 additions & 5 deletions blocks/library/gallery/editor.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
.wp-block-gallery:not( .components-placeholder ) {
margin-right: -16px;
margin-bottom: -16px;
}

.editor-block-list__block[data-type="core/gallery"] .editor-block-list__block-edit {
overflow: hidden;
}
Expand Down
6 changes: 5 additions & 1 deletion blocks/library/gallery/style.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.wp-block-gallery:not( .components-placeholder ) {
margin: -8px;
}

.wp-block-gallery,
.wp-block-gallery.alignleft,
.wp-block-gallery.alignright,
Expand All @@ -6,7 +10,7 @@
flex-wrap: wrap;

.blocks-gallery-image {
margin: 0 16px 16px 0;
margin: 8px;
display: flex;
flex-grow: 1;
flex-direction: column;
Expand Down
11 changes: 11 additions & 0 deletions editor/edit-post/modes/visual-editor/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,17 @@
}
}

// This is a focus style shown for blocks that need an indicator even when in an isEditing state
// like for example an image block that receives arrowkey focus.
.editor-visual-editor .editor-block-list__block:not( .is-selected ) .editor-block-list__block-edit {
box-shadow: 0 0 0 0 $white, 0 0 0 0 $dark-gray-900;
transition: .1s box-shadow;

&:focus {
box-shadow: 0 0 0 1px $white, 0 0 0 3px $dark-gray-900;
}
}

.editor-visual-editor__inserter {
display: flex;
align-items: baseline;
Expand Down