Proposal: Scripting detection using CSS media queries | NCZOnline
In essence:
@media screen and not (script) { .foo { color: red; } }
Read the full post for details about current solutions this proposal would address. It’s an interesting line of thinking, especially around device detection using media queries.