selectors-api for data attributes
- by MJ
In HTML5, CSS selectors seem to operate well with data-* attributes. For example:
<style>
div[data-foo='bar'] {
background:#eee;
}
</style>
<div data-foo='bar'>colored</div>
<div>not colored</div>
will properly style the first . But, attempts to select such elements using the selectors-api fail. Examples:
…