@swc/plugin-styled-jsx 1.3.0 → 1.5.2
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.
- package/Cargo.toml +23 -8
- package/package.json +1 -1
- package/src/lib.rs +9 -1
- package/src/style.rs +21 -0
- package/src/transform_css.rs +530 -0
- package/src/utils.rs +370 -0
- package/src/visitor.rs +921 -0
- package/swc_plugin_styled_jsx.wasm +0 -0
- package/tests/errors/nested-style-tags/input.js +31 -0
- package/tests/errors/nested-style-tags/output.js +31 -0
- package/tests/errors/nested-style-tags/output.stderr +21 -0
- package/tests/errors/no-child/input.js +6 -0
- package/tests/errors/no-child/output.js +8 -0
- package/tests/errors/no-child/output.stderr +7 -0
- package/tests/errors/ts-with-css-resolve/input.js +10 -0
- package/tests/errors/ts-with-css-resolve/output.js +5 -0
- package/tests/errors/ts-with-css-resolve/output.stderr +2 -0
- package/tests/errors/two-children/input.js +8 -0
- package/tests/errors/two-children/output.js +12 -0
- package/tests/errors/two-children/output.stderr +9 -0
- package/tests/errors/wrong-child-type/input.js +7 -0
- package/tests/errors/wrong-child-type/output.js +10 -0
- package/tests/errors/wrong-child-type/output.stderr +8 -0
- package/tests/errors/wrong-jsx-expression-type/input.js +7 -0
- package/tests/errors/wrong-jsx-expression-type/output.js +10 -0
- package/tests/errors/wrong-jsx-expression-type/output.stderr +8 -0
- package/tests/fixture/absent/input.js +6 -0
- package/tests/fixture/absent/output.js +7 -0
- package/tests/fixture/attribute-generation-classname-rewriting/input.js +55 -0
- package/tests/fixture/attribute-generation-classname-rewriting/output.js +112 -0
- package/tests/fixture/attribute-generation-modes/input.js +166 -0
- package/tests/fixture/attribute-generation-modes/output.js +228 -0
- package/tests/fixture/class/input.js +14 -0
- package/tests/fixture/class/output.js +12 -0
- package/tests/fixture/comments/input.js +18 -0
- package/tests/fixture/comments/output.js +12 -0
- package/tests/fixture/component-attribute/input.js +11 -0
- package/tests/fixture/component-attribute/output.js +10 -0
- package/tests/fixture/conflicts/input.js +16 -0
- package/tests/fixture/conflicts/output.js +14 -0
- package/tests/fixture/css-selector-after-pseudo/input.js +18 -0
- package/tests/fixture/css-selector-after-pseudo/output.js +11 -0
- package/tests/fixture/css-tag-same-file/input.js +25 -0
- package/tests/fixture/css-tag-same-file/output.js +21 -0
- package/tests/fixture/different-jsx-ids/input.js +23 -0
- package/tests/fixture/different-jsx-ids/output.js +24 -0
- package/tests/fixture/dynamic-element/input.js +56 -0
- package/tests/fixture/dynamic-element/output.js +40 -0
- package/tests/fixture/dynamic-element-class/input.js +32 -0
- package/tests/fixture/dynamic-element-class/output.js +25 -0
- package/tests/fixture/dynamic-element-external/input.js +12 -0
- package/tests/fixture/dynamic-element-external/output.js +12 -0
- package/tests/fixture/dynamic-this-in-arrow/input.js +41 -0
- package/tests/fixture/dynamic-this-in-arrow/output.js +39 -0
- package/tests/fixture/exported-jsx-style/input.js +1 -0
- package/tests/fixture/exported-jsx-style/output.js +1 -0
- package/tests/fixture/exported-non-jsx-style/input.js +1 -0
- package/tests/fixture/exported-non-jsx-style/output.js +1 -0
- package/tests/fixture/expressions/input.js +90 -0
- package/tests/fixture/expressions/output.js +91 -0
- package/tests/fixture/external-nested-scope/input.js +5 -0
- package/tests/fixture/external-nested-scope/output.js +7 -0
- package/tests/fixture/external-stylesheet/input.js +41 -0
- package/tests/fixture/external-stylesheet/output.js +34 -0
- package/tests/fixture/external-stylesheet-global/input.js +19 -0
- package/tests/fixture/external-stylesheet-global/output.js +18 -0
- package/tests/fixture/external-stylesheet-multi-line/input.js +9 -0
- package/tests/fixture/external-stylesheet-multi-line/output.js +9 -0
- package/tests/fixture/fragment/input.js +51 -0
- package/tests/fixture/fragment/output.js +47 -0
- package/tests/fixture/global/input.js +22 -0
- package/tests/fixture/global/output.js +7 -0
- package/tests/fixture/global-child-selector/input.js +10 -0
- package/tests/fixture/global-child-selector/output.js +8 -0
- package/tests/fixture/global-redundant/input.js +12 -0
- package/tests/fixture/global-redundant/output.js +10 -0
- package/tests/fixture/issue-30480/input.js +7 -0
- package/tests/fixture/issue-30480/output.js +15 -0
- package/tests/fixture/issue-30570/input.js +15 -0
- package/tests/fixture/issue-30570/output.js +12 -0
- package/tests/fixture/issue-31562-interpolation-in-mdea/input.js +30 -0
- package/tests/fixture/issue-31562-interpolation-in-mdea/output.js +43 -0
- package/tests/fixture/mixed-global-scoped/input.js +9 -0
- package/tests/fixture/mixed-global-scoped/output.js +11 -0
- package/tests/fixture/multiple-jsx/input.js +43 -0
- package/tests/fixture/multiple-jsx/output.js +32 -0
- package/tests/fixture/nested-style-tags/index.js +0 -0
- package/tests/fixture/nested-style-tags/output.js +0 -0
- package/tests/fixture/non-styled-jsx-style/input.js +7 -0
- package/tests/fixture/non-styled-jsx-style/output.js +12 -0
- package/tests/fixture/not-styled-jsx-tagged-templates/input.js +30 -0
- package/tests/fixture/not-styled-jsx-tagged-templates/output.js +24 -0
- package/tests/fixture/number-after-placeholder/input.js +17 -0
- package/tests/fixture/number-after-placeholder/output.js +17 -0
- package/tests/fixture/one-off-global-selectors/input.js +10 -0
- package/tests/fixture/one-off-global-selectors/output.js +8 -0
- package/tests/fixture/source-maps/input.js +8 -0
- package/tests/fixture/source-maps/output.js +8 -0
- package/tests/fixture/stateless/input.js +8 -0
- package/tests/fixture/stateless/output.js +12 -0
- package/tests/fixture/styles/input.js +57 -0
- package/tests/fixture/styles/output.js +39 -0
- package/tests/fixture/styles-external-invalid/input.js +13 -0
- package/tests/fixture/styles-external-invalid/output.js +9 -0
- package/tests/fixture/styles-external-invalid2/input.js +11 -0
- package/tests/fixture/styles-external-invalid2/output.js +8 -0
- package/tests/fixture/styles2/input.js +6 -0
- package/tests/fixture/styles2/output.js +5 -0
- package/tests/fixture/too-many/input.js +35 -0
- package/tests/fixture/too-many/output.js +49 -0
- package/tests/fixture/tpl-escape-1/input.js +14 -0
- package/tests/fixture/tpl-escape-1/output.js +12 -0
- package/tests/fixture/tpl-escape-2/input.js +17 -0
- package/tests/fixture/tpl-escape-2/output.js +17 -0
- package/tests/fixture/tpl-placeholder-1-as-property/input.js +17 -0
- package/tests/fixture/tpl-placeholder-1-as-property/output.js +29 -0
- package/tests/fixture/tpl-placeholder-2-as-part-of-value/input.js +21 -0
- package/tests/fixture/tpl-placeholder-2-as-part-of-value/output.js +34 -0
- package/tests/fixture/tpl-placeholder-3-as-value/input.js +17 -0
- package/tests/fixture/tpl-placeholder-3-as-value/output.js +28 -0
- package/tests/fixture/tpl-placeholder-4-as-part-of-value-in-multiple/input.js +17 -0
- package/tests/fixture/tpl-placeholder-4-as-part-of-value-in-multiple/output.js +31 -0
- package/tests/fixture/tpl-placeholder-5-values-of-multiple-properties/input.js +16 -0
- package/tests/fixture/tpl-placeholder-5-values-of-multiple-properties/output.js +31 -0
- package/tests/fixture/transform-css/input.js +176 -0
- package/tests/fixture/transform-css/output.js +8 -0
- package/tests/fixture/transform-css-complex-selector/input.js +116 -0
- package/tests/fixture/transform-css-complex-selector/output.js +8 -0
- package/tests/fixture/transform-css-global/input.js +32 -0
- package/tests/fixture/transform-css-global/output.js +8 -0
- package/tests/fixture/transform-css-media-query/input.js +24 -0
- package/tests/fixture/transform-css-media-query/output.js +8 -0
- package/tests/fixture/transform-css-normal/input.js +22 -0
- package/tests/fixture/transform-css-normal/output.js +8 -0
- package/tests/fixture/transform-css-nth-1/input.js +10 -0
- package/tests/fixture/transform-css-nth-1/output.js +8 -0
- package/tests/fixture/whitespace/input.js +12 -0
- package/tests/fixture/whitespace/output.js +12 -0
- package/tests/fixture.rs +87 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import _JSXStyle from "styled-jsx/style";
|
|
2
|
+
export default class {
|
|
3
|
+
render() {
|
|
4
|
+
return <div className={_JSXStyle.dynamic([
|
|
5
|
+
[
|
|
6
|
+
"fc144a5ba38f1ea7",
|
|
7
|
+
[
|
|
8
|
+
inputSize ? 'height: calc(2 * var(--a)) !important;' : ''
|
|
9
|
+
]
|
|
10
|
+
]
|
|
11
|
+
])}>
|
|
12
|
+
|
|
13
|
+
<p className={_JSXStyle.dynamic([
|
|
14
|
+
[
|
|
15
|
+
"fc144a5ba38f1ea7",
|
|
16
|
+
[
|
|
17
|
+
inputSize ? 'height: calc(2 * var(--a)) !important;' : ''
|
|
18
|
+
]
|
|
19
|
+
]
|
|
20
|
+
])}>test</p>
|
|
21
|
+
|
|
22
|
+
<_JSXStyle id={"fc144a5ba38f1ea7"} dynamic={[
|
|
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>
|
|
26
|
+
|
|
27
|
+
</div>;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export default class {
|
|
2
|
+
render() {
|
|
3
|
+
return (
|
|
4
|
+
<div>
|
|
5
|
+
<p>test</p>
|
|
6
|
+
<style jsx>{`
|
|
7
|
+
:global(.a):hover .b {
|
|
8
|
+
a: ${a[b]}px !important;
|
|
9
|
+
b: translate3d(
|
|
10
|
+
0,
|
|
11
|
+
${-1 * (c || 0)}px,
|
|
12
|
+
-${d}px
|
|
13
|
+
)
|
|
14
|
+
scale(1) !important;
|
|
15
|
+
}
|
|
16
|
+
`}</style>
|
|
17
|
+
</div>
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import _JSXStyle from "styled-jsx/style";
|
|
2
|
+
export default class {
|
|
3
|
+
render() {
|
|
4
|
+
return <div className={_JSXStyle.dynamic([
|
|
5
|
+
[
|
|
6
|
+
"73606d02cbadabf",
|
|
7
|
+
[
|
|
8
|
+
a[b],
|
|
9
|
+
-1 * (c || 0),
|
|
10
|
+
d
|
|
11
|
+
]
|
|
12
|
+
]
|
|
13
|
+
])}>
|
|
14
|
+
|
|
15
|
+
<p className={_JSXStyle.dynamic([
|
|
16
|
+
[
|
|
17
|
+
"73606d02cbadabf",
|
|
18
|
+
[
|
|
19
|
+
a[b],
|
|
20
|
+
-1 * (c || 0),
|
|
21
|
+
d
|
|
22
|
+
]
|
|
23
|
+
]
|
|
24
|
+
])}>test</p>
|
|
25
|
+
|
|
26
|
+
<_JSXStyle id={"73606d02cbadabf"} dynamic={[
|
|
27
|
+
a[b],
|
|
28
|
+
-1 * (c || 0),
|
|
29
|
+
d
|
|
30
|
+
]}>{`.a:hover .b.__jsx-style-dynamic-selector{a:${a[b]}px!important;b:translate3d(0,${-1 * (c || 0)}px,-${d}px)scale(1)!important}`}</_JSXStyle>
|
|
31
|
+
|
|
32
|
+
</div>;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import _JSXStyle from "styled-jsx/style";
|
|
2
|
+
export default class {
|
|
3
|
+
render() {
|
|
4
|
+
return <div className={_JSXStyle.dynamic([
|
|
5
|
+
[
|
|
6
|
+
"e37942245bf0eb35",
|
|
7
|
+
[
|
|
8
|
+
a
|
|
9
|
+
]
|
|
10
|
+
]
|
|
11
|
+
])}>
|
|
12
|
+
|
|
13
|
+
<p className={_JSXStyle.dynamic([
|
|
14
|
+
[
|
|
15
|
+
"e37942245bf0eb35",
|
|
16
|
+
[
|
|
17
|
+
a
|
|
18
|
+
]
|
|
19
|
+
]
|
|
20
|
+
])}>test</p>
|
|
21
|
+
|
|
22
|
+
<_JSXStyle id={"e37942245bf0eb35"} dynamic={[
|
|
23
|
+
a
|
|
24
|
+
]}>{`@media only screen{a.__jsx-style-dynamic-selector{color:${a}}}`}</_JSXStyle>
|
|
25
|
+
|
|
26
|
+
</div>;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import _JSXStyle from "styled-jsx/style";
|
|
2
|
+
export default class {
|
|
3
|
+
render() {
|
|
4
|
+
return <div className={_JSXStyle.dynamic([
|
|
5
|
+
[
|
|
6
|
+
"b9b97de593829e6",
|
|
7
|
+
[
|
|
8
|
+
a || 'var(--c)',
|
|
9
|
+
b || 'inherit'
|
|
10
|
+
]
|
|
11
|
+
]
|
|
12
|
+
])}>
|
|
13
|
+
|
|
14
|
+
<p className={_JSXStyle.dynamic([
|
|
15
|
+
[
|
|
16
|
+
"b9b97de593829e6",
|
|
17
|
+
[
|
|
18
|
+
a || 'var(--c)',
|
|
19
|
+
b || 'inherit'
|
|
20
|
+
]
|
|
21
|
+
]
|
|
22
|
+
])}>test</p>
|
|
23
|
+
|
|
24
|
+
<_JSXStyle id={"b9b97de593829e6"} dynamic={[
|
|
25
|
+
a || 'var(--c)',
|
|
26
|
+
b || 'inherit'
|
|
27
|
+
]}>{`.a:hover .b.__jsx-style-dynamic-selector{display:inline-block;padding:0 ${a || 'var(--c)'};color:${b || 'inherit'}}`}</_JSXStyle>
|
|
28
|
+
|
|
29
|
+
</div>;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import _JSXStyle from "styled-jsx/style";
|
|
2
|
+
export default class {
|
|
3
|
+
render() {
|
|
4
|
+
return <div className={_JSXStyle.dynamic([
|
|
5
|
+
[
|
|
6
|
+
"23692842dc904882",
|
|
7
|
+
[
|
|
8
|
+
a ? '100%' : '200px',
|
|
9
|
+
b ? '0' : '8px 20px'
|
|
10
|
+
]
|
|
11
|
+
]
|
|
12
|
+
])}>
|
|
13
|
+
|
|
14
|
+
<p className={_JSXStyle.dynamic([
|
|
15
|
+
[
|
|
16
|
+
"23692842dc904882",
|
|
17
|
+
[
|
|
18
|
+
a ? '100%' : '200px',
|
|
19
|
+
b ? '0' : '8px 20px'
|
|
20
|
+
]
|
|
21
|
+
]
|
|
22
|
+
])}>test</p>
|
|
23
|
+
|
|
24
|
+
<_JSXStyle id={"23692842dc904882"} dynamic={[
|
|
25
|
+
a ? '100%' : '200px',
|
|
26
|
+
b ? '0' : '8px 20px'
|
|
27
|
+
]}>{`.item.__jsx-style-dynamic-selector{max-width:${a ? '100%' : '200px'};padding:${b ? '0' : '8px 20px'}}`}</_JSXStyle>
|
|
28
|
+
|
|
29
|
+
</div>;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
export default () => (
|
|
2
|
+
<div>
|
|
3
|
+
<p>test</p>
|
|
4
|
+
<style jsx>{`
|
|
5
|
+
html {
|
|
6
|
+
background-image:
|
|
7
|
+
linear-gradient(0deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)),
|
|
8
|
+
url(/static/background.svg);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:global(p) {
|
|
12
|
+
color: blue
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:global(p){
|
|
16
|
+
color: blue;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:global(p), a {
|
|
20
|
+
color: blue;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:global(.foo + a) {
|
|
24
|
+
color: red;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:global(body) {
|
|
28
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
p {
|
|
32
|
+
color: red;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
p{
|
|
36
|
+
color: red
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
* {
|
|
40
|
+
color: blue;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
[href="woot"] {
|
|
44
|
+
color: red;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
p a span {
|
|
48
|
+
color: red;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
p :global(span) {
|
|
52
|
+
background: blue
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
p a[title="'w ' ' t'"] {
|
|
56
|
+
margin: auto
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
p :global(span:not(.test)) {
|
|
60
|
+
color: green
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
p, h1 {
|
|
64
|
+
color: blue;
|
|
65
|
+
animation: hahaha 3s ease forwards infinite;
|
|
66
|
+
animation-name: hahaha;
|
|
67
|
+
animation-delay: 100ms;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
p {
|
|
71
|
+
animation: hahaha 1s, hehehe 2s;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
p:hover {
|
|
75
|
+
color: red;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
p::before {
|
|
79
|
+
color: red;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
:hover {
|
|
83
|
+
color: red;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
::before {
|
|
87
|
+
color: red;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
:hover p {
|
|
91
|
+
color: red;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
p + a {
|
|
95
|
+
color: red;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
p ~ a {
|
|
99
|
+
color: red;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
p > a {
|
|
103
|
+
color: red;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@keyframes hahaha {
|
|
107
|
+
from { top: 0 }
|
|
108
|
+
to { top: 100 }
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@keyframes hehehe {
|
|
112
|
+
from { left: 0 }
|
|
113
|
+
to { left: 100 }
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
@media (min-width: 500px) {
|
|
117
|
+
.test {
|
|
118
|
+
color: red;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.test {
|
|
123
|
+
/* test, test */
|
|
124
|
+
display: block;
|
|
125
|
+
/*
|
|
126
|
+
|
|
127
|
+
test
|
|
128
|
+
*/
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.inline-flex {
|
|
132
|
+
display: inline-flex;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.flex {
|
|
136
|
+
display: flex;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.test {
|
|
140
|
+
box-shadow: 0 0 10px black, inset 0 0 5px black
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.test[title=","] {
|
|
144
|
+
display: inline-block;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.test.is-status .test {
|
|
148
|
+
color: red;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.a-selector:hover,
|
|
152
|
+
.a-selector:focus
|
|
153
|
+
{
|
|
154
|
+
outline: none;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
@media (min-width: 1px) and (max-width: 768px) {
|
|
158
|
+
[class*='grid__col--'] {
|
|
159
|
+
margin-top: 12px;
|
|
160
|
+
margin-bottom: 12px;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
@media (max-width: 64em) {
|
|
165
|
+
.test {
|
|
166
|
+
margin-bottom: 1em;
|
|
167
|
+
}
|
|
168
|
+
@supports (-moz-appearance: none) and (display: contents) {
|
|
169
|
+
.test {
|
|
170
|
+
margin-bottom: 2rem;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
`}</style>
|
|
175
|
+
</div>
|
|
176
|
+
)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import _JSXStyle from "styled-jsx/style";
|
|
2
|
+
export default (()=><div className={"jsx-768337a97aceabd1"}>
|
|
3
|
+
|
|
4
|
+
<p className={"jsx-768337a97aceabd1"}>test</p>
|
|
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>
|
|
7
|
+
|
|
8
|
+
</div>);
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
export default () => (
|
|
2
|
+
<div>
|
|
3
|
+
<p>test</p>
|
|
4
|
+
<style jsx>{`
|
|
5
|
+
p a span {
|
|
6
|
+
color: red;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
p :global(span) {
|
|
10
|
+
background: blue
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
p a[title="'w ' ' t'"] {
|
|
14
|
+
margin: auto
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
p :global(span:not(.test)) {
|
|
18
|
+
color: green
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
p, h1 {
|
|
22
|
+
color: blue;
|
|
23
|
+
animation: hahaha 3s ease forwards infinite;
|
|
24
|
+
animation-name: hahaha;
|
|
25
|
+
animation-delay: 100ms;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
p {
|
|
29
|
+
animation: hahaha 1s, hehehe 2s;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
p:hover {
|
|
33
|
+
color: red;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
p::before {
|
|
37
|
+
color: red;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:hover {
|
|
41
|
+
color: red;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
::before {
|
|
45
|
+
color: red;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:hover p {
|
|
49
|
+
color: red;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
p + a {
|
|
53
|
+
color: red;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
p ~ a {
|
|
57
|
+
color: red;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
p > a {
|
|
61
|
+
color: red;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@keyframes hahaha {
|
|
65
|
+
from { top: 0 }
|
|
66
|
+
to { top: 100 }
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@keyframes hehehe {
|
|
70
|
+
from { left: 0 }
|
|
71
|
+
to { left: 100 }
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@media (min-width: 500px) {
|
|
75
|
+
.test {
|
|
76
|
+
color: red;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.test {
|
|
81
|
+
/* test, test */
|
|
82
|
+
display: block;
|
|
83
|
+
/*
|
|
84
|
+
|
|
85
|
+
test
|
|
86
|
+
*/
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.inline-flex {
|
|
90
|
+
display: inline-flex;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.flex {
|
|
94
|
+
display: flex;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.test {
|
|
98
|
+
box-shadow: 0 0 10px black, inset 0 0 5px black
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.test[title=","] {
|
|
102
|
+
display: inline-block;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.test.is-status .test {
|
|
106
|
+
color: red;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.a-selector:hover,
|
|
110
|
+
.a-selector:focus
|
|
111
|
+
{
|
|
112
|
+
outline: none;
|
|
113
|
+
}
|
|
114
|
+
`}</style>
|
|
115
|
+
</div>
|
|
116
|
+
)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import _JSXStyle from "styled-jsx/style";
|
|
2
|
+
export default (()=><div className={"jsx-713499aa363d6373"}>
|
|
3
|
+
|
|
4
|
+
<p className={"jsx-713499aa363d6373"}>test</p>
|
|
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>
|
|
7
|
+
|
|
8
|
+
</div>);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export default () => (
|
|
2
|
+
<div>
|
|
3
|
+
<p>test</p>
|
|
4
|
+
<style jsx>{`
|
|
5
|
+
html {
|
|
6
|
+
background-image:
|
|
7
|
+
linear-gradient(0deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)),
|
|
8
|
+
url(/static/background.svg);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:global(p) {
|
|
12
|
+
color: blue
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:global(p){
|
|
16
|
+
color: blue;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:global(p), a {
|
|
20
|
+
color: blue;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:global(.foo + a) {
|
|
24
|
+
color: red;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:global(body) {
|
|
28
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
|
|
29
|
+
}
|
|
30
|
+
`}</style>
|
|
31
|
+
</div>
|
|
32
|
+
)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import _JSXStyle from "styled-jsx/style";
|
|
2
|
+
export default (()=><div className={"jsx-53fd644ab080300c"}>
|
|
3
|
+
|
|
4
|
+
<p className={"jsx-53fd644ab080300c"}>test</p>
|
|
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>
|
|
7
|
+
|
|
8
|
+
</div>);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export default () => (
|
|
2
|
+
<div>
|
|
3
|
+
<p>test</p>
|
|
4
|
+
<style jsx>{`
|
|
5
|
+
@media (min-width: 1px) and (max-width: 768px) {
|
|
6
|
+
[class*='grid__col--'] {
|
|
7
|
+
margin-top: 12px;
|
|
8
|
+
margin-bottom: 12px;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@media (max-width: 64em) {
|
|
13
|
+
.test {
|
|
14
|
+
margin-bottom: 1em;
|
|
15
|
+
}
|
|
16
|
+
@supports (-moz-appearance: none) and (display: contents) {
|
|
17
|
+
.test {
|
|
18
|
+
margin-bottom: 2rem;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
`}</style>
|
|
23
|
+
</div>
|
|
24
|
+
)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import _JSXStyle from "styled-jsx/style";
|
|
2
|
+
export default (()=><div className={"jsx-1f7963ae04c6466a"}>
|
|
3
|
+
|
|
4
|
+
<p className={"jsx-1f7963ae04c6466a"}>test</p>
|
|
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>
|
|
7
|
+
|
|
8
|
+
</div>);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import _JSXStyle from "styled-jsx/style";
|
|
2
|
+
export default (()=><div className={"jsx-1a19bb4817c105dd"}>
|
|
3
|
+
|
|
4
|
+
<p className={"jsx-1a19bb4817c105dd"}>test</p>
|
|
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>
|
|
7
|
+
|
|
8
|
+
</div>);
|