Data Attribute
Hey, i see people using data attributes (or classes, but I've heard data attributes are better for this sort of thing) for things such as different permutations of designs. For example, if i had a card with
or adding a data attribute like this (i see people do this over the html one but to me it seems like the data state requires more to achieve the same effect? is it that it's more semantic to do it this way?):
Thanks in advance.
x at the top and y at the bottom but lets say for the second card i wanted to swap them so y is on the top and x is on the bottom, what would be the difference between swapping them in the html like so:or adding a data attribute like this (i see people do this over the html one but to me it seems like the data state requires more to achieve the same effect? is it that it's more semantic to do it this way?):
Thanks in advance.
