CARVIEW |
CSS Mobile Profile 2.0
W3C Working Draft 19 October 2007
- This version:
- https://www.w3.org/TR/2007/WD-css-mobile-20071019
- Latest version:
- https://www.w3.org/TR/css-mobile
- Previous version:
- https://www.w3.org/TR/2006/WD-css-mobile-20061208
- Editor:
- Svante Schubert, Sun Microsystems Inc. <Svante Schubert @sun.com>
- Previous Editor:
- Robin Berjon, Expway <robin.berjon @expway.fr> (first draft)
Copyright © 2007 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark and document use rules apply.
Abstract
This specification defines in general a subset of CSS 2.1 [CSS21] that is to be considered a baseline for interoperability between implementations of CSS on constrained devices (e.g. mobile phones). Its intent is not to produce a profile of CSS incompatible with the complete specification, but rather to ensure that implementations that due to platform limitations cannot support the entire specification implement a common subset that is interoperable not only amongst constrained implementations but also with complete ones. Additionally, this specification aligns itself as much as possible with the OMA's Wireless CSS 1.1 [WCSS11] specification.
Status of this document
This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at https://www.w3.org/TR/.
Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.
The (archived) public mailing list www-style@w3.org (see instructions) is preferred for discussion of this specification. When sending e-mail, please put the text “css-mobile” in the subject, preferably like this: “[css-mobile] …summary of comment…”
This document was produced by the CSS Working Group (part of the Style Activity).
This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.
This draft is a last call for comments. Please send comments by the deadline of 15 November 2007.
Table of Contents
- 1. Introduction
- 2. Conformance
- 3. Selectors
- 4. At-rules
- 5. Properties
- 6. Syntax
- Acknowledgments
- References
1. Introduction
This document specifies a profile of CSS that is in general based on CSS 2.1 [CSS21], but requires as well new features from CSS 3. In addition the document defines an OPTIONAL feature set, that is suggested to be implemented by more advanced user agents.
2. Conformance
The key words 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 this document are to be interpreted as described in RFC 2119 [RFC2119].
Since the goal of this specification is to define a baseline interoperability level, user agents MAY accept CSS documents conforming to CSS 2.1 or subsequent revisions of the CSS family of Recommendations.
In order to conform to this specification, user agents, authoring tools, and content MUST conform to the Conformance and Error conditions section of the CSS 2.1 specification [CSS21], with the following modifications.
- Only features marked as supported in this specification are REQUIRED. Aside of the REQUIRED feature set, an additional OPTIONAL feature set is given, that may be implemented by more advanced user agents. This feature set is REQUIRED by the CDF as in [[!WICDMobile10]]. Support for a larger set of CSS 2.1 is OPTIONAL.
- The requirement concerning which CSS 2.1 media types are supported is tightened so
that both the
handheld
andall
media types MUST be accepted and processed. Other media types MAY be accepted and processed as well. - The requirements that user agents MUST make it possible to select an alternate style sheet amongst those linked from the document, as well as provide for a way to turn off author style sheets, are relaxed to be RECOMMENDED behavior, but not REQUIRED.
3. Selectors
Selectors are defined in the Selectors chapter of the CSS 2.1 specification [CSS21]. The following table identifies which selector constructs MUST be supported amongst those defined by CSS 2.1.
Selector type | Example | Meaning | Conformance |
---|---|---|---|
Universal selector | *
| Matches any element. | REQUIRED |
Type selectors | E
| Matches any E element. | REQUIRED |
Descendant selectors | E F
| Matches any F element that is a descendant of an E element. | REQUIRED |
Child selectors | E > F
| Matches any F element that is a child of an element E. | REQUIRED |
The link pseudo-classes | E:link
| Matches element E if E is the source anchor of a hyperlink, unvisited by a user. | REQUIRED |
The link pseudo-classes | E:visited
| Matches element E if E is the source anchor of a hyperlink, visited by a user. | REQUIRED |
The dynamic pseudo-classes | E:active
| Matches element E if E is being activated by the user. | REQUIRED |
The dynamic pseudo-classes | E:focus
| Matches element E if E has the focus (accepts keyboard events or other forms of text input). | REQUIRED |
Class selectors | .warning
| Language specific. (In (X)HTML, matches elements whose
class attribute contains a token with the same name.)
| REQUIRED |
ID selectors | #myid
| Matches any element with an ID equal to "myid". | REQUIRED |
Grouping | E1, E2, E3 { ... }
| Matches a group of elements, which share the same style declarations. | REQUIRED |
4. At-rules
At-rules are defined in the at-rules section of the CSS 2.1 specification [CSS21]. The following table identifies which at-rule constructs MUST be supported amongst those defined by CSS by setting the at-rule as REQUIRED in the table's last column. Only at-rules that are part of the suggested feature set for advanced user agents are listed here as OPTIONAL.
Rule | Definition | Conformance |
---|---|---|
@charset | Defines character set for the style sheet. | REQUIRED |
@import | Imports an external style sheet. | REQUIRED |
@media | Groups a set of style rules to apply only to one or more particular
media. Only the handheld and all media types MUST be accepted
and processed. Other media types MAY be accepted and processed as well.
| REQUIRED |
@namespace | For declaring the default namespace and binding namespaces to namespace prefixes. | OPTIONAL |
5. Properties
Properties are defined in several chapters of the CSS 2.1 specification [CSS21] and in case of marquee properties in the CSS box model [CSS3BOX]. The following table identifies which properties MUST be supported amongst those defined by CSS by setting the property as REQUIRED in the table's last column. Only properties that are part of the suggested feature set for advanced user agents are listed here as OPTIONAL. The property syntax is provided (expressed using the same value specifications as CSS 2.1) when it is subsetted from the original. Limitations that apply to a property apply equally to its shorthand alternative.
Property | Syntax (if different from CSS) | Conformance |
---|---|---|
background-color | REQUIRED | |
background-image | REQUIRED | |
background-repeat | REQUIRED | |
background-attachment | REQUIRED | |
background-position | top | center | bottom | left | right | inherit
| REQUIRED |
background | REQUIRED | |
border-top-width border-right-width border-bottom-width border-left-width | REQUIRED | |
border-width | REQUIRED | |
border-top-color border-right-color border-bottom-color border-left-color | REQUIRED | |
border-color | REQUIRED | |
border-top-style border-right-style border-bottom-style border-left-style | none | solid | dashed | dotted | inherit
| REQUIRED |
border-style | none | solid | dashed | dotted | inherit
| REQUIRED |
border-top border-right border-bottom border-left | REQUIRED | |
border | REQUIRED | |
bottom | OPTIONAL | |
clear | REQUIRED | |
color | REQUIRED | |
display | inline | block | list-item | none | inherit
| REQUIRED |
float | REQUIRED | |
font-family | REQUIRED | |
font-style | REQUIRED | |
font-variant | REQUIRED | |
font-weight | REQUIRED | |
font-size | <absolute-size> | <relative-size> | inherit
| REQUIRED |
font | REQUIRED | |
height | REQUIRED | |
left | OPTIONAL | |
list-style-type | disc | circle | square | decimal | lower-roman | upper-roman
| lower-alpha | upper-alpha | none | inherit
| REQUIRED |
list-style-image | REQUIRED | |
list-style | REQUIRED | |
margin-top margin-right margin-bottom margin-left | REQUIRED | |
margin | REQUIRED | |
marquee-direction [CSS3BOX] | REQUIRED | |
marquee-loop [CSS3BOX] | REQUIRED | |
marquee-speed [CSS3BOX] | REQUIRED | |
marquee-style [CSS3BOX] | REQUIRED | |
max-height | REQUIRED | |
max-width | REQUIRED | |
min-height | REQUIRED | |
min-width | REQUIRED | |
outline-color | OPTIONAL | |
outline-style | none | solid | dashed | dotted | inherit
| OPTIONAL |
outline-width | OPTIONAL | |
outline | OPTIONAL | |
overflow [CSS3BOX] | auto | REQUIRED |
overflow-style [CSS3BOX] | marquee | REQUIRED |
padding-top padding-right padding-bottom padding-left | REQUIRED | |
padding | REQUIRED | |
position | OPTIONAL | |
right | OPTIONAL | |
text-indent | REQUIRED | |
text-align | REQUIRED | |
text-decoration | none | blink |underline | inherit
| REQUIRED |
text-transform | REQUIRED | |
top | OPTIONAL | |
vertical-align | top | middle | bottom | baseline | inherit
| REQUIRED |
visibility | REQUIRED | |
white-space | REQUIRED | |
width | REQUIRED | |
z-index | OPTIONAL |
Informative Notes
- Content Providers will reach a larger and more satisfied audience by following Mobile Web Best Practices [MOBILE-BP] and CSS Techniques for Web Content Accessibility Guidelines [WCAG10-CSS-TECHS].
- The OMA's Wireless CSS 1.1 [WCSS11] introduced three extensions
‘Marquee’
,‘
andAccess Keys
’‘Input’
. Those extensions are deprecated. The‘Marquee’
functionality has been redefined by the marquee properties of the CSS 3 box model [CSS3BOX]
6. Syntax
A user agent MUST support all value types defined in the Values section of the CSS 2.1 specification [CSS21], with the following exceptions:
- Support for counter values is OPTIONAL
- Support for CSS2 System Colors and User preferences for fonts is OPTIONAL.
Acknowledgments
The editors wish to thank the authors of the previous version of this document, Ted Wugofski (Openwave), Doug Dominiak (Openwave,formerly Motorola), Peter Stark (Ericsson), and Tapas Roy (Openwave), as well as the authors of the OMA Wireless CSS specification and the CSS 2.1 specification. Furthermore, the editors want to thank the CDF WG for their participation on this specification.
References
Normative references
-
- [CSS21]
- Bert Bos; et al. Cascading Style Sheets, level 2 revision 1. 11 April 2006. W3C Working Draft. (Work in progress.) URL: https://www.w3.org/TR/2006/WD-CSS21-20060411
- [CSS3BOX]
- Bert Bos. CSS3 module: The box model. 9 August 2007. W3C Working Draft. (Work in progress.) URL: https://www.w3.org/TR/2007/WD-css3-box-20070809
- [RFC2119]
- S. Bradner. Key words for use in RFCs to Indicate Requirement Levels. Internet RFC 2119. URL: https://www.ietf.org/rfc/rfc2119.txt
Informative references
-
- [MOBILE-BP]
- Jo Rabin; Charles McCathieNevile. Mobile Web Best Practices 1.0, Basic Guidelines. 2 November 2006. W3C Proposed Recommendation. URL: https://www.w3.org/TR/2006/PR-mobile-bp-20061102
- [WCAG10-CSS-TECHS]
- Wendy Chisholm; Gregg Vanderheiden; Ian Jacobs. CSS Techniques for Web Content Accessibility Guidelines 1.0. 6 November 2000. W3C Note. URL: https://www.w3.org/TR/2000/NOTE-WCAG10-CSS-TECHS-20001106
- [WCSS11]
- Open Mobile Alliance. Wireless CSS Specification. 9 June 2004. Candidate Version 1.1. URL: https://www.openmobilealliance.org/release_program/docs/Browsing/V2_2-20040609-C/OMA-WAP-WCSS-V1_1-20040609-C.pdf