Merge pull request #1912 from matrix-org/luke/kill-mimage-fixupheight
Implement slightly magical CSS soln. to thumbnail sizing
This commit is contained in:
commit
7029e9ac74
5 changed files with 153 additions and 246 deletions
|
@ -20,5 +20,29 @@ limitations under the License.
|
|||
}
|
||||
|
||||
.mx_MImageBody_thumbnail {
|
||||
max-width: 100%;
|
||||
}
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.mx_MImageBody_thumbnail_container {
|
||||
// Prevent the padding-bottom (added inline in MImageBody.js) from
|
||||
// affecting elements below the container.
|
||||
overflow: hidden;
|
||||
|
||||
// Make sure the _thumbnail is positioned relative to the _container
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.mx_MImageBody_thumbnail_spinner {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
}
|
||||
|
||||
// Inner img and TintableSvg should be centered around 0, 0
|
||||
.mx_MImageBody_thumbnail_spinner > * {
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
|
|
@ -14,33 +14,11 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
.mx_MStickerBody {
|
||||
display: block;
|
||||
margin-right: 34px;
|
||||
min-height: 110px;
|
||||
padding: 20px 0;
|
||||
.mx_MStickerBody_wrapper {
|
||||
padding: 20px 0px;
|
||||
}
|
||||
|
||||
.mx_MStickerBody_image_container {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.mx_MStickerBody_image {
|
||||
max-width: 100%;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.mx_MStickerBody_image_visible {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.mx_MStickerBody_placeholder {
|
||||
position: absolute;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.mx_MStickerBody_placeholder_invisible {
|
||||
transition: 500ms;
|
||||
opacity: 0;
|
||||
.mx_MStickerBody_tooltip {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue