- From: Sebastian Zartner <sebastianzartner@gmail.com>
- Date: Tue, 11 Sep 2012 12:33:10 +0200
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- Cc: Glenn Adams <glenn@skynav.com>, John Daggett <jdaggett@mozilla.com>, www-style list <www-style@w3.org>, Boris Zbarsky <bzbarsky@mit.edu>
On Tue, Sep 11, 2012 at 8:43 AM, Tab Atkins Jr. <jackalmage@gmail.com> wrote: > On Mon, Sep 10, 2012 at 11:37 PM, Sebastian Zartner > <sebastianzartner@gmail.com> wrote: >> How about a compromise? Implement "event.fontface" with "fontface" >> being a CSSFontFaceDescriptors (though I'm not sure if Boris meant it >> to allow directly accessing properties or just via >> getPropertyValue()). >> E.g. event.fontface.fontWeight (and all other font face related >> properties) or event.fontface.getPropertyValue("font-weight") > > This "compromise" still has the exact same problems that I'm > complaining about. They're lesser (by the six characters of > ".style"), but the additional indirection is still completely > unnecessary. This is not an issue that needs to be compromised over. While I first agreed to your suggestion to make the properties directly accessible rethinking it doesn't make sense to me for one reason. The font face properties are not directly related to the event object though the font face style is. Following your suggestion is like making the properties of "event.target" directly available through "event", so e.g. "event.classList", "event.id", to identify the target. You also wouldn't do this, would you? So writing "event.fontface.fontWeight" makes more sense in my eyes than "event.fontWeight". And the argument that it's taking longer to write is not really counting. It just takes a second more. What should actually be reconsidered is why you need to write the "font" prefix for properties inside a @font-face rule. Just writing "family", "weight", "stretch", "style" as you both wrote earlier is more intuitive. Sebastian
Received on Tuesday, 11 September 2012 10:33:38 UTC