This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
fontSize is a mess. Its values are only 1-7, and there's no way for us to fix that. I currently try to allow other types of values, like pixel sizes and whatever, but it fails in various cases, and doesn't work with queryCommandValue(). I should allow only 1-7, like browsers do. If we want saner font sizing, we should introduce a new command that takes pt instead.
In the event you introduce a new command, please don't privilege pt. It's used fairly commonly for font-size, but so are other units like px and em.
em is not usable for a WYSIWYG editor, because its meaning varies depending on where you use it in the DOM. So for instance, <h1><i>foo</i></h1> there's a big difference between <h1 style=font-size:1.2em><i>foo</i></h1> and <h1><i style=font-size:1.2em>foo</i></h1> but there's no sensible way to decide which one is intended based on the selection. Also, some commands can move tags around in the DOM, which again can change the meaning of em. However, I don't see any reason to prohibit other absolute units like px or mm, since they're defined in a fixed ratio relative to pt anyway.
yes, I also think that we should disallow em and allow the rest in the new command.
(In reply to comment #2) > em is not usable for a WYSIWYG editor, because its meaning varies depending on > where you use it in the DOM. ... > However, I don't see any reason to prohibit other absolute units like px or mm, > since they're defined in a fixed ratio relative to pt anyway. Makes sense.
https://dvcs.w3.org/hg/editing/rev/031902d853b9