Get computed font size for DOM element in JS
- by Pekka
Is it possible to detect the computed font-size of a DOM element, taking into consideration generic settings made elsewhere (In the body tag for example), inherited values, and so on?
A framework-independent approach would be nice, as I'm working on a script that should work standalone, but that is not a requirement of course.
Background: I'm trying to tweak CKEditor's font selector plugin (source here) so that it always shows the font size of the current cursor position (as opposed to only when within a span that has an explicit font-size set, which is the current behaviour).