This is a proposal for Mathematics layout in CSS. It is based on the Presentation Markup of MathML.
This document forms one part of a modular set of Working Drafts which will, when complete, define the next level of CSS.
The W3C Membership and other interested parties are invited to review this public specification and report implementation experience. Please send comments to the publicly archived list email@example.com (archive). We welcome experimental implementation experience reports, although the CSS Working Group will not allow early implementation to constrain its ability to make changes to this specification prior to final release.
This Working Draft may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use W3C Working Drafts as reference material or to cite them as other than "work in progress". A list of current W3C Recommendations and other technical documents can be found at http://www.w3.org/TR.
The goal of this draft is to describe a CSS syntax for Mathematics layout that is compatible with Presentation MathML, and also with proposed Math Formatting Objects for XSL.
Adding Mathematical support to CSS may be compared with adding table support. Firstly some new display properties (corresponding to new XSL Formatting objects) must be added to support the various layout schema required for mathematics. (Supercripts, fractions, fences, etc.) For CSS these are realised as new values for the 'display' property. Secondly new properties are defined to control the layout of elements in each of these layout schema.
Needs changing to have less visually-oriented language.
The CSS model does not require that the document language include elements that correspond to each of these components. For document languages (such as XML applications) that do not have pre-defined table elements, authors must map document language elements to table elements; this is done with the 'display' property. The following 'display' values assign table semantics to an arbitrary element:
math-operator could possibly be combined with math-token, but has different default spacing behavior, and stretchy character behaviour.
MathML mspace covered by other CSS properties<.p>
The MathML ms element may be simulated as math-text with suitable properties set to select monospaced font and to insert " (or other characters specified by the MathML mquot and lquot attributes).
MathML style element just a handle on which to hook CSS properies.
MathML mphantom is obtainable by setting standard CSS properties
MathML mpadded is obtainable by setting standard CSS properties
In MathML an mfenced is always strictly equivalent to an mrow and one or more mo operators, however it may make sense to retain the fenced display property in CSS as the re-arrangement to the equivalent mrow may not be possible to specify in CSS.
mtable probably does not need a CSS equivalent given the inline-table model if the table model can by extended to support malignmark constructs.
maction probably needs integrating and/or reworking to fit current thinking on event models
The following list is not complete or fully worked out.
In an element of display class math-fenced the stretch character to use for open and close fence are specified in the document source as attributes. I am not sure of the best way to express this in CSS