Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

take message-image height from core into account #1210

Merged
merged 3 commits into from
Dec 10, 2019
Merged

Conversation

Simon-Laux
Copy link
Member

@Simon-Laux Simon-Laux commented Dec 10, 2019

It still doesn't completely beautifies the image dimensions, but it doesn't hurt and it revives dead code...
relies on deltachat/deltachat-node#397

@@ -145,7 +145,6 @@
object-fit: cover;
width: auto;
max-width: 100%;
height: 400px;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that was always overwritten by the max height .module-message__img-attachment so I removed it.

@Simon-Laux Simon-Laux changed the title take message height from core into account take message-image height from core into account Dec 10, 2019
@@ -168,7 +165,7 @@ export default function Attachment (props) {
>
<video
className='module-message__img-attachment'
height={Math.min(MAXIMUM_IMG_HEIGHT, height)}
style={{ height: `${Math.min(MAXIMUM_IMG_HEIGHT, height)}px` }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Math.min(MAXIMUM_IMG_HEIGHT, height) + 'px'

@Jikstra Jikstra merged commit 1926eb2 into master Dec 10, 2019
@Jikstra Jikstra deleted the image_sizing branch December 10, 2019 16:05
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.

2 participants