mattdesl / dom-css

fast dom CSS styling
MIT License
152 stars 13 forks source link

css string support #11

Open dy opened 8 years ago

dy commented 8 years ago

Hi @mattdesl! I’ve noticed that sometimes it is useful to pass css string directly instead of css object:

css(el, `
font-size: 12px;
font-family: ${fontFamily};
...
`);

Because it alows for avoiding css-in-js notation, which is copy-paste compatible and in other ways handy.

Is there any sense to add css.set(element, string) clause?

mattdesl commented 8 years ago

Cool idea! I'll accept a patch. Probably won't merge until a couple weeks as I'm on vacation. 😁🍾

dy commented 8 years ago

@mattdesl here you go #12