Page MenuHomePhabricator

CSS for broken media being applied too broadly
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

image.png (370×543 px, 187 KB)

What should have happened instead?:
figure[typeof~="…"] CSS needs fixing to stop triggering on random elements inside a <figure>. This is why CSS authors use classes, and why the old thumb layout actually used classes. Please just use classes instead, or even data attributes if this is some unexplainable author preference.

Caused by T51097: Use figure and figcaption HTML5 elements when possible (I don’t know exact project for this work, sorry, so I chose Parsoid for simplicity)

Event Timeline

This specific issue is due to: https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/refs/heads/master/resources/src/mediawiki.skinning/content.media-common.less#144
/* Broken media get a span instead */ yeah.. but other stuff exists ;)

That css should probably only apply to typeof=mw:Error

Arlolra triaged this task as Medium priority.
Arlolra moved this task from Needs Triage to Media Structure on the Parsoid board.

Change 771694 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/core@master] Span representing broken media element is only expected as first child

https://gerrit.wikimedia.org/r/771694

Change 771695 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/core@master] Add a class on the span representing the broken media element

https://gerrit.wikimedia.org/r/771695

Change 771726 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/services/parsoid@master] Add a class on the span representing the broken media element

https://gerrit.wikimedia.org/r/771726

Change 771694 merged by jenkins-bot:

[mediawiki/core@master] Span representing broken media element is only expected as first child

https://gerrit.wikimedia.org/r/771694

Change 771726 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Add a class on the span representing the broken media element

https://gerrit.wikimedia.org/r/771726

Change 771695 merged by jenkins-bot:

[mediawiki/core@master] Add a class on the span representing the broken media element

https://gerrit.wikimedia.org/r/771695

TheDJ updated the task description. (Show Details)
Arlolra renamed this task from figure thumb CSS and Video.js do not work together to CSS for broken media being applied too broadly.Mar 21 2022, 5:44 PM
Arlolra updated the task description. (Show Details)

@TheDJ Thanks for reporting those other issues. I filed them as T304343 and T304344, to be investigated separately.

Change 772511 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/extensions/VisualEditor@master] Preserve classes on broken media elements

https://gerrit.wikimedia.org/r/772511

Change 772511 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Preserve classes on broken media elements

https://gerrit.wikimedia.org/r/772511

Change 772884 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.16.0-a2

https://gerrit.wikimedia.org/r/772884

Change 772884 merged by jenkins-bot:

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.16.0-a2

https://gerrit.wikimedia.org/r/772884