Am I missing something? This MDN example looked quite useful at first glance:
article[data-columns='3'] {
width: 400px;
}
article[data-columns='4'] {
width: 600px;
}
But this is little different to using
article[myAttr='3']{..., or article.cols3{...
either of which can be manipulated fairly easily with javascript/jQuery.
What would be very powerful is:
article[data-fieldwidth]{
width: data-fieldwidth;
}
but this isn't described anywhere and doesn't work in any of my tests. Is that correct?
width: data-fieldwidth;does't work (incss)