-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wpcom block editor: hide new Gutenberg preview button (#40388)
* wpcom block editor: hide new Gutenberg preview button * Import new file via editor.scss * Move to calypso folder * Remove leftover css file * Add docs'n'links
- Loading branch information
Showing
2 changed files
with
22 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
@import './features/iframe-bridge-server'; | ||
|
||
// Temporary load this here too to get it work on Atomic sites at least via Calypso | ||
// Will be moved to wpcom folder unless fixed otherwise | ||
@import './features/legacy-preview-button'; |
18 changes: 18 additions & 0 deletions
18
apps/wpcom-block-editor/src/calypso/features/legacy-preview-button.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,18 @@ | ||
/** | ||
* Enforces simple preview button to be always visible and hide more complex preview that was introduced in Gutenberg 7.7 | ||
* | ||
* Doesn't affect editors older than 7.7 | ||
* | ||
* This can be removed once we support scaling down CSS to the new preview | ||
* @link https://github.com/Automattic/wp-calypso/issues/40401 | ||
*/ | ||
@media ( min-width: 600px ) { | ||
// Normally visible on mobile only, make it always visible | ||
.editor-post-preview { | ||
display: inline-flex; | ||
} | ||
// Normally visible on desktops, make it always hidden | ||
.editor-post-preview__dropdown { | ||
display: none; | ||
} | ||
} |