Typofix.
[htmlpurifier.git] / docs / ref-css-length.txt
blobaa40559e3da10e1afebac1cb30698fcce03294e5
2 CSS Length Reference
3   To bound, or not to bound, that is the question
5 It's quite a reasonable request, really, and it's already been implemented
6 for HTML.  That is, length bounding.  It makes little sense to let users
7 define text blocks that have a font-size of 63,360 inches (that's a mile,
8 by the way) or a width of forty-fold the parent container.
10 But it's a little more complicated then that. There are multiple units
11 one can use, and we have to a little unit conversion to get things working.
12 Here's what we have:
14 Absolute:
15     1 in ~= 2.54 cm
16     1 cm = 10 mm
17     1 pt = 1/72 in
18     1 pc = 12 pt
20 Relative:
21     1 em ~= 10.0667 px
22     1 ex ~= 0.5 em, though Mozilla Firefox says 1 ex = 6px
23     1 px ~= 1 pt
25 Watch out: font-sizes can also be nested to get successively larger
26 (although I do not relish having to keep track of context font-sizes,
27 this may be necessary, especially for some of the more advanced features
28 for preventing things like white on white).
30     vim: et sw=4 sts=4