Make shared-components tiles render identically outside Element Web - # 2 (#33485)

* Adding correct layout/density attributes to unit tests

* Move app/web styling to FileBodyView

* Unify styling for MediaBody wrapped components

* Fix prettier issues

* Update app/web snapshots

* Wrap file download and audio loading states in MediaBody

* Revert the MediaBody for download buttons.

* Revert changes for MediaBody wrappers

* Updated snaphots for MediaBody components
This commit is contained in:
rbondesson
2026-05-18 05:59:03 +00:00
committed by GitHub
parent 7fe8cdafe0
commit 297ad9bb8d
33 changed files with 63 additions and 89 deletions
@@ -1,27 +0,0 @@
/*
Copyright 2024 New Vector Ltd.
Copyright 2015-2021 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details.
*/
.mx_MFileBody [data-type="download"] {
height: var(--cpd-space-9x);
& object {
margin-left: -16px;
padding-right: 4px;
margin-top: -4px;
vertical-align: middle;
pointer-events: none;
}
}
.mx_MFileBody [data-type="info"] {
svg {
color: $secondary-content !important;
background-color: $system !important;
border-radius: 20px !important;
}
}
@@ -1,24 +0,0 @@
/*
Copyright 2024 New Vector Ltd.
Copyright 2021 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details.
*/
/* A "media body" is any file upload looking thing, apart from images and videos (they */
/* have unique styles). */
.mx_MediaBody {
background-color: $panels;
border-radius: 12px;
max-width: 243px; /* use max-width instead of width so it fits within right panels */
color: $secondary-content;
font: var(--cpd-font-body-md-regular);
line-height: $font-24px;
}
.mx_MAudioBody > .mx_MediaBody {
border-radius: var(--MBody-border-radius);
}