You need the attr
CSS function:
div {
width: attr(data-width);
}
The problem is that (as of 2021) it’s not supported even by some of the major browsers (in my case Chrome):
You need the attr
CSS function:
div {
width: attr(data-width);
}
The problem is that (as of 2021) it’s not supported even by some of the major browsers (in my case Chrome):