Skip to content

Fix style settings for images in media modal#4220

Merged
Gargron merged 2 commits intomastodon:masterfrom
lynlynlynx:shrink-single-image-modal
Jul 16, 2017
Merged

Fix style settings for images in media modal#4220
Gargron merged 2 commits intomastodon:masterfrom
lynlynlynx:shrink-single-image-modal

Conversation

@lynlynlynx
Copy link
Copy Markdown
Contributor

Fix issues described by @sorin-davidoi on #4187

Shrink too wide single-image media modal.

This makes it easy to close single image.

Centering images in media modal.

Set margin:auto to center left sided images in multiple-image media modal.

Fix too wide react-swipeable-view-container

Fix 0067f80 shrinking all react-swipeable-view-container

Change to apply max-width of react-swipeable-view-container only under media-modal.

Fix b30b03b just a typo
Centering small img, canvas, and video in image-loader.
@Gargron Gargron merged commit d1c3e35 into mastodon:master Jul 16, 2017
@sorin-davidoi
Copy link
Copy Markdown
Contributor

@lynlynlynx This breaks the vertical centering of the videos. Though I like the swipe animation, I wonder if it is worth all these CSS problems were are having.
image

@lynlynlynx
Copy link
Copy Markdown
Contributor Author

lynlynlynx commented Jul 16, 2017

@sorin-davidoi Really? Vertical centering multiple videos is applied on my PCs and phones 🤔

Like this screenshot

But, single-video modal is not shrieked yet, I know.. This is because video size is set 80vw*80vh (for making small gifs easier to watch?).

About swipe animations.

I know swipe animation is convenient for phones and it is used in most of apps. But fix all problems under current swipe style is not worthy, I think. I have no idea to fix all of them...

If we continue to use swipe animation for image modal, I think we have to change style like>
Quit fixed left and right buttons, and hover them on images.
or
Use lightbox (or similar one) plugin.

P.S. (memorandum)

I understood why this breaks the vertical centering of the videos, and it can be fixed by quitting fixed video size and change height of single-video react-swipeable-view-container to video height.

@lynlynlynx lynlynlynx deleted the shrink-single-image-modal branch July 17, 2017 16:07
@lynlynlynx lynlynlynx restored the shrink-single-image-modal branch July 17, 2017 16:12
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.

4 participants