Skip to content

Commit

Permalink
Adds styles
Browse files Browse the repository at this point in the history
  • Loading branch information
getdave committed Jul 29, 2019
1 parent 379196e commit cc2b5f9
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,17 @@ function ResponsiveBlockControl( props ) {
<fieldset className="block-editor-responsive-block-control">
<legend className="block-editor-responsive-block-control__label">{ legend }</legend>

{ ! isOpen && renderDefaultControl() }
<div className="block-editor-responsive-block-control__inner">
{ ! isOpen && renderDefaultControl() }

{ isOpen && renderResponsiveControl() }
{ isOpen && renderResponsiveControl() }

<ToggleControl
label={ toggleControlLabel }
checked={ isOpen }
onChange={ onToggleResponsive }
/>
<ToggleControl
label={ toggleControlLabel }
checked={ isOpen }
onChange={ onToggleResponsive }
/>
</div>
</fieldset>

);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.block-editor-responsive-block-control {
margin-bottom: $block-padding*2;
border-bottom: 1px solid $light-gray-600;
padding-bottom: $block-padding;

&:last-child {
padding-bottom: 0;
border-bottom: 0;
}
}

.block-editor-responsive-block-control__label {
font-weight: 600;
margin-bottom: 0.6em;
margin-left: -3px; // visual compensation
}

.block-editor-responsive-block-control__inner {
margin-left: -1px; // visual compensation
}
1 change: 1 addition & 0 deletions packages/block-editor/src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
@import "./components/multi-selection-inspector/style.scss";
@import "./components/panel-color-settings/style.scss";
@import "./components/plain-text/style.scss";
@import "./components/responsive-block-control/style.scss";
@import "./components/rich-text/format-toolbar/style.scss";
@import "./components/rich-text/style.scss";
@import "./components/skip-to-selected-block/style.scss";
Expand Down

0 comments on commit cc2b5f9

Please sign in to comment.