CSS attr() polyfill

This polyfill makes it possible to use attr() like it is defined in the spec . You can drag the sliders to manipulate the data-attributes. In Google Chrome you will get instand feedback. Firefox will wait till the user interaction is finished, than the MutationObserver kicks in.

Demos

Simple Demo

  <div class="demo1" data-width="" data-height="">
  

Advanced Demo

  <div class="bar" data-bg-rotation="">
  

Combine with native calc()

  <div class="bar" data-addition="">