css-ratiocinator
css-ratiocinator copied to clipboard
Include styles for states (e.g. :hover)
See docs for window.getComputedStyle
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
This: http://stackoverflow.com/questions/311052/setting-css-pseudo-class-rules-from-javascript and this: http://stackoverflow.com/questions/1285033/read-hover-pseudo-class-with-javascript/1285212#1285212 Seem to suggest that there is no really solution to this...
Surely you can access the CSS stylesheet itself somehow and read it out, however, this would defeat what css-ratiocinator is all about, as far as I understand it.
I'll try to find the time to see how Webkit does that in the Developers Tools pane, it might give a hint for a solution.
So, bottom line, nothing to contribute, but left this comment however, to follow up if someone comes with a proper solution :)
Looks like PhantomJS can simulate a real mouse-over event that we can use to check :hover style.
https://github.com/ariya/phantomjs/wiki/API-Reference-WebPage#wiki-webpage-sendEvent