Page MenuHomePhabricator

VisualEditor: Let skin variance for styling of <figures> in page content
Closed, ResolvedPublic

Description

The CSS file modules/ve-mw/ce/styles/ve.ce.Node.css implements styling of page content. This styling should be handled by the skin, not by VisualEditor. It looks like someone already figured this out, as most of the styles include TODO notes about merging them into core styles.

As the mobile team is now implementing VE with a mobile-specific skin, now would be the best time to make these fixes. Otherwise, lots of !important overrides will be necessary.


Version: unspecified
Severity: normal

Details

Reference
bz60542

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:51 AM
bzimport set Reference to bz60542.

What's the solution to this issue, though? Re-write MW's skins to work with nodes? 'Cos right now they don't…

"Fix MW's skin system" is a bit of a large tangential bug.

There are two possible solutions:

  1. Make VE's page DOM more similar to the normal rendered page DOM. That way VE won't have to worry about styling them as they'll be styled by existing skin styles. (This seemed to be a solution favored by Trevor.)
  1. Add support for some VE-specific elements to the skins, for example, figure elements. (This seemed to be a solution favored by Roan.)

Probably the best solution is a combination of both. I would be happy to help with solution 2, although it would be nice to get some guidance from the VE team on what approach (or approaches) they would prefer to see (and possibly help implement).

Talked to Roan. He definitely favors solution 2 and gave me some advice on implementing it. Apparently VE already has some skin styling in it (modules/ve-mw/init/styles/), so most of these styles should just be moved there.

Change 112618 had a related patch set uploaded by Kaldari:
Move some skin styling from ve.ce.Node.css to the skin styles

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

Change 112618 merged by jenkins-bot:
Move some skin styling from ve.ce.Node.css to a shared skin css file

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