CSS Writing Modes in January 2015
This report is prepared by fantasai.
It summarizes the status of
CSS Writing Modes Level 3
in January 2015.
Table of Contents
- Background: the W3C Process
- Status of CSS Writing Modes
- Timeline of Completion
- Priorities
Background: the W3C Process
The W3C Recommendation Track Process
proceeds through three stages with two short transitions in between:
- Working Draft
- This is the design phase
of the specification.
In this phase, the Working Group designs the technology,
collecting feedback and republishing the specification as necessary
to incorporate the feedback.
- Last Call Working Draft
- This is the transition from Working Draft to Candidate Recommendation.
The Working Group must demonstrate that it has solicited wide review by stakeholders
and that it has addressed all their feedback.
Note: This stage has been dropped in the most recent Process revision.
- Candidate Recommendation
- This is the testing phase.
In this phase, the Working Group is testing the specification.
To do this it creates a test suite and collects implementation feedback.
If the tests and the implementation and the specification all match,
then the specification is good and can advance.
Usually this experience reveals many bugs:
in the implementations, in the tests, and in the specification itself.
- Proposed Recommendation
- This is the transition from Candidate Recommendation to Recomendation.
The Working Group must demonstrate that the specification is sufficiently stable, precise, and reliable
by showing two independent implementations
who can each pass the test suite completed during the Candidate Recommendation phase.
- Recommendation
- This is the completed phase.
In this phase, a good Working Group will maintain errata,
but most changes are expected to be minor.
a specification enters this phase
once the specification, test suite, and implementation reports
have been reviewed by W3C (during the Proposed Recommendation phase).
Status of CSS Writing Modes
CSS Writing Modes is in the Candidate Recommendation phase.
Right now, we have:
- An untested specification
- An incomplete, mostly-unreviewed test suite
- Several incompatible and/or incomplete implementations:
Blink/Webkit (Chrome/Safari), Gecko (Firefox), Trident (IE), Antenna House Formatter
To complete the Candidate Recommendation phase, we will need:
- A specification whose errors,
as revealed by the process of building the test suite and implementations,
have all been addressed.
- A test suite that is complete, correct, and up-to-date (with respect to error corrections).
- A completed implementation report showing at least two passing implementations for each test.
To reach this goal, we must
- Correct all errors in the specification,
as they are found by test writers and layout engine implementers
-
Complete the test suite and assess its correctness.
-
Fix all the bugs found in implementations,
or at least, fix enough bugs that two implementations are correct for each feature.
-
Create a final implementation report.
Timeline of Completion
Contributions from Japan will be able to help all of these move forward.
However, reaching Proposed Recommendation will take time,
and will not be possible by the end of March 2015.
This is because, even if we complete the test suite by then,
the test suite will have revealed many bugs in implementations
and probably also errors in the specification.
(There have already been two specification errors reported
through the efforts of GĂ©rard Talbot to create tests,
in addition to bugs reported in implementations.)
A good goal for March 2015, however,
can be the completion of a Beta test suite.*
By this I mean the test suite will have
good coverage of the entire specification,
and any remaining gaps are very specific, limited, and precisely identified.
We can then use this test suite
to identify the implementation bugs,
test suite bugs,
and specification errors.
* It may be a problem to complete the testing of text-combine-upright
due to lack of font experts.
The next phase of CSS Writing Modes development
would then be fixing the bugs in implementations,
correcting the errors in the specification,
updating the test suite
(to fill in any identified gaps,
to match corrections to the specification,
and to fix any errors found in the tests themselves).
It is possible, though aggressive, to complete this effort by TPAC 2015;
however, success will depend on the complexity of the bugs found.
Layout bugs
(especially interactions among layout features,
for example mixing table layout and vertical text and horizontal text all together)
can be very complex.
Nonetheless, in every case,
the usability of CSS Writing Modes will improve.
Even if not all of the bugs are fixed,
and Proposed Recommendation is therefore not attained,
by making more and more of CSS Writing Modes implementations compliant,
we will make more and more of the layouts it enables possible.
And therefore in a very real sense,
if not in a bureaucratic one,
CSS Writing Modes will have progressed due to these efforts.
Prioritization of Work
To help us prioritize the most helpful and important implementation fixes for Writing Modes,
we will need to prioritize testing in those areas
and also communicate the importance of such features
and the nature of the bugs we find
to the implementation development teams affected.
For the Middle East, the most important section is
Chapter 2: Inline Direction and Bidirectionality.
For Europe and America, the most important features are writing-mode
(both vertical-rl
and vertical-lr
)
and text-orientation: sideways
(which switches automatically between sideways-right
for vertical-rl
and sideways-left
for vertical-lr
).
Vertical writing in these languages is used frequently for captions and table headers.
For Japan and China, bidirectionality is uninteresting,
but writing-mode
values horizontal-tb
and vertical-rl
and text-orientation
values mixed
, upright
, and sideways-right
are critical and text-combine-upright
is also important.
Inner Mongolia is similar to Japan, except that vertical-lr
is used.
It is important to understand, however, that these features are complex,
and there are many aspects to test.
Below is a prioritization breakdown from the Japanese perspective
that demonstrates how these features break down.
Note: I have done my best to create an informed prioritization,
but one may disagree on the exact priorities.
Please inform me of any suggested corrections.
Top Priorites
Top priorities for basic vertical writing in Japan include:
writing-mode: vertical-rl
- Correct parsing and inheritance of
writing-mode
.
- Correct in-flow block-level layout, including margin-collapsing.
- Correct table layout, including header/footer placement.
- Correct orientation of images (upright).
- Pagination of documents with root as vertical writing mode.
- Correct application of box properties
(
width
, height
, margin
, border
, padding
).
- Correct handling of basic orthogonal flows:
single-column with explicit inline-size constraint on inner flow.
Needed for captions.
- Correct handling of short orthogonal flows:
single-column, single-line with automatic inline-size.
Needed for headings and table data.
- Correct application of
text-align
and text-indent
to vertical writing modes.
text-orientation
- Correct parsing and inheritance of
text-orientation
.
- Correct
mixed
orientation per UTR#50,
including glyph substitutions.
- Support for
upright
orientation.
- Support for
sideways-right
orientation.
- Correct baseline alignment for vertical text (central baseline, except for
sideways
).
- Correctly ignoring any unsupported values of
text-orientation
such as sideways
or sideways-left
.
Necessary for forwards-compatibility.
text-combine-upright
- Correct parsing and inheritance of
text-combine-upright
.
- Correct identification of combinable runs.
- Combined runs are combined upright.
High Priorities
In addition to top priorities, high priorities for vertical writing in Japan include:
writing-mode: vertical-rl
- Correct float layout.
- Correct automatic sizing of orthogonal flows in both dimensions.
- Correct layout of orthogonal multi-column elements.
Needed for mixed-orientation magazine layouts.
- Pagination of orthogonal flows
(implemented as pagination between multi-column columns).
Needed for pages that use a different writing modes
for content longer than a single page.
- Correct application of decoration properties
(backgrounds, shadows)
- Application of page-break controls.
- Reasonable handling of tables with multi-line orthogonal flows.
text-orientation
- Correct baseline alignment for images and inline blocks (central baseline, except for
sideways
).
- Correct direction of baseline shift (
vertical-align
, particularly for superscripts and subscripts).
text-combine-upright
- Correct identification of combinable runs.
- Combined runs are combined into horizontal-in-vertical unit.
- Centering in horizontal dimension.
- Other text layout
- Support for
text-underline-position
.
Medium Priorities
Medium priorities for vertical writing in Japan include:
writing-mode: vertical-rl
- Correct absolute positioning.
- Correct positioning of ruby in vertical writing.
- Correct interaction with transforms, filters, masking, and other graphics-layer effects.
text-orientation
- Correct use of vertical font metrics for upright glyphs.
- Correct baseline alignment of
upright
text.
text-combine-upright
- Correct compression of full-width characters.
- Correct use of glyph alternates in compression.
- Correct use of graphical compression when alternates are unavailable.
- Correct alignment in vertical dimension for common cases (e.g. all same font).
Low Priorities
Lowest priorities (of necessary and important things) from a Japanese perspective include:
writing-mode: vertical-rl
- Correct interaction with right-to-left text.
- Correct interaction with Flexbox and other Level 3 layout features.
- Correct computation of
display
when affected by writing-mode
.
- Support for
caption-side
values block-start
and block-end
.
- Correct CSSOM support for
writing-mode
.
text-orientation
- Smart fallback behavior for missing vertical font metrics.
- Correct CSSOM support for
text-orientation
.
text-combine-upright
- Correct compression of full-width characters.
- Correct use of glyph alternates in compression.
- Correct use of graphical compression when alternates are unavailable.
- Correct alignment in vertical dimension for common cases (e.g. all same font).
- Correct CSSOM support for
text-combine-upright
.