Forum How do I...?

Defining named CSS font-sizes?

spider
Is there a way to control the size of the named CSS absolute sizes:

xx-small
x-small
small
medium
large
x-large
xx-large


I tried setting the body font-size but it seems to have no effect.
mikeday
Not at the moment, these sizes map to 7pt, 9pt, 10pt, 12pt, 14pt, 18pt, and 24pt, respectively.
spider
Argggh! Ok, thanks. I am previewing information at 150dpi for web browser usability reasons (72dpi would eat up too much real estate), yet entering data at 72 dpi. Using the names sizes would let me have WYSWIG much more easily... Now I am guessing some data munging is in order :?

Is there a way to define these specified in any of the CSS standards?
mikeday
You can't override the definition of these font size keywords, but perhaps you could make your own classes instead:
@media screen {
    .font-small { font-size: 9px }
    .font-large { font-size: 14px }
}
@media print {
    .font-small { font-size: 9pt }
    .font-large { font-size: 14pt }
}
...
<span class="font-small">Some small text</span>

Would that help?