-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Make the editor canvas friendly towards colored backgrounds #6406
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
.components-draggable__clone { | ||
& > .editor-block-list__block > .editor-block-list__block-draggable { | ||
background: $white; | ||
background: $white; // @todo: ensure this works with themes that invert the color | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Has this been done? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, and I'm not sure that this can be done. At least I'm open to ideas here. The thing is, the draggable clone has to have a background, or you can see the text below through it. It would be nice if we could eyedrop the color of the |
||
box-shadow: $shadow-popover; | ||
|
||
@include break-small { | ||
|
@@ -33,9 +33,15 @@ | |
right: 0; | ||
bottom: 0; | ||
left: 0; | ||
background-color: $light-gray-200; | ||
visibility: hidden; | ||
|
||
// use opacity to work in various editor styles | ||
background-color: $dark-opacity-light-200; | ||
|
||
.is-dark-theme & { | ||
background-color: $light-opacity-light-200; | ||
} | ||
|
||
@include break-small { | ||
margin: 0 48px; | ||
} | ||
|
@@ -57,7 +63,7 @@ | |
} | ||
|
||
|
||
cursor: move;/* Fallback for IE/Edge < 14 */ | ||
cursor: move; // Fallback for IE/Edge < 14 | ||
cursor: grab; | ||
} | ||
|
||
|
@@ -168,16 +174,26 @@ | |
top: 10px; | ||
} | ||
|
||
&.is-selected > .editor-block-mover:before, | ||
&.is-hovered > .editor-block-mover:before { | ||
border-right: 1px solid $light-gray-500; | ||
right: 0; | ||
|
||
// use opacity to work in various editor styles | ||
border-right: 1px solid $dark-opacity-light-500; | ||
|
||
.is-dark-theme & { | ||
border-right-color: $light-opacity-light-500; | ||
} | ||
} | ||
|
||
&.is-selected > .editor-block-settings-menu:before, | ||
&.is-hovered > .editor-block-settings-menu:before { | ||
border-left: 1px solid $light-gray-500; | ||
left: 0; | ||
|
||
// use opacity to work in various editor styles | ||
border-left: 1px solid $dark-opacity-light-500; | ||
|
||
.is-dark-theme & { | ||
border-left-color: $light-opacity-light-500; | ||
} | ||
} | ||
|
||
&.is-typing .editor-block-list__empty-block-inserter, | ||
|
@@ -213,7 +229,12 @@ | |
|
||
// focused block-style | ||
&.is-selected > .editor-block-list__block-edit:before { | ||
outline: 1px solid $light-gray-500; | ||
// use opacity to work in various editor styles | ||
outline: 1px solid $dark-opacity-light-500; | ||
|
||
.is-dark-theme & { | ||
outline-color: $light-opacity-light-500; | ||
} | ||
} | ||
|
||
/** | ||
|
@@ -235,6 +256,13 @@ | |
|
||
&.is-multi-selected .editor-block-list__block-edit:before { | ||
background: $blue-medium-highlight; | ||
|
||
// use opacity to work in various editor styles | ||
mix-blend-mode: multiply; | ||
|
||
.is-dark-theme & { | ||
mix-blend-mode: soft-light; | ||
} | ||
} | ||
|
||
/** | ||
|
@@ -250,7 +278,12 @@ | |
} | ||
|
||
&.is-shared > .editor-block-list__block-edit:before { | ||
outline: 1px dashed $light-gray-500; | ||
// use opacity to work in various editor styles | ||
outline: 1px dashed $dark-opacity-light-500; | ||
|
||
.is-dark-theme & { | ||
outline-color: $light-opacity-light-500; | ||
} | ||
} | ||
|
||
/** | ||
|
@@ -501,11 +534,6 @@ | |
margin: $item-spacing; | ||
cursor: move;/* Fallback for IE/Edge < 14 */ | ||
cursor: grab; | ||
|
||
.editor-inserter__toggle { | ||
color: $dark-gray-300; | ||
margin: 4px 0 0 -4px; // align better with text blocks | ||
} | ||
} | ||
|
||
.editor-block-list__insertion-point { | ||
|
@@ -652,10 +680,18 @@ | |
|
||
.editor-block-contextual-toolbar .editor-block-toolbar, | ||
.editor-block-list__breadcrumb .components-toolbar { | ||
border: 1px solid $light-gray-500; | ||
width: 100%; | ||
background: $white; | ||
|
||
// use opacity to work in various editor styles | ||
background-clip: padding-box; | ||
box-sizing: padding-box; | ||
border: 1px solid $dark-opacity-light-500; | ||
|
||
.is-dark-theme & { | ||
border-color: $light-opacity-light-500; | ||
} | ||
|
||
// this prevents floats from messing up the position | ||
position: absolute; | ||
left: 0; | ||
|
@@ -665,16 +701,15 @@ | |
right: 0; | ||
} | ||
|
||
// remove stacked borders in inline toolbar | ||
> div:first-child { | ||
margin-left: -1px; | ||
} | ||
|
||
@include break-small() { | ||
width: auto; | ||
} | ||
} | ||
|
||
.editor-block-contextual-toolbar .editor-block-toolbar { | ||
border-bottom: none; | ||
} | ||
|
||
.editor-block-list__breadcrumb .components-toolbar { | ||
padding: 0px 12px; | ||
line-height: $block-toolbar-height - 1px; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not certain why this change was required but it broke the PlainText inside blocks (code block for instance). It should be fixed by this though #6844