From c233e4f178bd42066b071f9b792af3e76e4e3a40 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sat, 24 Feb 2018 15:27:36 -0500 Subject: [PATCH] generate a class selector instead of an attribute selector --- src/css/Stylesheet.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/css/Stylesheet.ts b/src/css/Stylesheet.ts index 200e73f582..e3e4a2dd65 100644 --- a/src/css/Stylesheet.ts +++ b/src/css/Stylesheet.ts @@ -69,7 +69,7 @@ class Rule { transform(code: MagicString, id: string, keyframes: Map, cascade: boolean) { if (this.parent && this.parent.node.type === 'Atrule' && this.parent.node.name === 'keyframes') return true; - const attr = `[${id}]`; + const attr = `.${id}`; if (cascade) { this.selectors.forEach(selector => {