forked from WordPress/gutenberg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Block editor: separate content styles for the iframe (WordPress#44298)
- Loading branch information
Showing
18 changed files
with
166 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
20 changes: 20 additions & 0 deletions
20
packages/block-editor/src/components/block-draggable/content.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// This creates a "slot" where the block you're dragging appeared. | ||
// We use !important as one of the rules are meant to be overriden. | ||
.block-editor-block-list__layout .is-dragging { | ||
background-color: currentColor !important; | ||
opacity: 0.05 !important; | ||
border-radius: $radius-block-ui !important; | ||
|
||
// Disabling pointer events during the drag event is necessary, | ||
// lest the block might affect your drag operation. | ||
pointer-events: none !important; | ||
|
||
// Hide the multi selection indicator when dragging. | ||
&::selection { | ||
background: transparent !important; | ||
} | ||
|
||
&::after { | ||
content: none !important; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
packages/block-editor/src/components/block-preview/content.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// Hide inserter from previews. | ||
.block-editor-block-preview__content-iframe .block-list-appender { | ||
display: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
42 changes: 42 additions & 0 deletions
42
packages/block-editor/src/components/rich-text/content.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
.rich-text { | ||
[data-rich-text-placeholder] { | ||
pointer-events: none; | ||
} | ||
|
||
[data-rich-text-placeholder]::after { | ||
content: attr(data-rich-text-placeholder); | ||
// Use opacity to work in various editor styles. | ||
// We don't specify the color here, because blocks or editor styles might provide their own. | ||
opacity: 0.62; | ||
} | ||
|
||
&:focus { | ||
// Removes outline added by the browser. | ||
outline: none; | ||
|
||
[data-rich-text-format-boundary] { | ||
border-radius: 2px; | ||
} | ||
} | ||
} | ||
|
||
.block-editor-rich-text__editable { | ||
> p:first-child { | ||
margin-top: 0; | ||
} | ||
} | ||
|
||
// Captions may have lighter (gray) text, or be shown on a range of different background luminosites. | ||
// To ensure legibility, we increase the default placeholder opacity to ensure contrast. | ||
figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before { | ||
opacity: 0.8; | ||
} | ||
|
||
[data-rich-text-script] { | ||
display: inline; | ||
|
||
&::before { | ||
content: "</>"; | ||
background: rgb(255, 255, 0); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
@import "./components/block-list/content.scss"; | ||
@import "./components/block-list-appender/content.scss"; | ||
@import "./components/block-content-overlay/content.scss"; | ||
@import "./components/block-draggable/content.scss"; | ||
@import "./components/block-preview/content.scss"; | ||
@import "./components/default-block-appender/content.scss"; | ||
@import "./components/inner-blocks/content.scss"; | ||
@import "./components/media-placeholder/content.scss"; | ||
@import "./components/plain-text/content.scss"; | ||
@import "./components/rich-text/content.scss"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,5 @@ | |
"customClassName": false, | ||
"html": false, | ||
"inserter": false | ||
}, | ||
"editorStyle": "wp-block-editor" | ||
} | ||
} |