Re: [css-houdini-drafts] CSS operations static or not static?

Hmm, the discussion in #50 asserts that "CSS is Window scoped", but I 
don't think that's backed up by any spec at this point.  The two 
existing specs that I'm aware of which put stuff in the `CSS` 
interface so far ([cssom-1](https://drafts.csswg.org/cssom-1/#css) and
 
[css-conditional-3](https://drafts.csswg.org/css-conditional-3/#the-css-interface))
 both simply say:

> The CSS interface holds useful CSS-related functions that do not 
belong elsewhere

...and the functions that they added (`escape()`, `supports()`) aren't
 obviously scope-specific at this point.

(BUT, I suppose `supports()` will need to *become* Window-specific 
after the Properties and Values API is implemented, if type-restricted
 custom properties are intended to be recognized in `CSS.supports()` 
invocations.... so that e.g. `CSS.supports("--my-logo-color:red")` 
will have the correct behavior in documents that do vs. don't register
 that custom property.)

So I think I agree that CSS needs to *become* Window (or document?) 
specific, if it's not already, in order for supports to meaningfully 
work.

-- 
GitHub Notification of comment by dholbert
Please view or discuss this issue at 
https://github.com/w3c/css-houdini-drafts/issues/216#issuecomment-224776626
 using your GitHub account

Received on Thursday, 9 June 2016 01:11:36 UTC