admin
doz
html2pdf_v4.03
htmlpurifier-4.10.0
art
benchmarks
configdoc
docs
dtd
entities
examples
specimens
dev-advanced-api.html
dev-code-quality.txt
dev-config-bcbreaks.txt
dev-config-naming.txt
dev-config-schema.html
dev-flush.html
dev-includes.txt
dev-naming.html
dev-optimization.html
dev-progress.html
enduser-customize.html
enduser-id.html
enduser-overview.txt
enduser-security.txt
enduser-slow.html
enduser-tidy.html
enduser-uri-filter.html
enduser-utf8.html
enduser-youtube.html
fixquotes.htc
index.html
proposal-colors.html
proposal-config.txt
proposal-css-extraction.txt
proposal-errors.txt
proposal-filter-levels.txt
proposal-language.txt
proposal-new-directives.txt
proposal-plists.txt
ref-content-models.txt
ref-css-length.txt
ref-devnetwork.html
ref-html-modularization.txt
ref-proprietary-tags.txt
ref-whatwg.txt
style.css
extras
library
maintenance
plugins
smoketests
tests
.gitattributes
.gitignore
.travis.yml
CREDITS
Doxyfile
INSTALL
INSTALL.fr.utf8
LICENSE
NEWS
README.md
TODO
VERSION
WHATSNEW
WYSIWYG
composer.json
phpdoc.ini
images
prints
prints3
stud
Kennwortwechsel.php
hauptframe.php
htmlpurifier-4.10.0.zip
index.php
index_alt.php
index_db.php
index_frame.htm
index_ldap.php
login.php
logout.php
menuframe.htm
styles_pc.css
testpdf.php
topframe.php
31 lines
1.0 KiB
Plaintext
Executable File
31 lines
1.0 KiB
Plaintext
Executable File
|
|
CSS Length Reference
|
|
To bound, or not to bound, that is the question
|
|
|
|
It's quite a reasonable request, really, and it's already been implemented
|
|
for HTML. That is, length bounding. It makes little sense to let users
|
|
define text blocks that have a font-size of 63,360 inches (that's a mile,
|
|
by the way) or a width of forty-fold the parent container.
|
|
|
|
But it's a little more complicated then that. There are multiple units
|
|
one can use, and we have to a little unit conversion to get things working.
|
|
Here's what we have:
|
|
|
|
Absolute:
|
|
1 in ~= 2.54 cm
|
|
1 cm = 10 mm
|
|
1 pt = 1/72 in
|
|
1 pc = 12 pt
|
|
|
|
Relative:
|
|
1 em ~= 10.0667 px
|
|
1 ex ~= 0.5 em, though Mozilla Firefox says 1 ex = 6px
|
|
1 px ~= 1 pt
|
|
|
|
Watch out: font-sizes can also be nested to get successively larger
|
|
(although I do not relish having to keep track of context font-sizes,
|
|
this may be necessary, especially for some of the more advanced features
|
|
for preventing things like white on white).
|
|
|
|
vim: et sw=4 sts=4
|