function isStyledJsx({ node, parent, grandparent }) {
  return (
    (grandparent &&
      node.quasis &&
      parent.type === "JSXExpressionContainer" &&
      grandparent.type === "JSXElement" &&
      grandparent.openingElement.name.name === "style" &&
      grandparent.openingElement.attributes.some(
        (attribute) =>
          attribute.type === "JSXAttribute" && attribute.name.name === "jsx",
      )) ||
    (parent?.type === "TaggedTemplateExpression" &&
      parent.tag.type === "Identifier" &&
      parent.tag.name === "css") ||
    (parent?.type === "TaggedTemplateExpression" &&
      parent.tag.type === "MemberExpression" &&
      parent.tag.object.name === "css" &&
      (parent.tag.property.name === "global" ||
        parent.tag.property.name === "resolve"))
  );
}
Template literal in these contexts:
<style jsx>{`div{color:red}`}</style>
css``
css.global``
css.resolve``