This module extends the vocabulary of CSS with terms frequently used in certain domains, making it easier for authors to write understandable and maintainable style sheets.
CSS is a language for describing the rendering of structured documents
(such as HTML and XML)
on screen, on paper, etc.
Status of this document
This is a public copy of the editors’ draft.
It is provided for discussion only and may change at any moment.
Its publication here does not imply endorsement of its contents by W3C.
Don’t cite this document other than as work in progress.
GitHub Issues are preferred for discussion of this specification.
When filing an issue, please put the text “css-egg” in the title,
preferably like this:
“[css-egg] …summary of comment…”.
All issues and comments are archived,
and there is also a historical archive.
This document was produced by a group operating under
the 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.
As evidenced by the extraordinary variety of designs found on the web,
CSS is a very expressive language,
capable of describing unlimited styles and layouts.
However, one of the design goal of CSS was also to make it
easy to learn and to read by people.
Making it simple for untrained authors to read and guess
the meaning of a style sheet after only a basic introduction to CSS
has contributed greatly to the success of the language.
In addition, easy-to-read style sheets are also easier to maintain.
In this spirit, this specification introduces a few new values and units,
which, while not bringing significant new capabilities to the web platform,
makes it possible to write style sheets that are easier to read than ever before,
by enabling authors to use values and units that are familiar
and appropriate for the domain they are working on.
CSS provides several absolute length units such as cm or in,
as well as several <time> units such as s or ms They can all be converted between each other at fixed ratios, but are
nonetheless provided in recognition that it is most convenient for authors
to use units that they are most familiar with, or that some designs are
more naturally expressed in some units than others.
2.1. Astronomical units
This specification adds four absolute length units
which should be appreciated by authors
in fields such as astronomy and fundamental physics.
The new units are ls, pc and their sub multiples pls and apc.
They are defined as physical units.
Note: Lightsecond was chosen instead of the more familiar lightyear
to make sure that layouts computed during leap years
would be unambiguously identical
to those computed during non-leap years.
Note: This specification does not address relativistic effects
of scrolling or animations and transitions
at (or beyond) the speed of light.
When writing a page representing the inner solar system at scale, the following markup and style could be used.
The following is a disappointingly small sample rendering (not at scale)
of what this would look like.
With the new units and more space than this specification can offer,
this would instead be overwhelmingly awesome.
2.2. Traditional time units
While the s and ms units defined in [CSS3-VALUES] are appropriate for very short durations,
their use to express longer time spans is inadequate.
Moreover, authors may sometimes wish to use less dry terminology
and prefer more expressive and vivid language. This specification
therefore introduces two <time> units: ftn and its subdivision mftn.
This specification introduces an new dimension,
together with a new unit to be used with this dimension.
The <speech-rate> described the speed at which a text is read aloud.
It can be expressed using the tmbl unit, as defined below.
unit
name
definition
tmbl
Timble
This is the rate of speech of Sir Tim Berners-Lee
when delivering a speech.
Note: Authors are advised to be cautious when using this unit,
as it can easily lead to rates of speech that are too high
for the listener to follow. 1tmbl is generally considered to be about
the maximum rate a listener without special training can sustainably understand
while paying close attention.
Consider reducing the speed when the audience is distracted, tired,
or comprises many non-native speakers.
These factors are cumulative.
For dictation or during meetings for which live minutes are taken,
a rate of 0.3tmbl is more appropriate.
For languages other than English, should 1tmbl be defined as
the same number of words per minute as 1tmbl in English?
This seems problematic as we do not have a precise definition for word,
and because average word length can vary significantly per language.
Alternatively, defining 1tmbl as
the speed at which Tim Berners-Lee speaks in that language
is also problematic,
given that there are languages that He does not speak at all.
Tim Berners-Lee has provided an alternative definition of the timble, as documented by Doug Schepers: speech at more than 1 timble is difficult to understand;
speech below 1 timble is simply boring.
Doug himself defines it as the uppermost rate of speech
at which a normal person
can understand what’s being said in their native language.
[normal | x-slow | slow | medium | fast | x-fast |<speech-rate>] || <percentage>
Should negative values be allowed for <speech-rate> for reversed speech?
3. Double Rainbow
<gradient> allows sophisticated visual effects,
but they are tedious to write, review and maintain
as non trivial gradients cannot easily be visualised by merely reading the source.
This specification introduces a new syntax to describe a particular kind of <radial-gradient()>: double rainbows.
This spectacular visual effect which would improve most web pages
is currently underused due to the difficulty of specifying it correctly.
<length> or <percentage> gives the radius of the outermost circle of the double rainbow explicitly.
Percentages values are relative to the corresponding dimension of the gradient box.
Negative values are invalid.
If the second argument is omitted, the default value is farthest-side.
This feature was initially introduced by Opera Software.
The following page, when viewed in Opera (between version 11.60 and 12.16),
demonstrates tasteful use of double rainbows: http://media.opera.com/media/press/2011/unicorn/
Thanks especially to the following people for their ideas, feedback, and experimental implementations (in alphabetical order by first name):
Anne van Kesteren,
Bruce Lawson,
Chris Mills,
Doug Schepers,
Daniel Glazman,
Leif Arne Storset,
Paul Verbeek,
Peter Linss,
Tim Berners-Lee (assuming the quotation by Doug correctly records what Tim said).
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.
Advisements are normative sections styled to evoke special attention and are
set apart from other normative text with <strong class="advisement">, like
this: UAs MUST provide an accessible alternative.
Conformance classes
Conformance to this specification
is defined for three conformance classes:
A style sheet is conformant to this specification
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 this specification
if, in addition to interpreting the style sheet as defined by the
appropriate specifications, it supports all the features defined
by this specification 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 this specification
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.
Requirements for Responsible Implementation of CSS
The following sections define several conformance requirements
for implementing CSS responsibly,
in a way that promotes interoperability in the present and future.
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 property 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.
Implementations of Unstable and Proprietary Features
Once a specification reaches the Candidate Recommendation stage,
implementers should release an unprefixed implementation
of any CR-level feature they can demonstrate
to be correctly implemented according to spec,
and should avoid exposing a prefixed variant of that feature.
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.
For languages other than English, should 1tmbl be defined as
the same number of words per minute as 1tmbl in English?
This seems problematic as we do not have a precise definition for word,
and because average word length can vary significantly per language.
Alternatively, defining 1tmbl as
the speed at which Tim Berners-Lee speaks in that language
is also problematic,
given that there are languages that He does not speak at all.
Tim Berners-Lee has provided an alternative definition of the timble, as documented by Doug Schepers: speech at more than 1 timble is difficult to understand;
speech below 1 timble is simply boring.
Doug himself defines it as the uppermost rate of speech
at which a normal person
can understand what’s being said in their native language. ↵
Should negative values be allowed for <speech-rate> for reversed speech? ↵