Shopify/batman — Issue #176: `data-bind-style` does not work
Author: pvande
Created: 2011-10-11 00:25:07+00:00
State: open

From https://developer.mozilla.org/en/DOM/element.style:

> Except in Opera, styles can _not_ be set by assigning a string to the (read only) `style` property, as in `elt.style = "color: blue;"`.

Using `setAttribute` when the value is a string may be more in keeping with expectations:

> It is generally better to use the `style` property than to use `elt.setAttribute('style', '...')`, since use of the `style` property will not overwrite other CSS properties that may be specified in the `style` attribute.

If the value is a hash, it likely makes more sense to iteratively apply each of the hash's keys to `elt.style`.