I usually saw html data-attribute
(s) for adding certain values / parameters to the html element, for example, Bootstrap, which uses them to “link” to opening modal dialogs, etc.
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
Now I see that the almost well-known CSS structure, Kube , widely uses a simple user attribute in its new version , for example:
<column cols="4">4</column>
<span class="label label-black" outline bold>Black</span>
Other examples in action are visible, for example here .
I did not know that you could use simple user attributes, so I tried to find some source about this, and I found only this old similar question , in which there were noted almost (possibly) compatibility issues.
I am surprised that a CSS structure like Kube might use a similar solution if browser support can be so "fragile" ....
So my question is:
- How good (= cross-compatible) is the Kube approach?
- Is it safe to replace mine
data-attribute
with simple custom ones if, for example, I should only pass true / false values?
This last question is better described by example, so replace <span class="foo" data-boo='true'>Black</span>
with<span class="foo" boo>Black</span>