I'm playing with Akkoma again, and it seems fixing MFM is possible \o/
Context in this issue https://akkoma.dev/AkkomaGang/akkoma/issues/381#issuecomment-10681
There's some work to get it all working, and it won't be for today any more, but I have a proof of concept here, so I'm happy with that at least
Deeper explanation:
- We don't add everything to the
styleattribute. Instead we provide a class for what type of MFM and attributes for the MFM attributes. This needs to change in the MfmParser Encoder. - The attributes and classes need to be allowed through the scrubber.
- Some CSS needs to be added to select on the classes and attributes.
Here's the CSS for flip
.StatusBody .mfm-flip {
display: inline-block;
transform: scaleX(-1);
}
.StatusBody .mfm-flip[data-mfm-v] {
display: inline-block;
transform: scaleY(-1);
}
.StatusBody .mfm-flip[data-mfm-v][data-mfm-h] {
display: inline-block;
transform: scale(-1);
}
And here's the HTML representation of the content
<span class="mfm mfm-flip">example</span>
<span class="mfm mfm-flip" data-mfm-v="true">example</span>
<span class="mfm mfm-flip" data-mfm-v="true" data-mfm-h="true">example</span>
There's still the question if these are proper naming conventions, so if someone has strong feelings about it, feel free to speak up and explain!

