Page MenuHomePhabricator

Support dynamic columns directly in wikitext
Open, LowPublic

Description

Problem: We have multiple methods of formatting text into columns. Most of these methods break on mobile displays. Some of them break for desktop displays (it looks good on my screen, but not yours). Several of them get mis-used and produce invalid HTML. If you aren't at a wiki that has imported or created those templates (or if you can't find them), then your choice is to add the HTML codes directly or live without columns.

Proposal: Let's actually do this right. Instead of adding complicated HTML or a series of templates that inserts various bits of HTML, let's do this in wikitext, with a simple wikitext-style code like "[|" to start columns and "|]" to end it. (This suggestion mirrors table syntax, so remembering it would be easy for experienced editors.) Give it some sensible default that works for most cases, like a 30em minimum width and a maximum of three columns, and (probably/eventually) let people change it.

Related discussion: https://en.wikipedia.org/w/index.php?oldid=655461344#Columns

Related Objects

Event Timeline

Whatamidoing-WMF raised the priority of this task from to Needs Triage.
Whatamidoing-WMF updated the task description. (Show Details)
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 10 2015, 6:49 PM
Aklapper triaged this task as Low priority.Apr 16 2015, 7:05 PM

I don't think it is too hard using inline CSS; it is the most straightforward approach. Personally, I would choose [| and |] as column markers, with | (and |-) as optional column break points. That should not create a conflict with existing markup. HTML-wise, they should translate to somthing like:

wiki syntaxHTML outputRemarks
[| cols="3" colwidth="30em"<div style="column-count: 3; column-width: 30em;">New columns context
|- colspan="2" (within columns context)<div style="break-before: page; column-span: 2;"></div>New "row" context; move to first column
| (within columns context)<div style="break-before: column;"></div>Force column break
|]</div>End columns

All parameters are optional; I echo the defaults of 30em and 3 cols. The CSS requires (still) the use of -moz- and -webkit- prefixes, so using classes may be preferable.

See also: http://www.w3.org/TR/css3-multicol/

matmarex set Security to None.
Elitre added a subscriber: Elitre.Sep 22 2016, 4:50 PM