@swc/plugin-styled-jsx 1.5.70 → 1.5.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/Cargo.toml +3 -8
  2. package/package.json +1 -1
  3. package/swc_plugin_styled_jsx.wasm +0 -0
  4. package/transform/Cargo.toml +10 -9
  5. package/transform/src/lib.rs +1 -0
  6. package/transform/src/lifetime.rs +408 -0
  7. package/transform/src/style.rs +3 -0
  8. package/transform/src/transform_css.rs +390 -260
  9. package/transform/src/visitor.rs +14 -1
  10. package/transform/tests/errors/ts-with-css-resolve/output.js +1 -1
  11. package/transform/tests/fixture/css-selector-after-pseudo/output.js +1 -1
  12. package/transform/tests/fixture/fragment/output.js +1 -1
  13. package/transform/tests/fixture/global/output.js +1 -1
  14. package/transform/tests/fixture/global-redundant/output.js +1 -1
  15. package/transform/tests/fixture/issue-30480/input.js +5 -1
  16. package/transform/tests/fixture/issue-30480/output.js +3 -3
  17. package/transform/tests/fixture/issue-30570/output.js +1 -1
  18. package/transform/tests/fixture/styles/output.js +4 -4
  19. package/transform/tests/fixture/tpl-placeholder-1-as-property/output.js +1 -2
  20. package/transform/tests/fixture/tpl-placeholder-4-as-part-of-value-in-multiple/output.js +1 -1
  21. package/transform/tests/fixture/transform-css/input.js +22 -22
  22. package/transform/tests/fixture/transform-css/output.js +3 -3
  23. package/transform/tests/fixture/transform-css-complex-selector/output.js +1 -1
  24. package/transform/tests/fixture/transform-css-complex-selector-2/input.js +12 -0
  25. package/transform/tests/fixture/transform-css-complex-selector-2/output.js +8 -0
  26. package/transform/tests/fixture/transform-css-global/output.js +1 -1
  27. package/transform/tests/fixture/transform-css-media-query/output.js +1 -1
  28. package/transform/tests/fixture/transform-css-normal/output.js +1 -1
  29. package/transform/tests/fixture/transform-css-nth-1/output.js +1 -1
  30. /package/transform/tests/fixture/{expressions → .expressions}/input.js +0 -0
  31. /package/transform/tests/fixture/{expressions → .expressions}/output.js +0 -0
@@ -465,6 +465,7 @@ impl StyledJSXTransformer {
465
465
  let css_span: Span;
466
466
  let is_dynamic;
467
467
  let mut expressions = vec![];
468
+ let mut is_expr_property = vec![];
468
469
  match style_expr {
469
470
  StyleExpr::Str(Str { value, span, .. }) => {
470
471
  hasher.write(value.as_ref().as_bytes());
@@ -489,12 +490,23 @@ impl StyledJSXTransformer {
489
490
  drop_span(expr.clone()).hash(&mut hasher);
490
491
  let mut s = String::new();
491
492
  for i in 0..quasis.len() {
493
+ // TODO: Handle comments
494
+
495
+ let before = &*quasis[i].raw;
496
+ let before = before.trim();
497
+
492
498
  let placeholder = if i == quasis.len() - 1 {
499
+ is_expr_property.push(false);
493
500
  String::new()
501
+ } else if before.ends_with([';', '{']) {
502
+ is_expr_property.push(true);
503
+ format!("__styled-jsx-placeholder-{}__: 0", i)
494
504
  } else {
505
+ is_expr_property.push(false);
495
506
  format!("__styled-jsx-placeholder-{}__", i)
496
507
  };
497
- s = format!("{}{}{}", s, quasis[i].raw, placeholder)
508
+ s.push_str(&quasis[i].raw);
509
+ s.push_str(&placeholder);
498
510
  }
499
511
  css = s;
500
512
  css_span = *span;
@@ -530,6 +542,7 @@ impl StyledJSXTransformer {
530
542
  css_span,
531
543
  is_dynamic,
532
544
  expressions,
545
+ is_expr_property,
533
546
  })
534
547
  }
535
548
 
@@ -1,5 +1,5 @@
1
1
  import _JSXStyle from "styled-jsx/style";
2
2
  export default {
3
- styles: <_JSXStyle id={"71f03d42ea0ec6"}>{".container.jsx-71f03d42ea0ec6{background:#000;color:white;font-weight:700;height:100px}"}</_JSXStyle>,
3
+ styles: <_JSXStyle id={"71f03d42ea0ec6"}>{".container.jsx-71f03d42ea0ec6{color:#fff;background:#000;height:100px;font-weight:700}"}</_JSXStyle>,
4
4
  className: "jsx-71f03d42ea0ec6"
5
5
  };
@@ -4,7 +4,7 @@ function NavigationItem({ active, className }) {
4
4
  active
5
5
  }, className, 'navigation-item') || "")}>
6
6
 
7
- <_JSXStyle id={"2342aae4628612c6"}>{'.navigation-item.jsx-2342aae4628612c6 a::after{content:attr(data-text);content:attr(data-text)/""}'}</_JSXStyle>
7
+ <_JSXStyle id={"2342aae4628612c6"}>{'.navigation-item.jsx-2342aae4628612c6 a:after{content:attr(data-text);content:attr(data-text)/""}'}</_JSXStyle>
8
8
 
9
9
  </span>;
10
10
  }
@@ -28,7 +28,7 @@ export default (()=><>
28
28
 
29
29
  </>
30
30
 
31
- <_JSXStyle id={"6dd5f97e085c0297"}>{"p.jsx-6dd5f97e085c0297{color:cyan}.foo.jsx-6dd5f97e085c0297{font-size:18px;color:hotpink}#head.jsx-6dd5f97e085c0297{text-decoration:underline}"}</_JSXStyle>
31
+ <_JSXStyle id={"6dd5f97e085c0297"}>{"p.jsx-6dd5f97e085c0297{color:#0ff}.foo.jsx-6dd5f97e085c0297{color:#ff69b4;font-size:18px}#head.jsx-6dd5f97e085c0297{text-decoration:underline}"}</_JSXStyle>
32
32
 
33
33
  </>);
34
34
  function Component1() {
@@ -1,7 +1,7 @@
1
1
  import _JSXStyle from "styled-jsx/style";
2
2
  const Test = ()=><div className={"jsx-d47d6adadf14e957"}>
3
3
 
4
- <_JSXStyle id={"d47d6adadf14e957"}>{"body{color:red}:hover{color:red;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-animation:foo 1s ease-out;-moz-animation:foo 1s ease-out;-o-animation:foo 1s ease-out;animation:foo 1s ease-out}div a{display:none}[data-test]>div{color:red}"}</_JSXStyle>
4
+ <_JSXStyle id={"d47d6adadf14e957"}>{"body{color:red}:hover{color:red;animation:1s ease-out foo;display:flex}div a{display:none}[data-test]>div{color:red}"}</_JSXStyle>
5
5
 
6
6
  </div>;
7
7
  const Test2 = ()=><_JSXStyle id={"94239b6d6b42c9b5"}>{"p{color:red}"}</_JSXStyle>;
@@ -4,7 +4,7 @@ export default function IndexPage() {
4
4
 
5
5
  should be blue.
6
6
 
7
- <_JSXStyle id={"b6abd0684ba81871"}>{"div{color:blue}"}</_JSXStyle>
7
+ <_JSXStyle id={"b6abd0684ba81871"}>{"div{color:#00f}"}</_JSXStyle>
8
8
 
9
9
  </div>;
10
10
  }
@@ -2,6 +2,10 @@
2
2
 
3
3
  export default ({ breakPoint }) => (
4
4
  <div>
5
- <style jsx>{`@media (${breakPoint}) {}`}</style>
5
+ <style jsx>{`@media (${breakPoint}) {
6
+ .test {
7
+ margin-bottom: 1em;
8
+ }
9
+ }`}</style>
6
10
  </div>
7
11
  )
@@ -1,15 +1,15 @@
1
1
  import _JSXStyle from "styled-jsx/style";
2
2
  export default (({ breakPoint })=><div className={_JSXStyle.dynamic([
3
3
  [
4
- "5d2a0e645566ce9c",
4
+ "ff798a455a83a572",
5
5
  [
6
6
  breakPoint
7
7
  ]
8
8
  ]
9
9
  ])}>
10
10
 
11
- <_JSXStyle id={"5d2a0e645566ce9c"} dynamic={[
11
+ <_JSXStyle id={"ff798a455a83a572"} dynamic={[
12
12
  breakPoint
13
- ]}>{`@media(${breakPoint}){}`}</_JSXStyle>
13
+ ]}>{`@media (${breakPoint}){.test.__jsx-style-dynamic-selector{margin-bottom:1em}}`}</_JSXStyle>
14
14
 
15
15
  </div>);
@@ -6,7 +6,7 @@ export default function IndexPage() {
6
6
 
7
7
 
8
8
 
9
- <_JSXStyle id={"bbdada4ef17d18ef"}>{"@supports((display:flex)or (display:-webkit-box)or (display:-webkit-flex)or (display:-moz-box)or (display:-ms-flexbox)){h1{color:hotpink}}"}</_JSXStyle>
9
+ <_JSXStyle id={"bbdada4ef17d18ef"}>{"@supports (display:flex){h1{color:#ff69b4}}"}</_JSXStyle>
10
10
 
11
11
  </div>;
12
12
  }
@@ -18,16 +18,16 @@ const b = {
18
18
  styles: <_JSXStyle id={"7a7480dd17e82e07"}>{`div.jsx-7a7480dd17e82e07{color:${colors.green.light}}a.jsx-7a7480dd17e82e07{color:red}`}</_JSXStyle>,
19
19
  className: "jsx-7a7480dd17e82e07"
20
20
  };
21
- const dynamic = (colors1)=>{
21
+ const dynamic = (colors)=>{
22
22
  const b = {
23
23
  styles: <_JSXStyle id={"9f775f199a8dfb95"} dynamic={[
24
- colors1.green.light
25
- ]}>{`div.__jsx-style-dynamic-selector{color:${colors1.green.light}}a.__jsx-style-dynamic-selector{color:red}`}</_JSXStyle>,
24
+ colors.green.light
25
+ ]}>{`div.__jsx-style-dynamic-selector{color:${colors.green.light}}a.__jsx-style-dynamic-selector{color:red}`}</_JSXStyle>,
26
26
  className: _JSXStyle.dynamic([
27
27
  [
28
28
  "9f775f199a8dfb95",
29
29
  [
30
- colors1.green.light
30
+ colors.green.light
31
31
  ]
32
32
  ]
33
33
  ])
@@ -21,8 +21,7 @@ export default class {
21
21
 
22
22
  <_JSXStyle id={"fc144a5ba38f1ea7"} dynamic={[
23
23
  inputSize ? 'height: calc(2 * var(--a)) !important;' : ''
24
- ]}>{`@media only screen{a.__jsx-style-dynamic-selector{${inputSize ? 'height: calc(2 * var(--a)) !important;' : ''}
25
- }}`}</_JSXStyle>
24
+ ]}>{`@media only screen{a.__jsx-style-dynamic-selector{${inputSize ? 'height: calc(2 * var(--a)) !important;' : ''}}`}</_JSXStyle>
26
25
 
27
26
  </div>;
28
27
  }
@@ -24,7 +24,7 @@ export default class {
24
24
  <_JSXStyle id={"b9b97de593829e6"} dynamic={[
25
25
  a || 'var(--c)',
26
26
  b || 'inherit'
27
- ]}>{`.a:hover .b.__jsx-style-dynamic-selector{display:inline-block;padding:0 ${a || 'var(--c)'};color:${b || 'inherit'}}`}</_JSXStyle>
27
+ ]}>{`.a:hover .b.__jsx-style-dynamic-selector{padding:0 ${a || 'var(--c)'};color:${b || 'inherit'};display:inline-block}`}</_JSXStyle>
28
28
 
29
29
  </div>;
30
30
  }
@@ -9,19 +9,19 @@ export default () => (
9
9
  }
10
10
 
11
11
  :global(p) {
12
- color: blue
12
+ color: #001
13
13
  }
14
14
 
15
15
  :global(p){
16
- color: blue;
16
+ color: #002;
17
17
  }
18
18
 
19
19
  :global(p), a {
20
- color: blue;
20
+ color: #003;
21
21
  }
22
22
 
23
23
  :global(.foo + a) {
24
- color: red;
24
+ color: #004;
25
25
  }
26
26
 
27
27
  :global(body) {
@@ -29,27 +29,27 @@ export default () => (
29
29
  }
30
30
 
31
31
  p {
32
- color: red;
32
+ color: #005;
33
33
  }
34
34
 
35
35
  p{
36
- color: red
36
+ color: #006
37
37
  }
38
38
 
39
39
  * {
40
- color: blue;
40
+ color: #007;
41
41
  }
42
42
 
43
43
  [href="woot"] {
44
- color: red;
44
+ color: #008;
45
45
  }
46
46
 
47
47
  p a span {
48
- color: red;
48
+ color: #009;
49
49
  }
50
50
 
51
51
  p :global(span) {
52
- background: blue
52
+ background: #00a
53
53
  }
54
54
 
55
55
  p a[title="'w ' ' t'"] {
@@ -57,11 +57,11 @@ export default () => (
57
57
  }
58
58
 
59
59
  p :global(span:not(.test)) {
60
- color: green
60
+ color: #00b
61
61
  }
62
62
 
63
63
  p, h1 {
64
- color: blue;
64
+ color: #00c;
65
65
  animation: hahaha 3s ease forwards infinite;
66
66
  animation-name: hahaha;
67
67
  animation-delay: 100ms;
@@ -72,35 +72,35 @@ export default () => (
72
72
  }
73
73
 
74
74
  p:hover {
75
- color: red;
75
+ color: #00d;
76
76
  }
77
77
 
78
78
  p::before {
79
- color: red;
79
+ color: #00e;
80
80
  }
81
81
 
82
82
  :hover {
83
- color: red;
83
+ color: #00f;
84
84
  }
85
85
 
86
86
  ::before {
87
- color: red;
87
+ color: #010;
88
88
  }
89
89
 
90
90
  :hover p {
91
- color: red;
91
+ color: #011;
92
92
  }
93
93
 
94
94
  p + a {
95
- color: red;
95
+ color: #012;
96
96
  }
97
97
 
98
98
  p ~ a {
99
- color: red;
99
+ color: #013;
100
100
  }
101
101
 
102
102
  p > a {
103
- color: red;
103
+ color: #014;
104
104
  }
105
105
 
106
106
  @keyframes hahaha {
@@ -115,7 +115,7 @@ export default () => (
115
115
 
116
116
  @media (min-width: 500px) {
117
117
  .test {
118
- color: red;
118
+ color: #015;
119
119
  }
120
120
  }
121
121
 
@@ -145,7 +145,7 @@ export default () => (
145
145
  }
146
146
 
147
147
  .test.is-status .test {
148
- color: red;
148
+ color: #016;
149
149
  }
150
150
 
151
151
  .a-selector:hover,
@@ -1,8 +1,8 @@
1
1
  import _JSXStyle from "styled-jsx/style";
2
- export default (()=><div className={"jsx-768337a97aceabd1"}>
2
+ export default (()=><div className={"jsx-4a27e5cf1c34b3df"}>
3
3
 
4
- <p className={"jsx-768337a97aceabd1"}>test</p>
4
+ <p className={"jsx-4a27e5cf1c34b3df"}>test</p>
5
5
 
6
- <_JSXStyle id={"768337a97aceabd1"}>{'html.jsx-768337a97aceabd1{background-image:-webkit-linear-gradient(bottom,rgba(255,255,255,.8),rgba(255,255,255,.8)),url(/static/background.svg);background-image:-moz-linear-gradient(bottom,rgba(255,255,255,.8),rgba(255,255,255,.8)),url(/static/background.svg);background-image:-o-linear-gradient(bottom,rgba(255,255,255,.8),rgba(255,255,255,.8)),url(/static/background.svg);background-image:linear-gradient(0deg,rgba(255,255,255,.8),rgba(255,255,255,.8)),url(/static/background.svg)}p{color:blue}p{color:blue}p,a.jsx-768337a97aceabd1{color:blue}.foo+a{color:red}body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif}p.jsx-768337a97aceabd1{color:red}p.jsx-768337a97aceabd1{color:red}*.jsx-768337a97aceabd1{color:blue}[href="woot"].jsx-768337a97aceabd1{color:red}p.jsx-768337a97aceabd1 a.jsx-768337a97aceabd1 span.jsx-768337a97aceabd1{color:red}p.jsx-768337a97aceabd1 span{background:blue}p.jsx-768337a97aceabd1 a[title="\'w \' \' t\'"].jsx-768337a97aceabd1{margin:auto}p.jsx-768337a97aceabd1 span:not(.test){color:green}p.jsx-768337a97aceabd1,h1.jsx-768337a97aceabd1{color:blue;-webkit-animation:hahaha 3s ease forwards infinite;-moz-animation:hahaha 3s ease forwards infinite;-o-animation:hahaha 3s ease forwards infinite;animation:hahaha 3s ease forwards infinite;-webkit-animation-name:hahaha;-moz-animation-name:hahaha;-o-animation-name:hahaha;animation-name:hahaha;-webkit-animation-delay:100ms;-moz-animation-delay:100ms;-o-animation-delay:100ms;animation-delay:100ms}p.jsx-768337a97aceabd1{-webkit-animation:hahaha 1s,hehehe 2s;-moz-animation:hahaha 1s,hehehe 2s;-o-animation:hahaha 1s,hehehe 2s;animation:hahaha 1s,hehehe 2s}p.jsx-768337a97aceabd1:hover{color:red}p.jsx-768337a97aceabd1::before{color:red}.jsx-768337a97aceabd1:hover{color:red}.jsx-768337a97aceabd1::before{color:red}.jsx-768337a97aceabd1:hover p.jsx-768337a97aceabd1{color:red}p.jsx-768337a97aceabd1+a.jsx-768337a97aceabd1{color:red}p.jsx-768337a97aceabd1~a.jsx-768337a97aceabd1{color:red}p.jsx-768337a97aceabd1>a.jsx-768337a97aceabd1{color:red}@-webkit-keyframes hahaha{from{top:0}to{top:100}}@-moz-keyframes hahaha{from{top:0}to{top:100}}@-o-keyframes hahaha{from{top:0}to{top:100}}@keyframes hahaha{from{top:0}to{top:100}}@-webkit-keyframes hehehe{from{left:0}to{left:100}}@-moz-keyframes hehehe{from{left:0}to{left:100}}@-o-keyframes hehehe{from{left:0}to{left:100}}@keyframes hehehe{from{left:0}to{left:100}}@media(min-width:500px){.test.jsx-768337a97aceabd1{color:red}}.test.jsx-768337a97aceabd1{display:block}.inline-flex.jsx-768337a97aceabd1{display:-webkit-inline-box;display:-webkit-inline-flex;display:-moz-inline-box;display:-ms-inline-flexbox;display:inline-flex}.flex.jsx-768337a97aceabd1{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.test.jsx-768337a97aceabd1{-webkit-box-shadow:0 0 10px black,inset 0 0 5px black;-moz-box-shadow:0 0 10px black,inset 0 0 5px black;box-shadow:0 0 10px black,inset 0 0 5px black}.test[title=","].jsx-768337a97aceabd1{display:inline-block}.test.is-status.jsx-768337a97aceabd1 .test.jsx-768337a97aceabd1{color:red}.a-selector.jsx-768337a97aceabd1:hover,.a-selector.jsx-768337a97aceabd1:focus{outline:none}@media(min-width:1px)and (max-width:768px){[class*="grid__col--"].jsx-768337a97aceabd1{margin-top:12px;margin-bottom:12px}}@media(max-width:64em){.test.jsx-768337a97aceabd1{margin-bottom:1em}@supports(-moz-appearance:none)and (display:contents){.test.jsx-768337a97aceabd1{margin-bottom:2rem}}}'}</_JSXStyle>
6
+ <_JSXStyle id={"4a27e5cf1c34b3df"}>{"html.jsx-4a27e5cf1c34b3df{background-image:linear-gradient(#fffc,#fffc),url(/static/background.svg)}p{color:#002}a.jsx-4a27e5cf1c34b3df{color:#003}p{color:#003}a+.foo{color:#004}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif}p.jsx-4a27e5cf1c34b3df{color:#006}.jsx-4a27e5cf1c34b3df{color:#007}[href=woot].jsx-4a27e5cf1c34b3df{color:#008}p.jsx-4a27e5cf1c34b3df a.jsx-4a27e5cf1c34b3df span.jsx-4a27e5cf1c34b3df{color:#009}p.jsx-4a27e5cf1c34b3df span{background:#00a}p.jsx-4a27e5cf1c34b3df a[title=\"'w ' ' t'\"].jsx-4a27e5cf1c34b3df{margin:auto}p.jsx-4a27e5cf1c34b3df :not(.test)span{color:#00b}p.jsx-4a27e5cf1c34b3df,h1.jsx-4a27e5cf1c34b3df{color:#00c;animation:3s .1s infinite forwards hahaha}p.jsx-4a27e5cf1c34b3df{animation:1s hahaha,2s hehehe}p.jsx-4a27e5cf1c34b3df:hover{color:#00d}p.jsx-4a27e5cf1c34b3df:before{color:#00e}:hover{color:#00f}:before{color:#010}:hoverp.jsx-4a27e5cf1c34b3df{color:#011}p.jsx-4a27e5cf1c34b3df+a.jsx-4a27e5cf1c34b3df{color:#012}p.jsx-4a27e5cf1c34b3df~a.jsx-4a27e5cf1c34b3df{color:#013}p.jsx-4a27e5cf1c34b3df>a.jsx-4a27e5cf1c34b3df{color:#014}@keyframes hahaha{0%{top:0}to{top:100px}}@keyframes hehehe{0%{left:0}to{left:100px}}@media (width>=500px){.test.jsx-4a27e5cf1c34b3df{color:#015}}.test.jsx-4a27e5cf1c34b3df{display:block}.inline-flex.jsx-4a27e5cf1c34b3df{display:inline-flex}.flex.jsx-4a27e5cf1c34b3df{display:flex}.test.jsx-4a27e5cf1c34b3df{box-shadow:0 0 10px #000,inset 0 0 5px #000}.test[title=\\,].jsx-4a27e5cf1c34b3df{display:inline-block}.test.is-status.jsx-4a27e5cf1c34b3df .test.jsx-4a27e5cf1c34b3df{color:#016}.a-selector.jsx-4a27e5cf1c34b3df:hover,.a-selector.jsx-4a27e5cf1c34b3df:focus{outline:none}@media (width>=1px) and (width<=768px){[class*=grid__col--].jsx-4a27e5cf1c34b3df{margin-top:12px;margin-bottom:12px}}@media (width<=64em){.test.jsx-4a27e5cf1c34b3df{margin-bottom:1em}@supports ((-moz-appearance:none)) and (display:contents){.test.jsx-4a27e5cf1c34b3df{margin-bottom:2rem}}}"}</_JSXStyle>
7
7
 
8
8
  </div>);
@@ -3,6 +3,6 @@ export default (()=><div className={"jsx-713499aa363d6373"}>
3
3
 
4
4
  <p className={"jsx-713499aa363d6373"}>test</p>
5
5
 
6
- <_JSXStyle id={"713499aa363d6373"}>{"p.jsx-713499aa363d6373 a.jsx-713499aa363d6373 span.jsx-713499aa363d6373{color:red}p.jsx-713499aa363d6373 span{background:blue}p.jsx-713499aa363d6373 a[title=\"'w ' ' t'\"].jsx-713499aa363d6373{margin:auto}p.jsx-713499aa363d6373 span:not(.test){color:green}p.jsx-713499aa363d6373,h1.jsx-713499aa363d6373{color:blue;-webkit-animation:hahaha 3s ease forwards infinite;-moz-animation:hahaha 3s ease forwards infinite;-o-animation:hahaha 3s ease forwards infinite;animation:hahaha 3s ease forwards infinite;-webkit-animation-name:hahaha;-moz-animation-name:hahaha;-o-animation-name:hahaha;animation-name:hahaha;-webkit-animation-delay:100ms;-moz-animation-delay:100ms;-o-animation-delay:100ms;animation-delay:100ms}p.jsx-713499aa363d6373{-webkit-animation:hahaha 1s,hehehe 2s;-moz-animation:hahaha 1s,hehehe 2s;-o-animation:hahaha 1s,hehehe 2s;animation:hahaha 1s,hehehe 2s}p.jsx-713499aa363d6373:hover{color:red}p.jsx-713499aa363d6373::before{color:red}.jsx-713499aa363d6373:hover{color:red}.jsx-713499aa363d6373::before{color:red}.jsx-713499aa363d6373:hover p.jsx-713499aa363d6373{color:red}p.jsx-713499aa363d6373+a.jsx-713499aa363d6373{color:red}p.jsx-713499aa363d6373~a.jsx-713499aa363d6373{color:red}p.jsx-713499aa363d6373>a.jsx-713499aa363d6373{color:red}@-webkit-keyframes hahaha{from{top:0}to{top:100}}@-moz-keyframes hahaha{from{top:0}to{top:100}}@-o-keyframes hahaha{from{top:0}to{top:100}}@keyframes hahaha{from{top:0}to{top:100}}@-webkit-keyframes hehehe{from{left:0}to{left:100}}@-moz-keyframes hehehe{from{left:0}to{left:100}}@-o-keyframes hehehe{from{left:0}to{left:100}}@keyframes hehehe{from{left:0}to{left:100}}@media(min-width:500px){.test.jsx-713499aa363d6373{color:red}}.test.jsx-713499aa363d6373{display:block}.inline-flex.jsx-713499aa363d6373{display:-webkit-inline-box;display:-webkit-inline-flex;display:-moz-inline-box;display:-ms-inline-flexbox;display:inline-flex}.flex.jsx-713499aa363d6373{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.test.jsx-713499aa363d6373{-webkit-box-shadow:0 0 10px black,inset 0 0 5px black;-moz-box-shadow:0 0 10px black,inset 0 0 5px black;box-shadow:0 0 10px black,inset 0 0 5px black}.test[title=\",\"].jsx-713499aa363d6373{display:inline-block}.test.is-status.jsx-713499aa363d6373 .test.jsx-713499aa363d6373{color:red}.a-selector.jsx-713499aa363d6373:hover,.a-selector.jsx-713499aa363d6373:focus{outline:none}"}</_JSXStyle>
6
+ <_JSXStyle id={"713499aa363d6373"}>{"p.jsx-713499aa363d6373 a.jsx-713499aa363d6373 span.jsx-713499aa363d6373{color:red}p.jsx-713499aa363d6373 span{background:#00f}p.jsx-713499aa363d6373 a[title=\"'w ' ' t'\"].jsx-713499aa363d6373{margin:auto}p.jsx-713499aa363d6373 :not(.test)span{color:green}p.jsx-713499aa363d6373,h1.jsx-713499aa363d6373{color:#00f;animation:3s .1s infinite forwards hahaha}p.jsx-713499aa363d6373{animation:1s hahaha,2s hehehe}p.jsx-713499aa363d6373:hover,p.jsx-713499aa363d6373:before,:hover,:before,:hoverp.jsx-713499aa363d6373,p.jsx-713499aa363d6373+a.jsx-713499aa363d6373,p.jsx-713499aa363d6373~a.jsx-713499aa363d6373,p.jsx-713499aa363d6373>a.jsx-713499aa363d6373{color:red}@keyframes hahaha{0%{top:0}to{top:100px}}@keyframes hehehe{0%{left:0}to{left:100px}}@media (width>=500px){.test.jsx-713499aa363d6373{color:red}}.test.jsx-713499aa363d6373{display:block}.inline-flex.jsx-713499aa363d6373{display:inline-flex}.flex.jsx-713499aa363d6373{display:flex}.test.jsx-713499aa363d6373{box-shadow:0 0 10px #000,inset 0 0 5px #000}.test[title=\\,].jsx-713499aa363d6373{display:inline-block}.test.is-status.jsx-713499aa363d6373 .test.jsx-713499aa363d6373{color:red}.a-selector.jsx-713499aa363d6373:hover,.a-selector.jsx-713499aa363d6373:focus{outline:none}"}</_JSXStyle>
7
7
 
8
8
  </div>);
@@ -0,0 +1,12 @@
1
+ export default () => (
2
+ <div>
3
+ <p>test</p>
4
+ <style jsx>{`
5
+ .a-selector:hover,
6
+ .a-selector:focus
7
+ {
8
+ outline: none;
9
+ }
10
+ `}</style>
11
+ </div>
12
+ )
@@ -0,0 +1,8 @@
1
+ import _JSXStyle from "styled-jsx/style";
2
+ export default (()=><div className={"jsx-efc590d693035654"}>
3
+
4
+ <p className={"jsx-efc590d693035654"}>test</p>
5
+
6
+ <_JSXStyle id={"efc590d693035654"}>{".a-selector.jsx-efc590d693035654:hover,.a-selector.jsx-efc590d693035654:focus{outline:none}"}</_JSXStyle>
7
+
8
+ </div>);
@@ -3,6 +3,6 @@ export default (()=><div className={"jsx-53fd644ab080300c"}>
3
3
 
4
4
  <p className={"jsx-53fd644ab080300c"}>test</p>
5
5
 
6
- <_JSXStyle id={"53fd644ab080300c"}>{'html.jsx-53fd644ab080300c{background-image:-webkit-linear-gradient(bottom,rgba(255,255,255,.8),rgba(255,255,255,.8)),url(/static/background.svg);background-image:-moz-linear-gradient(bottom,rgba(255,255,255,.8),rgba(255,255,255,.8)),url(/static/background.svg);background-image:-o-linear-gradient(bottom,rgba(255,255,255,.8),rgba(255,255,255,.8)),url(/static/background.svg);background-image:linear-gradient(0deg,rgba(255,255,255,.8),rgba(255,255,255,.8)),url(/static/background.svg)}p{color:blue}p{color:blue}p,a.jsx-53fd644ab080300c{color:blue}.foo+a{color:red}body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif}'}</_JSXStyle>
6
+ <_JSXStyle id={"53fd644ab080300c"}>{"html.jsx-53fd644ab080300c{background-image:linear-gradient(#fffc,#fffc),url(/static/background.svg)}p{color:#00f}a.jsx-53fd644ab080300c{color:#00f}p{color:#00f}a+.foo{color:red}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif}"}</_JSXStyle>
7
7
 
8
8
  </div>);
@@ -3,6 +3,6 @@ export default (()=><div className={"jsx-1f7963ae04c6466a"}>
3
3
 
4
4
  <p className={"jsx-1f7963ae04c6466a"}>test</p>
5
5
 
6
- <_JSXStyle id={"1f7963ae04c6466a"}>{'@media(min-width:1px)and (max-width:768px){[class*="grid__col--"].jsx-1f7963ae04c6466a{margin-top:12px;margin-bottom:12px}}@media(max-width:64em){.test.jsx-1f7963ae04c6466a{margin-bottom:1em}@supports(-moz-appearance:none)and (display:contents){.test.jsx-1f7963ae04c6466a{margin-bottom:2rem}}}'}</_JSXStyle>
6
+ <_JSXStyle id={"1f7963ae04c6466a"}>{"@media (width>=1px) and (width<=768px){[class*=grid__col--].jsx-1f7963ae04c6466a{margin-top:12px;margin-bottom:12px}}@media (width<=64em){.test.jsx-1f7963ae04c6466a{margin-bottom:1em}@supports ((-moz-appearance:none)) and (display:contents){.test.jsx-1f7963ae04c6466a{margin-bottom:2rem}}}"}</_JSXStyle>
7
7
 
8
8
  </div>);
@@ -3,6 +3,6 @@ export default (()=><div className={"jsx-1a19bb4817c105dd"}>
3
3
 
4
4
  <p className={"jsx-1a19bb4817c105dd"}>test</p>
5
5
 
6
- <_JSXStyle id={"1a19bb4817c105dd"}>{'p.jsx-1a19bb4817c105dd{color:red}p.jsx-1a19bb4817c105dd{color:red}*.jsx-1a19bb4817c105dd{color:blue}[href="woot"].jsx-1a19bb4817c105dd{color:red}'}</_JSXStyle>
6
+ <_JSXStyle id={"1a19bb4817c105dd"}>{"p.jsx-1a19bb4817c105dd{color:red}.jsx-1a19bb4817c105dd{color:#00f}[href=woot].jsx-1a19bb4817c105dd{color:red}"}</_JSXStyle>
7
7
 
8
8
  </div>);
@@ -3,6 +3,6 @@ export default (()=><div className={"jsx-938ca197692ef624"}>
3
3
 
4
4
  <p className={"jsx-938ca197692ef624"}>test</p>
5
5
 
6
- <_JSXStyle id={"938ca197692ef624"}>{"li.jsx-938ca197692ef624:nth-child(2){color:lime}"}</_JSXStyle>
6
+ <_JSXStyle id={"938ca197692ef624"}>{"li.jsx-938ca197692ef624:nth-child(2){color:#0f0}"}</_JSXStyle>
7
7
 
8
8
  </div>);