W3C home > Mailing lists > Public > www-style@w3.org > April 2012

Re: [css3-fonts] Addition of font-size: xxx-large

From: Ryosuke Niwa <rniwa@webkit.org>
Date: Tue, 17 Apr 2012 09:48:48 -0700
Message-ID: <CABNRm632mUcQCK9gOYVbuxUD16s_Js8+OJD=e=XE7k6D-owgzg@mail.gmail.com>
To: John Daggett <jdaggett@mozilla.com>
Cc: Aryeh Gregor <ayg@aryeh.name>, Ehsan Akhgari <ehsan@mozilla.com>, www-style@w3.org
On Tue, Apr 17, 2012 at 5:11 AM, John Daggett <jdaggett@mozilla.com> wrote:

>  > CSS 3 Fonts, like CSS 2.1, defines <absolute-size>s ranging from
> > xx-small to xx-large.  The legacy HTML <font size=1> corresponds to
> > xx-small, 2 is small (skipping x-small), and 3-6 are medium to
> > xx-large.  There is no CSS equivalent to <font size=7> -- 3rem is
> > different because it varies if you change the root element's font
> > size.  I would like to request that a "font-size: xxx-large" value be
> > defined, corresponding to <font size=7> (scaling factor of 3).
> >
> > WebKit already supports "font-size: -webkit-xxx-large".  Both HTML5
> > and HTML Editing APIs refer to a nonexistent CSS value of "xxx-large":
> I don't fully understand the logic behind the desired addition here.
> The <font> element is considered obsolete so why is important to try and
> make features associated with it's functionality interoperable?  Is
> there much use of -webkit-xxx-large?

Because <font size=7> element is what execCommand("fontSize", false, 7);
would generate when styleWithCSS is set to false. What do you suppose UA
should generate when styleWithCSS is true?

> The lack of xxx-large causes significant problems for editing (in the
> > sense of <http://dvcs.w3.org/hg/editing/raw-file/tip/editing.html>).
> > Rich-text editing commands (document.execCommand()) can create styles
> > using either CSS or HTML tags.  The fontSize editing command accepts 1
> > to 7 as parameters, because it was designed before CSS was commonly
> > supported.  The parameters 1 to 6 work fine, but in CSS mode,
> > document.execCommand("fontSize", false, "7") can't do anything useful.
> > WebKit produces -webkit-xxx-large, which isn't interoperable, and
> > Gecko doesn't support CSS mode for fontSize at all.  The editing spec
> > says to output <font size=7> here even in CSS mode.
> Again here, I'm not seeing why following the feature definition leads to
> any sort of problem in real use.  It seems like you could just as well
> trim out the use of 7 from the set of permissible values and not much
> would change.

That won't work at all. The value 7 has been supported since the dawn of
time, and there could be lots of Web contents out there with <font size=7>.
When user selects such contents and copy & paste, remove style, or reapply
style, editing commands would need to split elements, clone elements,
etc... and these operations would likely end up needing spans with inline
style declarations that matches the style of <font size=7> when
styleWithCSS is set to true.

Unless there's really a lot of Webkit-specific content that actually uses
> this.

I bet there is. This is particularly relevant in emails sent by old mail

- Ryosuke
Received on Tuesday, 17 April 2012 16:49:42 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:14 UTC