Use FEP-c16b: Formatting MFM functions #410

Open
ilja wants to merge 11 commits from ilja/akkoma-fe:use_fep-c16b_formatting_mfm_functions into develop
2 changed files with 29 additions and 0 deletions
Showing only changes of commit ba4ae5badb - Show all commits

View file

@ -12,6 +12,7 @@
} }
.emoji { .emoji {
--_still_image-label-scale: 0.5; --_still_image-label-scale: 0.5;
/* NOTE: We also use this value hard-coded in src/components/status_content/mfm.scss */
--emoji-size: 38px; --emoji-size: 38px;
} }

View file

@ -63,14 +63,35 @@
.mfm-x2 { .mfm-x2 {
--mfm-zoom-size: 200%; --mfm-zoom-size: 200%;
/*
emoji is normally 38px (see src/components/status_body/status_body.scss
we want x2 to be ~100px, so we enlarge (100px/38px) ~= 2.63
*/
.emoji {
--mfm-emoji-zoom-size: 2.63;
}
} }
.mfm-x3 { .mfm-x3 {
--mfm-zoom-size: 400%; --mfm-zoom-size: 400%;
/*
emoji is normally 38px (see src/components/status_body/status_body.scss
we want x3 to be ~150px, so we enlarge (150px/38px) ~= 3.95
*/
.emoji {
--mfm-emoji-zoom-size: 3.95;
}
} }
.mfm-x4 { .mfm-x4 {
--mfm-zoom-size: 600%; --mfm-zoom-size: 600%;
/*
emoji is normally 38px (see src/components/status_body/status_body.scss
we want x4 to be ~200px, so we enlarge (200px/38px) ~= 5.26
*/
.emoji {
--mfm-emoji-zoom-size: 5.26;
}
} }
.mfm-x2, .mfm-x2,
@ -78,6 +99,10 @@
.mfm-x4, .mfm-x4,
.mfm-tada { .mfm-tada {
font-size: var(--mfm-zoom-size); font-size: var(--mfm-zoom-size);
.emoji {
--nested-emoji-base-size: calc(var(--emoji-size) * var(--mfm-emoji-zoom-size));
height: var(--nested-emoji-base-size);
}
.mfm-x2, .mfm-x2,
.mfm-x3, .mfm-x3,
@ -85,6 +110,9 @@
.mfm-tada { .mfm-tada {
/* only half effective */ /* only half effective */
font-size: calc(var(--mfm-zoom-size) / 2 + 50%); font-size: calc(var(--mfm-zoom-size) / 2 + 50%);
.emoji {
height: calc(var(--nested-emoji-base-size) * var(--mfm-emoji-zoom-size) / 2);
}
.mfm-x2, .mfm-x2,
.mfm-x3, .mfm-x3,