Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C liability, trademark and document use rules apply.
This specification defines a subset of Cascading Style Sheets Level 2 and CSS3 module: Color specifications tailored to the needs and constraints of TV devices.
This profile is obsolete. Please see the latest CSS Snapshot for the specifications that make up CSS.
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 http://www.w3.org/TR/.
Publication as a Working Group Note 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.
This document was produced by the CSS Working Group (part of the Style Activity).
The (archived) public mailing list [email protected] (see instructions) is preferred for discussion of this document. When sending e-mail, please put the text âcss-tvâ in the subject, preferably like this: â[css-tv] â¦summary of commentâ¦â
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 document is governed by the 1 August 2014 W3C Process Document.
At this time, the CSS Working Group does not envisage further work on this specification and does not plan to propose it as a W3C Recommendation.
This document specifies a profile of the Cascading Style Sheets level 2 (CSS2) and CSS3 module: Color specifications appropriate for TV devices such as set top boxes or integrated interactive television sets that display their output on a television screen. Conformance to this profile means that a user agent supports, at minimum, the features defined in this specification. This subject is addressed in Section 2, Conformance, below.
As defined in [CSS2]:
CSS2 is a style sheet language that allows authors and users to attach style (e.g., fonts, spacing, and aural cues) to structured documents (e.g., HTML documents and XML applications). By separating the presentation style of documents from the content of documents, CSS2 simplifies Web authoring and site maintenance. CSS2 builds on CSS1 (see [CSS1]) and, with very few exceptions, all valid CSS1 style sheets are valid CSS2 style sheets. CSS2 supports media-specific style sheets so that authors may tailor the presentation of their documents to visual browsers, aural devices, printers, braille devices, handheld devices, etc.
In summary, CSS2 specifies how developers can author style sheets for presenting documents across multiple devices and media types. While this is very important, it is also important that authors have an understanding of what features are supported on these different devices. Likewise, it is important that similar devices operate in a similar manner. Otherwise, authors will need to develop style sheets for each version of each device -- raising the cost of content development and decreasing interoperability.
The CSS TV Profile specifies a conformance profile for TV devices,
identifying a minimum set of properties, values, selectors, and cascading
rules. The resulting CSS TV Profile includes the vast majority of CSS1,
portions of CSS2 and CSS3 module: Color. The CSS TV Profile is a proper
superset of the CSS Mobile Profile, with the use of the âtv
â media type instead of the âhandheld
â media type.
The primary role of a profile is to define a subset of features that provides a minimal guarantee of interoperability. In the case of the CSS TV Profile, this guarantee is that a conforming user agent will support the features defined in this specification following the CSS2 conformance clause ([CSS2] Section 3.2), recast and summarized below:
As with CSS2, there are qualifications to this conformance clause:
It is recommended that authors use this conformance profile to take advantage of forward compatibility. Authors should be able to use style properties with an understanding that the cascading rules are processed correctly and that unknown properties and values are ignored. For example:
h3 { display: inline; display: run-in; }
A TV-UA that can process the ârun-in
â
value for the âdisplay
â property will
accept the first display declaration and then "write over" that value with
the second display declaration. A TV-UA that cannot process the ârun-in
â value will process the first display
specification and ignore the second display specification.
In CSS2, pattern matching rules determine which style rules apply to elements in the document tree [CSS2].
The following table summarizes CSS TV Profile selector syntax. In addition to these selectors, the CSS TV Profile includes the CSS2 grouping mechanism (See [CSS2] Section 5.2.1).
Note. Unsupported selectors are parsed as invalid (which would affect valid selectors in the same group), the same as if a purely CSS1 UA were to encounter selectors new in CSS2. Of course a TV-UA is free to implement more selectors than required by CSS TV.
Pattern | Meaning | Selector type | CSS TV |
---|---|---|---|
* | Matches any element | Universal selector | Yes |
E | Matches any E element (i.e., and element of type E) | Type selectors | Yes |
E F | Matches any F element that is a descendent of an E element | Descendent selectors | Yes |
E > F | Matches any F element that is a child of an element E | Child selectors | Yes |
E:first-child | Matches element E when it is the first child of its parent | The :first-child pseudo-class | Yes |
E:link E:visited |
Matches element E if E is the source anchor of a hyperlink of which the target is not yet visited (:link) or already visited (:visited). | The link pseudo-classes | Yes |
E:active | Matches E during certain user actions. | The dynamic pseudo-classes | Yes |
E:hover | Matches E during certain user actions. | The dynamic pseudo-classes | No |
E:focus | Matches E during certain user actions. | The dynamic pseudo-classes | Yes |
E:lang(c) | Matches element of type E if it is in (human) language c (the document language specifies how language is determined). | The :lang() pseudo-class | No |
E + F | Matches any F element immediately preceded by an element E. | Adjacent selectors | No |
E[foo] | Matches any E element with the "foo" attribute set (whatever the value). | Attribute selectors | No |
E[foo="bar"] | Matches any E element whose "foo" attribute value is exactly equal to "bar". | Attribute selectors | No |
E[foo~="bar"] | Matches any E element whose "foo" attribute value is a list of space-separated values, one of which is exactly equal to "bar". | Attribute selectors | No |
E[foo|="bar"] | Matches any E element whose "foo" attribute value has a hyphen-separated list of values beginning (from the left) with "bar". | Attribute selectors | No |
E:first-line | Matches the first formatted line of an E element. | The :first-line pseudo-element | Yes |
E:first-letter | Matches the first formatted letter of an E element. | The :first-letter pseudo-element | Yes |
E:before | Matches/creates generated content before an E element. | The :before pseudo-element | No |
E:after | Matches/creates generated content after an E element. | The :after pseudo-element | No |
E.bar | Matches any E element whose class attribute (as defined by the document language) value is a list of space-separated values, one of which is exactly equal to "bar". | Class selectors | Yes |
E#bar | Matches any E element whose ID attribute (as defined by the document language) is equal to "bar". | ID selectors | Yes |
The following table summarizes CSS TV Profile at-rule syntax.
at-rule | Function | CSS TV |
---|---|---|
@import | Imports an external style sheet. | Yes |
@charset | Defines character set for the style sheet. | Yes |
@media | Groups a set of style rules to apply only to one or more particular media. | Yes |
@font-face | Defines a named font-family, including for downloading. | No |
@page | Defines a (optionally named) page formatting context. | No |
@color-profile | Defines a named color-profile. | No |
The following table summarizes CSS TV Profile properties and property values from CSS2. Refer to [CSS2] for the definition of these properties and values.
Name | CSS TV | CSS Values | Initial value |
---|---|---|---|
âazimuth â |
No | <angle> | [ left-side | far-left | left | center-left | center | center-right | right | far-right | right-side ] || behind ] | leftwards | rightwards | inherit | center |
âbackground â |
[âbackground-color â || âbackground-image â || âbackground-repeat â || âbackground-position â] | inherit |
[âbackground-color â || âbackground-image â || âbackground-repeat â || âbackground-attachment â || âbackground-position â] | inherit |
see individual properties |
âbackground-attachment â |
No | scroll | fixed | inherit | scroll |
âbackground-color â |
Yes | <color> | transparent | inherit | transparent |
âbackground-image â |
Yes | <uri> | none | inherit | none |
âbackground-position â |
Yes | [ [ <percentage> | <length> ]{1,2} | [ [top | center | bottom] || [left | center | right] ] ] | inherit | 0% 0% |
âbackground-repeat â |
Yes | repeat | repeat-x | repeat-y | no-repeat | inherit | repeat |
âborder â |
Yes | [ <border-width> || <border-style> || <border-color> ] | inherit | see individual properties |
âborder-collapse â |
No | collapse | separate | inherit | separate |
âborder-color â |
Yes | <color>{1,4} | transparent | inherit | see individual properties |
âborder-spacing â |
No | <length> <length>? | inherit | 0 |
âborder-style â |
Yes | <border-style>{1,4} | inherit | see individual properties |
âborder-top â âborder-right â âborder-bottom â âborder-left â |
Yes | [ <border-width> || <border-style> || <border-color> ] | inherit | see individual properties |
âborder-top-color â âborder-right-color â âborder-bottom-color â âborder-left-color â |
Yes | <color> | transparent | inherit | the value of the âcolor â property |
âborder-top-style â âborder-right-style â âborder-bottom-style â âborder-left-style â |
Yes | <border-style> | inherit | none |
âborder-top-width â âborder-right-width â âborder-bottom-width â âborder-left-width â |
Yes | <border-width> | inherit | medium |
âborder-width â |
Yes | <border-width>{1,4} | inherit | see individual properties |
âbottom â |
Yes | <length> | <percentage> | auto | inherit | auto |
âcaption-side â |
Yes | top | bottom | left | right | inherit | top |
âclear â |
Yes | none | left | right | both | inherit | none |
âclip â |
Yes | <shape> | auto | inherit | auto |
âcolor â |
Yes | <color> | inherit | depends on user agent |
âcontent â |
No | [ <string> | <uri> | <counter> | attr(X) | open-quote | close-quote | no-open-quote | no-close-quote ]+ | inherit | empty string |
âcounter-increment â |
No | [ <identifier> <integer>? ]+ | none | inherit | none |
âcounter-reset â |
No | [ <identifier> <integer>? ]+ | none | inherit | none |
âcue â |
No | [ âcue-before â || âcue-after â ] | inherit |
see individual properties |
âcue-after â |
No | <uri> | none | inherit | none |
âcue-before â |
No | <uri> | none | inherit | none |
âcursor â |
No | [ [<uri> ,]* [ auto | crosshair | default | pointer | move | e-resize | ne-resize | nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize| text | wait | help ] ] | inherit | auto |
âdirection â |
No | ltr | rtl | inherit | ltr |
âdisplay â |
inline | block | list-item | none | inherit | inline | block | list-item | run-in | compact | marker | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | none | inherit | inline |
âelevation â |
No | <angle> | below | level | above | higher | lower | inherit | level |
âempty-cells â |
No | show | hide | inherit | show |
âfloat â |
Yes | left | right | none | inherit | none |
âfont â |
Yes | [ [ âfont-style â || âfont-variant â || âfont-weight â ]? âfont-size â [ / âline-height â ]? âfont-family â ] | caption | icon | menu |
message-box | small-caption | status-bar | inherit |
see individual properties |
âfont-family â |
Yes | [[ <family-name> | <generic-family> ],]* [ <family-name> | <generic-family> ] | inherit | depends on user agent |
âfont-size â |
Yes | <absolute-size> | <relative-size> | <length> | <percentage> | inherit | medium |
âfont-size-adjust â |
No | <number> | none | inherit | none |
âfont-stretch â |
No | normal | wider | narrower | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded | inherit | normal |
âfont-style â |
Yes | normal | italic | oblique | inherit | normal |
âfont-variant â |
Yes | normal | small-caps | inherit | normal |
âfont-weight â |
Yes | normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inherit | normal |
âheight â |
Yes | <length> | <percentage> | auto | inherit | auto |
âleft â |
Yes | <length> | <percentage> | auto | inherit | auto |
âletter-spacing â |
No | normal | <length> | inherit | normal |
âline-height â |
Yes | normal | <number> | <length> | <percentage> | inherit | normal |
âlist-style â |
Yes | [ âlist-style-type â || âlist-style-position â || âlist-style-image â ] | inherit |
see individual properties |
âlist-style-image â |
Yes | <uri> | none | inherit | none |
âlist-style-position â |
Yes | inside | outside | inherit | outside |
âlist-style-type â |
disc | circle | square | decimal | lower-roman | upper-roman | lower-alpha | lower-latin | upper-alpha | upper-latin | none | inherit | disc | circle | square | decimal | decimal-leading-zero | lower-roman | upper-roman | lower-greek | lower-alpha | lower-latin | upper-alpha | upper-latin | hebrew | armenian | georgian | cjk-ideographic | hiragana | katakana | hiragana-iroha | katakana-iroha | none | inherit | disc |
âmargin â |
Yes | <margin-width>{1,4} | inherit | see individual properties |
âmargin-top â âmargin-right â âmargin-bottom â âmargin-left â |
Yes | <margin-width> | inherit | 0 |
âmarker-offset â |
No | <length> | auto | inherit | auto |
âmarks â |
No | [ crop || cross ] | none | inherit | none |
âmax-height â |
No | <length> | <percentage> | none | inherit | none |
âmax-width â |
No | <length> | <percentage> | none | inherit | none |
âmin-height â |
No | <length> | <percentage> | inherit | 0 |
âmin-width â |
No | <length> | <percentage> | inherit | depends on user agent |
âorphans â |
No | <integer> | inherit | 2 |
âoutline â |
Yes | [ âoutline-color â || âoutline-style â || âoutline-width â ] | inherit |
see individual properties |
âoutline-color â |
Yes | <color> | invert | inherit | invert |
âoutline-style â |
Yes | <border-style> | inherit | none |
âoutline-width â |
Yes | <border-width> | inherit | medium |
âoverflow â |
No | visible | hidden | scroll | auto | inherit | visible |
âpadding â |
Yes | <padding-width>{1,4} | inherit | see individual properties |
âpadding-top â âpadding-right â âpadding-bottom â âpadding-left â |
Yes | <padding-width> | inherit | 0 |
âpage â |
No | <identifier> | auto | auto |
âpage-break-after â |
No | auto | always | avoid | left | right | inherit | auto |
âpage-break-before â |
No | auto | always | avoid | left | right | inherit | auto |
âpage-break-inside â |
No | avoid | auto | inherit | auto |
âpause â |
No | [ [<time> | <percentage>]{1,2} ] | inherit | depends on user agent |
âpause-after â |
No | <time> | <percentage> | inherit | depends on user agent |
âpause-before â |
No | <time> | <percentage> | inherit | depends on user agent |
âpitch â |
No | <frequency> | x-low | low | medium | high | x-high | inherit | medium |
âpitch-range â |
No | <number> | inherit | 50 |
âplay-during â |
No | <uri> mix? repeat? | auto | none | inherit | auto |
âposition â |
static | relative | absolute | inherit | static | relative | absolute | fixed | inherit | static |
âquotes â |
No | [ <string><string>]+ | none | inherit | depends on user agent |
ârichness â |
No | <number> | inherit | 50 |
âright â |
Yes | <length> | <percentage> | auto | inherit | auto |
âsize â |
No | <length>{1,2} | auto | portrait | landscape | inherit | auto |
âspeak â |
No | normal | none | spell-out | inherit | normal |
âspeak-header â |
No | once | always | inherit | once |
âspeak-numeral â |
No | digits | continuous | inherit | continuous |
âspeak-punctuation â |
No | code | none | inherit | none |
âspeech-rate â |
No | <number> | x-slow | slow | medium | fast | x-fast | faster | slower | inherit | medium |
âstress â |
No | <number> | inherit | 50 |
âtable-layout â |
No | auto | fixed | inherit | auto |
âtext-align â |
left | right | center | justify | inherit | left | right | center | justify | <string> | inherit | depends on user agent and writing direction |
âtext-decoration â |
none | [ underline || overline || line-through ] | inherit | none | [ underline || overline || line-through || blink ] | inherit | none |
âtext-indent â |
Yes | <length> | <percentage> | inherit | 0 |
âtext-shadow â |
No | none | [<color> || <length> <length> <length>? ,]* [ <color> || <length> <length> <length>?] | inherit | none |
âtext-transform â |
Yes | capitalize | uppercase | lowercase | none | inherit | none |
âtop â |
Yes | <length> | <percentage> | auto | inherit | auto |
âunicode-bidi â |
No | normal | embed | bidi-override | inherit | normal |
âvertical-align â |
baseline | sub | super | top | middle | bottom | inherit | baseline | sub | super | top | text-top | middle | bottom | text-bottom | <percentage> | <length> | inherit | baseline |
âvisibility â |
Yes | visible | hidden | collapse | inherit | inherit |
âvoice-family â |
No | [[ <specific-voice> | <generic-voice> ],]* [ <specific-voice> | <generic-voice> ] | inherit | depends on user agent |
âvolume â |
No | <number> | <percentage> | silent | x-soft | soft | medium | loud | x-loud | inherit | medium |
âwhite-space â |
Yes | normal | pre | nowrap | inherit | normal |
âwidows â |
No | <integer> | inherit | 2 |
âwidth â |
Yes. Note that a TV UA may implement a UA style sheet rule of
*{max-width: 100%} to avoid horizontal scrolling. |
<length> | <percentage> | auto | inherit | auto |
âword-spacing â |
No | normal | <length> | inherit | normal |
âz-index â |
Yes | auto | <integer> | inherit | auto |
The following table summarizes CSS TV Profile properties and property values from the CSS3 module: Color. Refer to [CSS3COLOR] for the definition of these properties and values.
Name | CSS TV | CSS Values | Initial value |
---|---|---|---|
âcolor â |
HTML4 keywords, RGB and RGBA values, transparent, orange, inherit | HTML4 keywords, RGB, RGBA, HSL, and HSLA values, transparent, X11 keywords, System Colors, flavor, attr(X,color), inherit | depends on user agent |
âcolor-profile â |
No | auto | sRGB | <name> | <uri> | inherit | auto |
âopacity â |
Yes | <alphavalue> <priority-index>? | inherit | 1 none |
ârendering-intent â |
no | auto | perceptual | relative-colorimetric | saturation | absolute-colorimetric | inherit | auto |
The CSS TV Profile uses the same syntax as specified in [CSS2]. The CSS TV Profile uses a subset of the values used in CSS2. Specifically:
Similarly, the CSS TV Profile requires that conforming user agents support the character encoding mechanisms specified in [CSS2]. Specifically:
In general, the CSS TV Profile uses the same cascading rules as in CSS2. Specifically:
A CSS TV Profile conforming user agent MUST be able to process media-dependent stylesheets as specified in CSS2 ([CSS2] Section 7). Specifically:
tv
media type.all
media type.screen
or print
).The TV-UA is not required to satisfy the CSS2 conformance statement
pertaining to the tv
media type (see [CSS2] Section 7.3.1); the TV-UA
need only satisfy the conformance statements in this specification.
This document derives from the CSS Level 1 and CSS level 2 Recommendations, the CSS3 module: Color and the CSS Mobile Profile 1.0. We thank all CSS1, CSS2, CSS3 module: Color and CSS Mobile Profile authors, editors and contributors.
We would like to thank the members of the CSS working group, especially Bert Bos, Chris Lilley, and Tapas Kanti Roy for their direct feedback on the draft.
We would like to thank the contributors on [email protected]. We would like to especially thank ARIB, Akihiko Handa, Joel Zdepski, Etan Wexler, Kynn Bartlett, Björn Höhrmann, and fantasai for their valuable comments on the draft.