22.12.2013 Views

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

A user agent conforming to a future CSS specification may accept one or<br />

more of the other rules as well.<br />

Invalid at-keywords. User agents must ignore [p. 42] an invalid at-keyword<br />

together with everything following it, up to and including the next semicolon<br />

(;) or block ({...}), whichever comes first. For example, consider the following:<br />

@three-dee {<br />

@background-lighting {<br />

azimuth: 30deg;<br />

elevation: 190deg;<br />

}<br />

H1 { color: red }<br />

}<br />

H1 { color: blue }<br />

The ’@three-dee’ at-rule is not part of <strong>CSS2</strong>. Therefore, the whole at-rule<br />

(up to, and including, the third right curly brace) is ignored. [p. 42] A <strong>CSS2</strong><br />

user agent ignores [p. 42] it, effectively reducing the style sheet to:<br />

H1 { color: blue }<br />

4.3 Values<br />

4.3.1 Integers and real numbers<br />

Some value types may have integer values (denoted by ) or real<br />

number values (denoted by ). Real numbers and integers are specified<br />

in decimal notation only. An consists of one or more digits "0" to "9". A<br />

can either be an , or it can be zero or more digits followed by<br />

a dot (.) followed by one or more digits. Both integers and real numbers may be<br />

preceded by a "-" or "+" to indicate the sign.<br />

Note that many properties that allow an integer or real number as a value actually<br />

restrict the value to some range, often to a non-negative value.<br />

4.3.2 Lengths<br />

Lengths refer to horizontal or vertical measurements.<br />

The format of a length value (denoted by in this specification) is an<br />

optional sign character (’+’ or ’-’, with ’+’ being the default) im<strong>media</strong>tely followed<br />

by a (with or without a decimal point) im<strong>media</strong>tely followed by a unit<br />

identifier (e.g., px, deg, etc.). After the ’0’ length, the unit identifier is optional.<br />

Some properties allow negative length values, but this may complicate the<br />

formatting model and there may be implementation-specific limits. If a negative<br />

length value cannot be supported, it should be converted to the nearest value<br />

that can be supported.<br />

There are two types of length units: relative and absolute. Relative length units<br />

specify a length relative to another length property. <strong>Style</strong> sheets that use relative<br />

units will more easily scale from one medium to another (e.g., from a computer<br />

display to a laser printer).<br />

Relative units are:<br />

43

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!