Last modified: 2013-12-12 18:47:41 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T55436, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 53436 - VisualEditor: Style Parsoid's <figure>s to look like MediaWiki's <div class="thumb">s rather than replacing them
VisualEditor: Style Parsoid's <figure>s to look like MediaWiki's <div class="...
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
Technical Debt (Other open bugs)
unspecified
All All
: High major
: VE-deploy-2013-12-19
Assigned To: Moriel Schottlender
:
Depends on:
Blocks: 51245 50910
  Show dependency treegraph
 
Reported: 2013-08-27 23:15 UTC by James Forrester
Modified: 2013-12-12 18:47 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description James Forrester 2013-08-27 23:15:22 UTC
Right now VisualEditor transforms the HTML Parsoid gives us (which is nicely-structured <figure>s) into the mess of <div>s that MediaWiki's PHP parser throws out (up?). This is so that VE's rendered HTML magically inherits the styling that the images get on the read page, which includes

Instead, we should just style these using CSS. However, this is difficult because the styles are specific to <div>s with known classes (and Parsoid's HTML has no <div>s), and is often over-ridden in wiki- or user-specific CSS (e.g. Wikia's sites' skins, or that on Cherokee Wikipedia).

From quickly playing around, a basic CSS style that implements core-MW would be something like:

figure
	float: right;
	border: 1px solid #CCC;
	padding: 3px;
	width: 172px;
	background: #FAFAFA;
	font-size: 13px;
	margin-right: 1.2em;

img
	border: 1px solid #CCC;

figcaption
	padding: 3px;
	font-size: smaller;
	line-height: 1.4em;
	width: 15em;
	margin: 2px 0px;
	padding-top: 0px;
Comment 1 Gerrit Notification Bot 2013-12-05 03:24:05 UTC
Change 93417 had a related patch set uploaded by Jforrester:
Render CE MWBlockImageNodes as styled <figure>s

https://gerrit.wikimedia.org/r/93417
Comment 2 Gerrit Notification Bot 2013-12-12 18:47:14 UTC
Change 93417 merged by jenkins-bot:
Render CE MWBlockImageNodes as styled <figure>s

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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links