Merge pull request #1784 from warrickct/transparent-pngs

Transparent pngs
pull/1792/head
Audric Ackermann 4 years ago committed by GitHub
commit 29e3b6417c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -130,26 +130,19 @@
border-radius: $session_message-container-border-radius; border-radius: $session_message-container-border-radius;
overflow: hidden; overflow: hidden;
// no background by default for the attachment container // no background by default for the attachment container
@include themify($themes) {
background: themed('inboxBackground');
}
} }
.module-message--outgoing { .module-message--outgoing {
.module-message__attachment-container--with-content-below, .module-message__attachment-container--with-content-below,
.module-message__attachment-container--with-content-above { .module-message__attachment-container--with-content-above {
@include themify($themes) { background: none;
background: themed('sentMessageBackground');
}
} }
} }
.module-message--incoming { .module-message--incoming {
.module-message__attachment-container--with-content-below, .module-message__attachment-container--with-content-below,
.module-message__attachment-container--with-content-above { .module-message__attachment-container--with-content-above {
@include themify($themes) { background: none;
background: themed('receivedMessageBackground');
}
} }
} }
@ -1284,7 +1277,7 @@
.module-image { .module-image {
overflow: hidden; overflow: hidden;
background-color: $color-white; background: none;
position: relative; position: relative;
display: inline-block; display: inline-block;
margin: 1px; margin: 1px;

@ -25,8 +25,14 @@
} }
&__container--incoming { &__container--incoming {
@include themify($themes) { &--opaque {
background: themed('receivedMessageBackground'); @include themify($themes) {
background: themed('receivedMessageBackground');
}
}
&--transparent {
background: none;
} }
.module-message__text { .module-message__text {
@ -49,8 +55,14 @@
} }
&__container--outgoing { &__container--outgoing {
@include themify($themes) { &--opaque {
background: themed('sentMessageBackground'); @include themify($themes) {
background: themed('sentMessageBackground');
}
}
&--transparent {
background: none;
} }
.module-message__text { .module-message__text {

@ -401,7 +401,7 @@
// Module: Image // Module: Image
.module-image { .module-image {
background-color: $color-black; background: none;
} }
.module-image__border-overlay { .module-image__border-overlay {

@ -781,7 +781,10 @@ class MessageInner extends React.PureComponent<MessageRegularProps, State> {
<div <div
className={classNames( className={classNames(
'module-message__container', 'module-message__container',
`module-message__container--${direction}` `module-message__container--${direction}`,
isShowingImage
? `module-message__container--${direction}--transparent`
: `module-message__container--${direction}--opaque`
)} )}
style={{ style={{
width: isShowingImage ? width : undefined, width: isShowingImage ? width : undefined,

Loading…
Cancel
Save