Data attribute content in CSS

by Lorenzo Brutti

HTML

<div data-content="Some content goes here." data-fill-stroke="#ff0000"></div>

CSS

div {width:100px; height:auto;}
[data-fill-stroke]:before {
	content: attr(data-fill-stroke);
}
[data-fill-stroke]{
  background-color:color(attr(data-fill-stroke));
}