CSS Mobile Text Size Adjustment Module Level 1

[LONGSTATUS] [DATE]

This version:
http://www.w3.org/TR/[YEAR]/ED-css-size-adjust-[CDATE]/
Latest version:
http://www.w3.org/TR/[SHORTNAME]/
Editor's draft:
http://dev.w3.org/csswg/[SHORTNAME]/
Previous version:
none
Issue Tracking:
Maintained in document (only editor's draft is current)
Feedback:
www-style@w3.org with subject line “[css-size-adjust] … message topic …” (archives)
Editors:
L. David Baron (Mozilla Corporation)
Tantek Çelik (Mozilla Corporation)

Abstract

CSS is a language for describing the rendering of structured documents (such as HTML and XML) on screen, on paper, in speech, etc. This module contains features of CSS relating to one possible mechanism for adapting pages designed for desktop computer displays for display on smaller screens such as those of mobile phones. This mechanism involves displaying a scaled down display of the Web page and allowing the user to pan and zoom within that display, but within that scaled down display making certain text and similar elements larger than specified by the page author in order to ensure that when a block of wrapped text is zoomed to the width of the device (so it can be read without side-to-side scrolling for each line), the text is large enough to be readable.

Status of this document

The following features are at risk:

Table of contents

Introduction

A common mechanism for displaying Web pages that were designed for large desktop displays on much smaller displays such as those of mobile phones involves allowing the user to pan and zoom around within a view of the Web page drawn as though it were drawn into the width of a typical desktop Web browser display. The ability to pan and zoom the page lets the user both see an overview of the page and zoom in to specific parts to read or interact with them.

One common problem with this type of interaction occurs when the user wants to read a large block of text. It might be that a block of text within this desktop-formatted page might be laid out so that when the user zooms in so that the text is large enough to read, each line of text is wider than the display on the small device. This means the user needs to scroll side to side to read each line of text, which is a serious inconvenience to the user.

One way for software that displays Web pages or other CSS-formatted content on a mobile device is to make some of the text larger so that this problem does not occur. The goal of this enlargement is to make the text big enough so that when the block it is in is scaled to the width of the display, the text is large enough to read. At the same time, this needs to be done with minimal disruption to the overall design of the page.

While implementations of CSS are not required to use this technique, this module describes how implementations of CSS that do use this technique must do so. In other words, while implementations of CSS are not required to implement this module, this module nonetheless places requirements on implementations of this module.

This module describes how this size adjustment works and describes a new CSS property that authors of CSS can use to provide hints to the implementation about which text or other elements should or should not be enlarged.

Module interactions

This module adds additional features that are not defined in [[CSS21]]. These features may lead to a different size being computed than would be computed when following [[CSS21]] alone.

Values

This specification follows the CSS property definition conventions from [[!CSS21]]. Value types not defined in this specification are defined in CSS Level 2 Revision 1 [[!CSS21]]. Other CSS modules may expand the definitions of these value types: for example [[CSS3COLOR]], when combined with this module, expands the definition of the <color> value type as used in this specification.

In addition to the property-specific values listed in their definitions, all properties defined in this specification also accept the inherit keyword as their property value. For readability it has not been repeated explicitly.

Default size adjustment

This section defines the default size adjustment rules. These rules are then referenced by the definition of the 'text-size-adjust' property in the following section.

All of the subsections of this section need significant refinement: additional detail, verification that the detail already present is correct, etc.

It's not clear how much this section should define precise behavior versus how much it should allow future room for innovation and improvement.

Types of boxes adjusted

The default size adjustment affects text and form controls, whether those form controls contain text (e.g., text inputs, selects) or do not (e.g., radio buttons, checkboxes).

Conditions that suppress adjustment

A number of conditions suppress the default adjustment because these conditions are associated with layouts for which the user experience would be worsened by size adjustment rather than improved by it. These conditions are:

Calculation of default adjustment

The adjustment performed should be based on preferences (of the renderer or the renderer's user) indicating the desired minimum readable text size. Given this preference, for each containing block of text to be adjusted, there is a minimum block text size: the preference for the minimum readable text size, times the width of the containing block, divided by the width of the device.

The size adjustment involves multiplication of sizes by a ratio determined by the minimum block text size and the computed value of 'font-size'. This ratio must be at least the first divided by the second; however, in order to maintain differentiations between font sizes, it should often be slightly larger. Define this with more detail/precision.

Size adjustment control: the 'text-size-adjust' property

Name: text-size-adjust
Value: auto | none | <percentage>
Initial: auto
Applies to: all elements
Inherited: yes
Percentages: see below
Media: visual
Computed value: as specified
Animatable: as percentage
Canonical order: N/A
''auto''
Renderers must use the default size adjustment when displaying on a small device.
''none''
Renderers must not do size adjustment when displaying on a small device.
<percentage>
Need to define what percentages actually mean. Are they a minimum or a set value? What exactly are they relative to?

Conformance

Document conventions

Conformance requirements are expressed with a combination of descriptive assertions and RFC 2119 terminology. The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in the normative parts of this document are to be interpreted as described in RFC 2119. However, for readability, these words do not appear in all uppercase letters in this specification.

All of the text of this specification is normative except sections explicitly marked as non-normative, examples, and notes. [[!RFC2119]]

Examples in this specification are introduced with the words “for example” or are set apart from the normative text with class="example", like this:

This is an example of an informative example.

Informative notes begin with the word “Note” and are set apart from the normative text with class="note", like this:

Note, this is an informative note.

Conformance classes

Conformance to CSS Mobile Text Size Adjustment Module is defined for three conformance classes:

style sheet
A CSS style sheet.
renderer
A UA that interprets the semantics of a style sheet and renders documents that use them.
authoring tool
A UA that writes a style sheet.

A style sheet is conformant to CSS Mobile Text Size Adjustment Module if all of its statements that use syntax defined in this module are valid according to the generic CSS grammar and the individual grammars of each feature defined in this module.

A renderer is conformant to CSS Mobile Text Size Adjustment Module if, in addition to interpreting the style sheet as defined by the appropriate specifications, it supports all the features defined by CSS Mobile Text Size Adjustment Module by parsing them correctly and rendering the document accordingly. However, the inability of a UA to correctly render a document due to limitations of the device does not make the UA non-conformant. (For example, a UA is not required to render color on a monochrome monitor.)

An authoring tool is conformant to CSS Mobile Text Size Adjustment Module if it writes style sheets that are syntactically correct according to the generic CSS grammar and the individual grammars of each feature in this module, and meet all other conformance requirements of style sheets as described in this module.

Partial implementations

So that authors can exploit the forward-compatible parsing rules to assign fallback values, CSS renderers must treat as invalid (and ignore as appropriate) any at-rules, properties, property values, keywords, and other syntactic constructs for which they have no usable level of support. In particular, user agents must not selectively ignore unsupported component values and honor supported values in a single multi-value property declaration: if any value is considered invalid (as unsupported values must be), CSS requires that the entire declaration be ignored.

Experimental implementations

To avoid clashes with future CSS features, the CSS2.1 specification reserves a prefixed syntax for proprietary and experimental extensions to CSS.

Prior to a specification reaching the Candidate Recommendation stage in the W3C process, all implementations of a CSS feature are considered experimental. The CSS Working Group recommends that implementations use a vendor-prefixed syntax for such features, including those in W3C Working Drafts. This avoids incompatibilities with future changes in the draft.

Non-experimental implementations

Once a specification reaches the Candidate Recommendation stage, non-experimental implementations are possible, and implementors should release an unprefixed implementation of any CR-level feature they can demonstrate to be correctly implemented according to spec.

To establish and maintain the interoperability of CSS across implementations, the CSS Working Group requests that non-experimental CSS renderers submit an implementation report (and, if necessary, the testcases used for that implementation report) to the W3C before releasing an unprefixed implementation of any CSS features. Testcases submitted to W3C are subject to review and correction by the CSS Working Group.

Further information on submitting testcases and implementation reports can be found from on the CSS Working Group's website at http://www.w3.org/Style/CSS/Test/. Questions should be directed to the public-css-testsuite@w3.org mailing list.

CR exit criteria

For this specification to be advanced to Proposed Recommendation, there must be at least two independent, interoperable implementations of each feature. Each feature may be implemented by a different set of products, there is no requirement that all features be implemented by a single product. For the purposes of this criterion, we define the following terms:

independent
each implementation must be developed by a different party and cannot share, reuse, or derive from code used by another qualifying implementation. Sections of code that have no bearing on the implementation of this specification are exempt from this requirement.
interoperable
passing the respective test case(s) in the official CSS test suite, or, if the implementation is not a Web browser, an equivalent test. Every relevant test in the test suite should have an equivalent test created if such a user agent (UA) is to be used to claim interoperability. In addition if such a UA is to be used to claim interoperability, then there must one or more additional UAs which can also pass those equivalent tests in the same way for the purpose of interoperability. The equivalent tests must be made publicly available for the purposes of peer review.
implementation
a user agent which:
  1. implements the specification.
  2. is available to the general public. The implementation may be a shipping product or other publicly available version (i.e., beta version, preview release, or “nightly build”). Non-shipping product releases must have implemented the feature(s) for a period of at least one month in order to demonstrate stability.
  3. is not experimental (i.e., a version specifically designed to pass the test suite and is not intended for normal usage going forward).

The specification will remain Candidate Recommendation for at least six months.

Acknowledgments

The editors would like to thank: .

References

Normative references

Other references

Index

Property index