W3C home > Mailing lists > Public > public-houdini@w3.org > January 2015

Style mutation observer

From: Alan Stearns <stearns@adobe.com>
Date: Mon, 19 Jan 2015 22:07:44 +0000
To: "public-houdini@w3.org" <public-houdini@w3.org>
Message-ID: <BBC47540-F8F3-4813-A1E8-77F636FC0D4F@adobe.com>
Hey all,

I’ve been holding off on bringing this up because I don’t have a specific 
suggestion, but I figure we should start talking about how to design 
something like a style mutation observer.



CSS polyfills need to be able to respond to things like:

1. Property value changes for a selector

The immediate need is for computed values. Parsing code would also need 
declared values, but that might be better exposed for rules rather than 
selectors. There should probably be a way to filter for particular 
properties. Polyfills need to run code based on the values of their new 
properties, and possibly on existing property values (like display:none) 
that interact with the new properties.

2. Changes to qSA results for a selector

This might not be strictly necessary, but it would reduce qSA calls. 
Returning a list of added and removed items in the results could reduce 
polyfill record-keeping. Polyfills need to run code for new matches, and 
clean up code on removals.

3. Added/Removed selectors

If style rules change, polyfills need to scan new selectors to see if they 
include relevant declarations, and run clean up code on removed rules.

Please comment on where I’m wrong and what I’ve missed.

Thanks,

Alan
Received on Monday, 19 January 2015 22:08:13 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 11 February 2015 15:47:05 UTC