0
0
Fork 0

Fix media spoiler design (#6507)

- 4px rounded corners on media attachments
- Better colors/contrast for CW/media spoiler on public pages
- Fix vertical alignment of "Show more" button
- Fix layout jump when unhiding standalone media
This commit is contained in:
Eugen Rochko 2018-02-19 02:39:18 +01:00 committed by GitHub
parent bb26cdda24
commit cbb69d41f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 22 deletions

View file

@ -227,12 +227,8 @@ export default class MediaGallery extends React.PureComponent {
const style = {};
if (this.isStandaloneEligible()) {
if (!visible && width) {
// only need to forcibly set the height in "sensitive" mode
if (width) {
style.height = width / this.props.media.getIn([0, 'meta', 'small', 'aspect']);
} else {
// layout automatically, using image's natural aspect ratio
style.height = '';
}
} else {
// crop the image