Skip to content

Commit

Permalink
Don't set inline styles on an image's <figure>
Browse files Browse the repository at this point in the history
Let the <figure> get its width from the fit-content rule that was added
in 2dc9fb3.
  • Loading branch information
noisysocks committed Apr 16, 2018
1 parent 43c6e08 commit 0fd7a95
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions blocks/library/image/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ class ImageBlock extends Component {
'is-focused': isSelected,
} );

const figureStyle = width ? { width } : {};
const isResizable = [ 'wide', 'full' ].indexOf( align ) === -1 && ( ! viewPort.isExtraSmall() );

// Disable reason: Each block can be selected by clicking on it
Expand Down Expand Up @@ -287,7 +286,7 @@ class ImageBlock extends Component {
</PanelBody>
</InspectorControls>
),
<figure key="image" className={ classes } style={ figureStyle }>
<figure key="image" className={ classes }>
<ImageSize src={ url } dirtynessTrigger={ align }>
{ ( sizes ) => {
const {
Expand Down

0 comments on commit 0fd7a95

Please sign in to comment.