Re: [css-houdini-drafts] Proposal: Custom functions for modifying CSS values (#857)

Yeah, thinking on it a bit, I think it would be another set of dependency specifiers, letting you depend on "element identity" or any specific "element attribute".

If you ask for attributes, you get invalidated when those attributes change, and are passed a Map of those attr value/names. (You can probably also register for "*", so you get all attributes; you'd need this to create something `attr()`-like, for instance.)

If you ask for "element identity", you get called separately on each element, and get passed, say, a unique integer for each element (with a guarantee that a given element will always give the same integer, and no two elements alive on the page at the same time will give the same integers). That way you can mix the integer into the starting entropy for your --random() function, ensuring you get a different value for each element.

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

Received on Friday, 26 April 2019 20:35:59 UTC