From 1083d3300085091d34b2b75e91235db42a1bb897 Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Mon, 4 Mar 2024 09:07:00 -0500 Subject: [PATCH] Speficy color and font for files which start with mx_M Signed-off-by: Suguru Hirahara --- .../consistency__TextEvent/index.pcss | 1 + .../views/rooms/_EventTile.pcss | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/res/css/_sc/feature-improvement/consistency__TextEvent/index.pcss b/res/css/_sc/feature-improvement/consistency__TextEvent/index.pcss index 14db2c9a9a79..843b0747c515 100644 --- a/res/css/_sc/feature-improvement/consistency__TextEvent/index.pcss +++ b/res/css/_sc/feature-improvement/consistency__TextEvent/index.pcss @@ -23,5 +23,6 @@ limitations under the License. @define-mixin consistency__TextEvent { @mixin EventTile_line_color; @mixin EventTile_line_font; + @mixin EventTile_line_M; @mixin DecryptionFailureBody; } diff --git a/res/css/_sc/feature-improvement/consistency__TextEvent/views/rooms/_EventTile.pcss b/res/css/_sc/feature-improvement/consistency__TextEvent/views/rooms/_EventTile.pcss index 60aa747cf4fd..3f08d77b4fe0 100644 --- a/res/css/_sc/feature-improvement/consistency__TextEvent/views/rooms/_EventTile.pcss +++ b/res/css/_sc/feature-improvement/consistency__TextEvent/views/rooms/_EventTile.pcss @@ -57,3 +57,23 @@ limitations under the License. } } } + +/* Speficy color and font for files which start with mx_M */ +@define-mixin EventTile_line_M { + .mx_EventTile_line { + [class^="mx_M"] { + /* Unset opacity of mx_MNoticeBody and mx_MjolnirBody */ + opacity: unset; + + /* For mx_MNoticeBody */ + /* See #fdroid:f-droid.org/$jrVZxdvY2NqNYvXigQ_sTZNeOadpOuFGFsraHy8GR3Y for an example */ + .mx_EventTile_body.markdown-body { + --font: var(--cpd-font-body-sm-regular); /* Replace with js when needed */ + + /* !important flag is required as it is used on the upstream */ + color: $tertiary-content !important; + font: var(--font) !important; + } + } + } +}