Skip to content

Commit bb5669e

Browse files
committed
exclude media queries, animations and associated fields
1 parent ee9ab9e commit bb5669e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/runtime/runtimeClient.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ export abstract class RuntimeClient {
106106

107107
css = css.split("\n").map(function(line) {
108108
var trimmedLine = line.trim();
109-
if ((line.indexOf("{") !== -1) && (trimmedLine[0] !== "@") && (["from", "to"].indexOf(trimmedLine.split(" ")[0]) === -1)) {
109+
if ((line.indexOf("{") !== -1) && // selector line
110+
("0123456789@".indexOf(trimmedLine[0]) === -1) && // no animation percentages or @-rules
111+
(["from", "to"].indexOf(trimmedLine.split(" ")[0]) === -1)) { // exclude animation instructions
110112
return trimmedLine.split(",").map(function(section) {
111113
return ".application-container > .program " + section;
112114
}).join(", ");

0 commit comments

Comments
 (0)