streamich / nano-css

Distilled CSS-in-JS for gourmet developers
The Unlicense
427 stars 23 forks source link

unitless doesn't work with vcssom #232

Open hnordt opened 5 years ago

hnordt commented 5 years ago

When using vcssom addon, the unitless addon has no effect.

streamich commented 5 years ago

Yeah, currently cssom and vcssom addons are completely separate. But, I guess, it does make sense to integrate them with the rest of the addons.

This line should be changed to something like:

const declarations = renderer.decl(property, newDecl[property]).split(';');
for (var i = 0; i < declarations.length; i++) {
  var parts = declarations[i].split(':');
  style.setProperty(parts[0], parts[1]);
}