diff --git a/.changeset/long-taxis-give.md b/.changeset/long-taxis-give.md new file mode 100644 index 0000000000..1f76124616 --- /dev/null +++ b/.changeset/long-taxis-give.md @@ -0,0 +1,5 @@ +--- +'@emotion/cache': patch +--- + +Fix Issue #2917 - Update createUnsafeSelectorsAlarm to handle multi-line parsed styles diff --git a/packages/cache/src/stylis-plugins.ts b/packages/cache/src/stylis-plugins.ts index f007fb4254..fb5df0a817 100644 --- a/packages/cache/src/stylis-plugins.ts +++ b/packages/cache/src/stylis-plugins.ts @@ -217,7 +217,7 @@ export let createUnsafeSelectorsAlarm = // } // with such inputs we wouldn't have to search for the comment at all // TODO: consider changing this comment placement in the next major version - if (node.column < element.column) { + if (node.line === element.line && node.column < element.column) { if (isIgnoringComment(node)) { return }