Removed injectGlobal and keyframes (#2342)
parent
968cc3cb2b
commit
85e0bffa7d
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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")))
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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`] = `
|
||||||
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
Loading…
Reference in New Issue