I've looked far and wide and have been unable to find an explanation to this behavior.
Why does HTML5's data-
attribute override my CSS content
property on a common element?
So for example, I have the following element defined:
<th data-module-field="name" class="sortable sorted desc" data-bind="click:sort">Name</th>
And my CSS class is as follows:
.sortable.sorted.desc:after {
content: url(../Images/desc.gif);
margin-left: 3px;
}
With the data-module-field
attribute set, the content image defined in the CSS class doesn't show up. However, if I remove the data-
portion of this attribute (as follows), the content image displays correctly.
<th module-field="name" class="sortable sorted desc" data-bind="click:sort">Name</th>
Can anyone explain why this behavior occurs?