Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

31 lines
997B

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