Skip to content

Conversation

@adamwathan
Copy link
Member

Inspired by what's being done in the CSS Remedy project, this PR makes replaced elements display: block by default, and ensures images and videos don't overflow their parent containers while preserving their intrinsic aspect ratio.

In the rare case that you want these elements to be display: inline or another display value, you can of course specify that with a utility.

There is a chance this may cause weirdness with embedded widgets that expect certain default browser styles, but I tested it with some complex embedded Google Maps examples and saw no negative consequences, so I'm inclined to believe it's probably safe.

@adamwathan adamwathan mentioned this pull request Mar 15, 2019
@adamwathan adamwathan merged commit b1a8f27 into next Mar 15, 2019
@adamwathan adamwathan deleted the make-replaced-elements-block branch March 15, 2019 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants