kodyl / stilr

Encapsulated styling for your javascript components with all the power of javascript and CSS combined.
MIT License
236 stars 16 forks source link

`content=""` is not rendered properly #35

Closed webpapaya closed 8 years ago

webpapaya commented 8 years ago

Input

Stylesheet.create({
  heading: {
    ':before': {  content: "" }
  }
});

Output

._3TCwqu:before{content:;}

Expected Output

._3TCwqu:before{content:"";}

I don't know if we can generalize this concept for empty strings that they're rendered as "" or if content should have a special behaviour?

webpapaya commented 8 years ago

just found a work around:

Stylesheet.create({
  heading: {
    ':before': {  content: '""' }
  }
});

I don't know if this issue still needs to be handled or if it should be closed.

danieljuhl commented 8 years ago

I think the latter/your fix is the right thing to do, because you want it to render a string in quotes, as opposed to the normal way of rendering strings in css. I don't see this as an issue, more as something to be aware of. In my opinion, it makes complete sense to double quote the string