- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Sun, 25 May 2014 17:05:37 -0700
- To: Dirk Schulze <dschulze@adobe.com>
- Cc: FX <public-fx@w3.org>, www-style <www-style@w3.org>
On Sun, May 25, 2014 at 12:10 AM, Dirk Schulze <dschulze@adobe.com> wrote: > On May 23, 2014, at 11:32 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote: >>> 2) If no Element was passed, what is the fallback for relative of percentage values? >> >> Generally speaking, these types of things are resolved against a 0 >> length. I suppose that em/rem/etc should be resolved against the UA >> default font and font-size. > > I checked MSCSSMatrix and WebKitCSSMatrix. Both have a method called setMatrixValue which takes a DOMString as argument. This DOMString takes a <transform-list> in the CSS Transforms notation. Percentage length values and relative length values throw a SyntaxError exception for both engines. It is at least another possibility. I am not sure if UAs can access font data without a document even though it should be possible. Yeah, only accepting absolute values is definitely a possibility. There are potentially some relative lengths that might work - if there's a reasonable way to associate the call with some default viewport, it's possible that the viewport-relative units would work, for example. However, that probably wouldn't work in a Worker, for instance. Thinking about it, it seems likely that any relative units that could be resolved to an absolute length without at least a document for context are probably actually just absolute lengths, and we'd refer to them as such. So, it's probably fine to declare that only absolute lengths are allowed in the string arguments. ~TJ
Received on Monday, 26 May 2014 00:06:30 UTC