Page MenuHomePhabricator

SVG objects do not express height attribute correctly
Open, Needs TriagePublicBUG REPORT

Description

Environment:

  1. Metrolook 7.0 alpha 2 (48c1b49)
  2. MediaWiki 1.34.1 (3bdc458)
  3. Page Forms Page Forms 4.8
  4. ref: https://emw-meza.site/fbtest/Special:Version

Issue Description:
Metrolook interprets the ("height","100%") attribute of a mermaid SVG object to mean 100% of the current screen size rather than just 100% of the object size as is done in all other skins.

I have set-up a live example of this problematic behavior at:

https://emw-meza.site/fbtest/Metrolook_Mermaid_issue

Steps to Reproduce:

  1. visit: https://emw-meza.site/fbtest/Metrolook_Mermaid_issue
  2. observe that Metrolook CSS automatically scales the SVG object to 100% of the size of the screen resulting in uneccessary white-space above and below the SVG itself.

Expected Results:
It is expected that the (mermaidjs) SVG object would only occupy the vertical space needed by visible part of the SVG as it is with the vector as seen here:

https://emw-meza.site/fbtest/index.php?title=Metrolook_Mermaid_issue&useskin=vector

Event Timeline

Aklapper added a subscriber: Immewnity.

Resetting assignee as it is up to each person what they plan to [not] work on.

Is there anyone who is willing give me some advice on how to debug/resolve this myself?

I don't know if this is a bug in Extension:Mermaid or in SKin:Metrolook, but I was able to solve this problem by adding some custom css to Mediawiki:Common.css. Ref: https://www.mediawiki.org/wiki/Topic:Vm95wz4fb17an7rw