Skip to content

Commit 9524d37

Browse files
committed
Remove support for postcss-styled
1 parent 7f1766b commit 9524d37

File tree

2 files changed

+35
-41
lines changed

2 files changed

+35
-41
lines changed

index.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@ const defaultConfig = {
99
xml: "html",
1010
};
1111

12-
try {
13-
require.resolve("postcss-jsx");
14-
} catch (ex) {
15-
defaultConfig.jsx = "styled";
16-
}
17-
1812
function initSyntax (syntax) {
1913
syntax.stringify = stringify.bind(syntax);
2014
syntax.parse = parse.bind(syntax);

test/fixtures/glamorous.jsx

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,55 +4,55 @@ import glm from 'glamorous';
44
const minWidth = 700;
55
const a = 1
66
const Component1 = glm.a(
7-
/* start */
8-
{
9-
// stylelint-disable-next-line
10-
"unknownProperty": '1.8em', // must not trigger any warnings
11-
unknownProperty: '1.8em', // must not trigger any warnings
12-
[`unknownPropertyaa${a}`]: '1.8em', // must not trigger any warnings
13-
[`unknownProperty` + 1 + "a"]: '1.8em', // must not trigger any warnings
14-
display: 'inline-block',
15-
[`@media (minWidth: ${minWidth}px)`]: {
16-
color: 'red',
17-
},
18-
// unkown pseudo class selector
19-
':focused': {
20-
backgroundColor: 'red',
21-
},
22-
"@fontFace": {
7+
/* start */
8+
{
9+
// stylelint-disable-next-line
10+
"unknownProperty": '1.8em', // must not trigger any warnings
11+
unknownProperty: '1.8em', // must not trigger any warnings
12+
[`unknownPropertyaa${a}`]: '1.8em', // must not trigger any warnings
13+
[`unknownProperty` + 1 + "a"]: '1.8em', // must not trigger any warnings
14+
display: 'inline-block',
15+
[`@media (minWidth: ${minWidth}px)`]: {
16+
color: 'red',
17+
},
18+
// unkown pseudo class selector
19+
':focused': {
20+
backgroundColor: 'red',
21+
},
22+
"@fontFace": {
2323
"fontFamily": 'diyfont',
2424
},
2525
"@page:first": {
2626
margin: "300px"
2727
},
2828
"@charset": "utf-8"
29-
},
30-
// end
31-
({ primary }) => ({
32-
unknownProperty: '1.8em', // unknown prop
33-
...minWidth.length,
34-
color: primary ? '#fff' : '#DA233C',
35-
}),
29+
},
30+
// end
31+
({ primary }) => ({
32+
unknownProperty: '1.8em', // unknown prop
33+
...minWidth.length,
34+
color: primary ? '#fff' : '#DA233C',
35+
}),
3636
);
3737

3838
const Component2 = glm(Component1, {
39-
displayName: 'Component2',
40-
forwardProps: ['shouldRender'],
41-
rootEl: 'div',
39+
displayName: 'Component2',
40+
forwardProps: ['shouldRender'],
41+
rootEl: 'div',
4242
})(props => ({
43-
fontFamily: 'Arial, Arial, sans-serif', // duplicate font-family names
44-
fontSize: props.big ? 36 : 24,
43+
fontFamily: 'Arial, Arial, sans-serif', // duplicate font-family names
44+
fontSize: props.big ? 36 : 24,
4545
}));
4646

4747
const Component3 = glm.div({
48-
padding: '8px 12px',
49-
...Component2
48+
padding: '8px 12px',
49+
...Component2
5050
});
5151

5252
export default () => (
53-
<div>
54-
<Component1 />
55-
<Component2 />
56-
<Component3 />
57-
</div>
53+
<div>
54+
<Component1 />
55+
<Component2 />
56+
<Component3 />
57+
</div>
5858
);

0 commit comments

Comments
 (0)