Skip to content

Commit

Permalink
fix :global & animation:..} (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
thysultan authored and rauchg committed Mar 5, 2017
1 parent da73cc6 commit f2c3c2d
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"object.entries": "1.0.4",
"source-map": "0.5.6",
"string-hash": "1.1.1",
"stylis": "1.1.11"
"stylis": "1.2.3"
},
"devDependencies": {
"ava": "0.17.0",
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/different-jsx-ids.out.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ const otherColor = 'green';

const A = () => <div data-jsx={924167211}>
<p data-jsx={924167211}>test</p>
<_JSXStyle styleId={924167211} css={`p[data-jsx="924167211"] {color: ${color} }`} />
<_JSXStyle styleId={924167211} css={`p[data-jsx="924167211"] {color: ${color}}`} />
</div>;

const B = () => <div data-jsx={45234319}>
<p data-jsx={45234319}>test</p>
<_JSXStyle styleId={45234319} css={`p[data-jsx="45234319"] {color: ${otherColor} }`} />
<_JSXStyle styleId={45234319} css={`p[data-jsx="45234319"] {color: ${otherColor}}`} />
</div>;

export default (() => <div>
Expand Down
16 changes: 8 additions & 8 deletions test/fixtures/expressions.out.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ const animationDuration = '200ms';

export default (() => <div data-jsx={3422891701}>
<p data-jsx={3422891701}>test</p>
<_JSXStyle styleId={414042974} css={`p.${color}[data-jsx="3422891701"] {color: ${otherColor} }`} />
<_JSXStyle styleId={188072295} css={"p[data-jsx=\"3422891701\"] {color: red }"} />
<_JSXStyle styleId={414042974} css={`p.${color}[data-jsx="3422891701"] {color: ${otherColor}}`} />
<_JSXStyle styleId={188072295} css={"p[data-jsx=\"3422891701\"] {color: red}"} />
<_JSXStyle styleId={806016056} css={`body { background: ${color} }`} />
<_JSXStyle styleId={2278229016} css={`body { background: ${color} }`} />
<_JSXStyle styleId={924167211} css={`p[data-jsx="3422891701"] {color: ${color} }`} />
<_JSXStyle styleId={1586014475} css={`p[data-jsx="3422891701"] {color: ${color} }`} />
<_JSXStyle styleId={3469794077} css={`p[data-jsx="3422891701"] {color: ${darken(color)} }`} />
<_JSXStyle styleId={945380644} css={`p[data-jsx="3422891701"] {color: ${darken(color) + 2} }`} />
<_JSXStyle styleId={4106311606} css={`@media (min-width: ${mediumScreen}) {p[data-jsx="3422891701"] {color: green }p[data-jsx="3422891701"] {color ${`red`}}}p[data-jsx="3422891701"] {color: red }`} />
<_JSXStyle styleId={2369334310} css={`p[data-jsx="3422891701"] {-webkit-animation-duration:${animationDuration};animation-duration:${animationDuration};`} />
<_JSXStyle styleId={924167211} css={`p[data-jsx="3422891701"] {color: ${color}}`} />
<_JSXStyle styleId={1586014475} css={`p[data-jsx="3422891701"] {color: ${color}}`} />
<_JSXStyle styleId={3469794077} css={`p[data-jsx="3422891701"] {color: ${darken(color)}}`} />
<_JSXStyle styleId={945380644} css={`p[data-jsx="3422891701"] {color: ${darken(color) + 2}}`} />
<_JSXStyle styleId={4106311606} css={`@media (min-width: ${mediumScreen}) {p[data-jsx="3422891701"] {color: green}p[data-jsx="3422891701"] {color ${`red`}}}p[data-jsx="3422891701"] {color: red}`} />
<_JSXStyle styleId={2369334310} css={`p[data-jsx="3422891701"] {-webkit-animation-duration:${animationDuration};animation-duration:${animationDuration};}`} />
</div>);
2 changes: 1 addition & 1 deletion test/fixtures/mixed-global-scoped.out.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ const Test = () => <_JSXStyle styleId={188072295} css={"p { color: red }"} />;
export default (() => <div data-jsx={793889750}>
<p data-jsx={793889750}>test</p>
<_JSXStyle styleId={3149549172} css={"body { background: red }"} />
<_JSXStyle styleId={188072295} css={"p[data-jsx=\"793889750\"] {color: red }"} />
<_JSXStyle styleId={188072295} css={"p[data-jsx=\"793889750\"] {color: red}"} />
</div>);
2 changes: 1 addition & 1 deletion test/fixtures/non-styled-jsx-style.out.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import _JSXStyle from 'styled-jsx/style';
export default (() => <div data-jsx={188072295}>
<p data-jsx={188072295}>woot</p>
<style dangerouslySetInnerHTML={{ __html: `body { margin: 0; }` }}></style>
<_JSXStyle styleId={188072295} css={"p[data-jsx=\"188072295\"] {color: red }"} />
<_JSXStyle styleId={188072295} css={"p[data-jsx=\"188072295\"] {color: red}"} />
</div>);
2 changes: 1 addition & 1 deletion test/fixtures/source-maps.out.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import _JSXStyle from 'styled-jsx/style';
export default (() => <div data-jsx={188072295}>
<p data-jsx={188072295}>test</p>
<p data-jsx={188072295}>woot</p>
<_JSXStyle styleId={188072295} css={"p[data-jsx=\"188072295\"] {color: red }\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNvdXJjZS1tYXBzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUlnQixBQUNFIiwiZmlsZSI6InNvdXJjZS1tYXBzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGRlZmF1bHQgKCkgPT4gKFxuICA8ZGl2PlxuICAgIDxwPnRlc3Q8L3A+XG4gICAgPHA+d29vdDwvcD5cbiAgICA8c3R5bGUganN4PnsncCB7IGNvbG9yOiByZWQgfSd9PC9zdHlsZT5cbiAgPC9kaXY+XG4pXG4iXX0= */\n/*@ sourceURL=source-maps.js */"} />
<_JSXStyle styleId={188072295} css={"p[data-jsx=\"188072295\"] {color: red}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNvdXJjZS1tYXBzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUlnQixBQUNFIiwiZmlsZSI6InNvdXJjZS1tYXBzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGRlZmF1bHQgKCkgPT4gKFxuICA8ZGl2PlxuICAgIDxwPnRlc3Q8L3A+XG4gICAgPHA+d29vdDwvcD5cbiAgICA8c3R5bGUganN4PnsncCB7IGNvbG9yOiByZWQgfSd9PC9zdHlsZT5cbiAgPC9kaXY+XG4pXG4iXX0= */\n/*@ sourceURL=source-maps.js */"} />
</div>);
2 changes: 1 addition & 1 deletion test/fixtures/stateless.out.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ export default (() => <div data-jsx={188072295}>
<p data-jsx={188072295}>test</p>
<p data-jsx={188072295}>woot</p>
<p data-jsx={188072295}>woot</p>
<_JSXStyle styleId={188072295} css={"p[data-jsx=\"188072295\"] {color: red }"} />
<_JSXStyle styleId={188072295} css={"p[data-jsx=\"188072295\"] {color: red}"} />
</div>);
2 changes: 1 addition & 1 deletion test/fixtures/transform.out.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/fixtures/whitespace.out.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ export default (() => <div data-jsx={188072295}>
<p data-jsx={188072295}>test</p>
<p data-jsx={188072295}>woot</p>
<p data-jsx={188072295}>woot</p>
<_JSXStyle styleId={188072295} css={"p[data-jsx=\"188072295\"] {color: red }"} />
<_JSXStyle styleId={188072295} css={"p[data-jsx=\"188072295\"] {color: red}"} />
</div>);

0 comments on commit f2c3c2d

Please sign in to comment.