Skip to content

Commit

Permalink
Rename blocks-image-dimensions → blocks-image__dimensions
Browse files Browse the repository at this point in the history
  • Loading branch information
noisysocks committed Apr 18, 2018
1 parent 33a4bed commit 9674199
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions blocks/library/image/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,14 @@ class ImageBlock extends Component {
onChange={ this.updateImageURL }
/>
) }
<div className="blocks-image-dimensions">
<p className="blocks-image-dimensions__row">
<div className="blocks-image__dimensions">
<p className="blocks-image__dimensions__row">
{ __( 'Image Dimensions' ) }
</p>
<div className="blocks-image-dimensions__row">
<div className="blocks-image__dimensions__row">
<TextControl
type="number"
className="blocks-image-dimensions__width"
className="blocks-image__dimensions__width"
label={ __( 'Width' ) }
value={ width !== undefined ? width : '' }
placeholder={ selectedSize.width }
Expand All @@ -241,7 +241,7 @@ class ImageBlock extends Component {
/>
<TextControl
type="number"
className="blocks-image-dimensions__height"
className="blocks-image__dimensions__height"
label={ __( 'Height' ) }
value={ height !== undefined ? height : '' }
placeholder={ selectedSize.height }
Expand All @@ -250,7 +250,7 @@ class ImageBlock extends Component {
} }
/>
</div>
<div className="blocks-image-dimensions__row">
<div className="blocks-image__dimensions__row">
<ButtonGroup aria-label={ __( 'Image Size' ) }>
{ [ 25, 50, 75, 100 ].map( ( scale ) => {
const scaledWidth = Math.round( selectedSize.width * ( scale / 100 ) );
Expand Down
12 changes: 6 additions & 6 deletions blocks/library/image/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@
}
}

.edit-post-sidebar .blocks-image-dimensions {
.edit-post-sidebar .blocks-image__dimensions {
margin-bottom: 1em;

.blocks-image-dimensions__row {
.blocks-image__dimensions__row {
display: flex;
justify-content: space-between;

.blocks-image-dimensions__width,
.blocks-image-dimensions__height {
.blocks-image__dimensions__width,
.blocks-image__dimensions__height {
margin-bottom: 0.5em;

// Fix the text and placeholder text being misaligned in Safari
Expand All @@ -114,11 +114,11 @@
}
}

.blocks-image-dimensions__width {
.blocks-image__dimensions__width {
margin-right: 5px;
}

.blocks-image-dimensions__height {
.blocks-image__dimensions__height {
margin-left: 5px;
}
}
Expand Down

0 comments on commit 9674199

Please sign in to comment.