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 using left borders for hover + selection states #14145

Merged
merged 38 commits into from
Mar 15, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
7441319
Add thick borders to the left of blocks when they're hovred + selected.
kjellr Feb 27, 2019
583223c
Add thick left border to the page title.
kjellr Feb 27, 2019
021232b
Turn off block toolbar centering for alignwide blocks.
kjellr Feb 27, 2019
3723174
Move block breadcrump to the left side, position it on top of the block.
kjellr Feb 27, 2019
56a8edb
Clean up the block toolbar's left border.
kjellr Feb 27, 2019
77cf04b
Use inset borders on mobile.
kjellr Feb 27, 2019
65fafa4
Prevent inset borders from overlapping with full-bleed content.
kjellr Feb 27, 2019
b9c6259
Use a gray border instead of a blue one on hover.
kjellr Mar 1, 2019
5a076a1
Use a sass variable to define the left block border width
youknowriad Mar 5, 2019
bfa8039
Fix breadcrumb potision for alignfull blocks.
kjellr Mar 5, 2019
8b927e2
Clean up breadcrumb position for left & right-aligned blocks.
kjellr Mar 5, 2019
b958f40
Sync block mover animation up with the hover state.
kjellr Mar 6, 2019
bf457e9
Merge branch 'master' into try/left-block-borders
kjellr Mar 6, 2019
2009f9c
Merge branch 'master' into try/left-block-borders
kjellr Mar 11, 2019
4024095
Darken focused block borders slightly.
kjellr Mar 11, 2019
c1de2bd
Switch to using border instead of outline for block borders.
kjellr Mar 11, 2019
f4468b2
Make this work better with Windows High Contrast Mode
kjellr Mar 11, 2019
7f52808
Adjust z-index of border + breadcrumb for child blocks.
kjellr Mar 12, 2019
a658491
Remove extra z-index rule from the block border.
kjellr Mar 12, 2019
2b41bb8
Remove extra z-index rule from the block border. Minor description cl…
kjellr Mar 12, 2019
bdcedbc
Ensure these styles are compatible with Top Toolbar mode.
kjellr Mar 12, 2019
ea4e64e
Use the new gray value for the mobile toolbar border.
kjellr Mar 12, 2019
130d84f
Add a matching left border to the post permalink area above the title.
kjellr Mar 12, 2019
047e1e4
Improve border position for mobile screens, especially for elements t…
kjellr Mar 12, 2019
8109dfa
Remove a couple unnecessary border updates from 047e1e4.
kjellr Mar 12, 2019
147f151
Clean up bugs related to the hover + focus states of the classic edit…
kjellr Mar 13, 2019
95ae7d9
Classic Block toolbar icon cleanup.
kjellr Mar 13, 2019
30a2801
Reusable Block border cleanup.
kjellr Mar 13, 2019
82560f9
Keeping a light border on the classic block when it's inactive.
kjellr Mar 13, 2019
f6da176
Clean up borders on warning blocks.
kjellr Mar 13, 2019
36b0441
Merge branch 'master' into try/left-block-borders
kjellr Mar 14, 2019
11489aa
Switch to a solid color border color for the permalink box.
kjellr Mar 14, 2019
023dc6c
Merge branch 'master' into try/left-block-borders
kjellr Mar 15, 2019
e0ae429
Update z-index rule name to match the one used in the latest merge.
kjellr Mar 15, 2019
12e5368
Combine full-wide toolbar centering rules.
kjellr Mar 15, 2019
c3b6c3b
Add a darker hover state for dark themes.
kjellr Mar 15, 2019
9b5325f
Remove the left toolbar border on mobile screens.
kjellr Mar 15, 2019
3c744b6
Merge branch 'master' into try/left-block-borders
kjellr Mar 15, 2019
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
Next Next commit
Add thick borders to the left of blocks when they're hovred + selected.
  • Loading branch information
kjellr committed Feb 27, 2019
commit 74413197de5eb6880ff3f196c9588ba45b5aa54a
7 changes: 5 additions & 2 deletions packages/editor/src/components/block-list/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@
content: "";
position: absolute;
outline: $border-width solid transparent;
transition: outline 0.1s linear;
box-shadow: none;
transition: outline 0.1s linear, box-shadow 0.1s linear;
pointer-events: none;

// Go edge-to-edge on mobile.
Expand All @@ -131,15 +132,17 @@
&.is-selected > .editor-block-list__block-edit::before {
// Use opacity to work in various editor styles.
outline: $border-width solid $dark-opacity-light-500;
box-shadow: ($border-width * -3) 0 0 0 $dark-opacity-500;

.is-dark-theme & {
outline-color: $light-opacity-light-500;
box-shadow: ($border-width * -3) 0 0 0 $light-opacity-600;
}
}

// Hover style.
&.is-hovered > .editor-block-list__block-edit::before {
outline: $border-width solid theme(outlines);
box-shadow: ($border-width * -3) 0 0 0 theme(outlines);
}

// Spotlight mode.
Expand Down
4 changes: 3 additions & 1 deletion packages/editor/src/components/block-toolbar/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@
width: 100%;
overflow: auto; // Allow horizontal scrolling on mobile.
position: relative;
transition: border-color 0.1s linear, box-shadow 0.1s linear;

// Allow overflow on desktop.
@include break-small() {
overflow: inherit;
}

// Show a left border on the parent container.
border-left: $border-width solid $light-gray-500;
border-left: $border-width solid $dark-opacity-500;
box-shadow: ($border-width * -2) 0 0 0 $dark-opacity-500;

// The component is born with a border, but we only need some of them.
.components-toolbar {
Expand Down