Removed injectGlobal and keyframes (#2342)

master
Simone Picciani 2017-06-29 01:03:33 +02:00 committed by Christopher Chedeau
parent 968cc3cb2b
commit 85e0bffa7d
4 changed files with 2 additions and 68 deletions

View File

@ -159,9 +159,7 @@ function massageAST(ast) {
(ast.tag.type === "Identifier" && (ast.tag.type === "Identifier" &&
(ast.tag.name === "gql" || (ast.tag.name === "gql" ||
ast.tag.name === "graphql" || ast.tag.name === "graphql" ||
ast.tag.name === "css" || ast.tag.name === "css")))
ast.tag.name === "keyframes" ||
ast.tag.name === "injectGlobal")))
) { ) {
newObj.quasi.quasis.forEach(quasi => delete quasi.value); newObj.quasi.quasis.forEach(quasi => delete quasi.value);
} }

View File

@ -306,10 +306,7 @@ function isStyledComponents(path) {
(parent.tag.object.name === "styled" || (parent.tag.object.name === "styled" ||
(/^[A-Z]/.test(parent.tag.object.name) && (/^[A-Z]/.test(parent.tag.object.name) &&
parent.tag.property.name === "extend"))) || parent.tag.property.name === "extend"))) ||
(parent.tag.type === "Identifier" && (parent.tag.type === "Identifier" && parent.tag.name === "css"))
(parent.tag.name === "css" ||
parent.tag.name === "keyframes" ||
parent.tag.name === "injectGlobal")))
); );
} }

View File

@ -44,26 +44,6 @@ margin: 0;
left: 0;right: 0; left: 0;right: 0;
} }
\`; \`;
const fadeIn = keyframes\`
0% {
opacity: 0;
}
100% {
opacity: 1;
}
\`;
injectGlobal\`
@font-face {
font-family: 'Operator Mono' ;
src: url('../fonts/Operator-Mono.ttf');
}
body {
margin: 0;padding:0;
}
\`;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
const Button = styled.a\` const Button = styled.a\`
/* Comment */ /* Comment */
@ -112,27 +92,6 @@ const header = css\`
} }
\`; \`;
const fadeIn = keyframes\`
0% {
opacity: 0;
}
100% {
opacity: 1;
}
\`;
injectGlobal\`
@font-face {
font-family: 'Operator Mono';
src: url('../fonts/Operator-Mono.ttf');
}
body {
margin: 0;
padding: 0;
}
\`;
`; `;
exports[`styled-jsx.js 1`] = ` exports[`styled-jsx.js 1`] = `

View File

@ -41,23 +41,3 @@ margin: 0;
left: 0;right: 0; left: 0;right: 0;
} }
`; `;
const fadeIn = keyframes`
0% {
opacity: 0;
}
100% {
opacity: 1;
}
`;
injectGlobal`
@font-face {
font-family: 'Operator Mono' ;
src: url('../fonts/Operator-Mono.ttf');
}
body {
margin: 0;padding:0;
}
`;