Skip to content

Commit

Permalink
Remove defaulting separator margins to honour theme values
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronrobertshaw committed May 7, 2021
1 parent 40c82c9 commit 0f57553
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/block-library/src/separator/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { withColors, useBlockProps } from '@wordpress/block-editor';
* Internal dependencies
*/
import SeparatorSettings from './separator-settings';
import { MARGIN_CONSTRAINTS, parseUnit } from './shared';

const { __Visualizer: BoxControlVisualizer } = BoxControl;

Expand All @@ -28,7 +27,6 @@ function SeparatorEdit( props ) {
} = props;

const { top, bottom } = style?.spacing?.margin || {};
const marginUnit = parseUnit( top || bottom );
const blockProps = useBlockProps();

return (
Expand All @@ -53,9 +51,8 @@ function SeparatorEdit( props ) {
style={ {
backgroundColor: color.color,
color: color.color,
marginTop: top || MARGIN_CONSTRAINTS[ marginUnit ].min,
marginBottom:
bottom || MARGIN_CONSTRAINTS[ marginUnit ].min,
marginTop: top,
marginBottom: bottom,
} }
/>
</View>
Expand Down

0 comments on commit 0f57553

Please sign in to comment.