Marek S. Ł.
@marek@m5l.eu
the data-primary certainly fits my point, but the data-color="red" still bugs me since that's presentational rather than structural. I would rather see things like
<div data-status="error">…</div>
<div data-status="warning">…</div>
<div data-status="info">…</div>
<div data-status="success">…</div>
and then let the CSS decide that error→red, warning→amber, info→blue, and success→green
Otherwise I know m̶a̶n̶a̶g̶e̶r̶s̶ projects where we'd end up with things like
div[data-color="blue"] {
background-color: purple;
}
🤦♂️