This is a naive conversion.

css_length_as_pixels(x, font_size = 12, ...)

Arguments

x

object of type css_length as returned by css_string_to_css_length()

font_size

font size to calculate 'em' with. default: 12

...

other arguments ignored

Value

simple numeric value

Details

For a proper conversion, it would have to take into account the font-size on the root element (for rem units), and various things to do with framepoint and viewing size of the element and its parents.