https://bugzilla.wikimedia.org/show_bug.cgi?id=53436

       Web browser: ---
            Bug ID: 53436
           Summary: VisualEditor: Style Parsoid's <figure>s to look like
                    MediaWiki's <div class="thumb">s rather than replacing
                    them
           Product: VisualEditor
           Version: unspecified
          Hardware: All
                OS: All
            Status: ASSIGNED
          Severity: major
          Priority: Unprioritized
         Component: Technical Debt
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]
    Classification: Unclassified
   Mobile Platform: ---

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;

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to