Skip to content

Commit

Permalink
Remove media query simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Mar 26, 2020
1 parent 3dab5d7 commit b49c215
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 161 deletions.
9 changes: 0 additions & 9 deletions packages/block-editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -483,15 +483,6 @@ _Related_

Undocumented declaration.

<a name="useSimulatedMediaQuery" href="#useSimulatedMediaQuery">#</a> **useSimulatedMediaQuery**

Function that manipulates media queries from stylesheets to simulate a given viewport width.

_Parameters_

- _marker_ `string`: CSS selector string defining start and end of manipulable styles.
- _width_ `number`: Viewport width to simulate.

<a name="Warning" href="#Warning">#</a> **Warning**

Undocumented declaration.
Expand Down
1 change: 0 additions & 1 deletion packages/block-editor/src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,3 @@ export { default as WritingFlow } from './writing-flow';
*/

export { default as BlockEditorProvider } from './provider';
export { default as useSimulatedMediaQuery } from './use-simulated-media-query';

This file was deleted.

6 changes: 0 additions & 6 deletions packages/edit-post/src/components/resize-canvas/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/**
* WordPress dependencies
*/
import { useSimulatedMediaQuery } from '@wordpress/block-editor';
import { useSelect } from '@wordpress/data';
import { useEffect, useState } from '@wordpress/element';

Expand Down Expand Up @@ -61,10 +60,5 @@ export function useResizeCanvas() {
}
};

useSimulatedMediaQuery(
'resizable-editor-section',
getCanvasWidth( deviceType )
);

return contentInlineStyles( deviceType );
}
7 changes: 2 additions & 5 deletions packages/edit-post/src/components/visual-editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,8 @@ function VisualEditor() {
return (
<>
<Popover.Slot name="block-toolbar" />
<IFrame className="edit-post-visual-editor">
<BlockSelectionClearer
className="editor-styles-wrapper"
style={ inlineStyles }
>
<IFrame className="edit-post-visual-editor" style={ inlineStyles }>
<BlockSelectionClearer className="editor-styles-wrapper">
<VisualEditorGlobalKeyboardShortcuts />
<MultiSelectScrollIntoView />
<Typewriter>
Expand Down

0 comments on commit b49c215

Please sign in to comment.