css set property with data attribute

CSS
div::after {
  content: attr(data-whatever);
}
Source

Also in CSS: