-
-
Save doc22940/17ac3c27851b3bab0b95210e00b0f249 to your computer and use it in GitHub Desktop.
Prints nodes that have fill/stroke colors that aren't linked to a style.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
figma.root.children | |
.flatMap(pageNode => pageNode.findAll(n => true)) | |
.forEach(node => { | |
if ('fills' in node && 'fillStyleId' in node) { | |
if (node.fills !== figma.mixed && node.fills.length > 0 && node.fillStyleId !== '') { | |
print(`${node.name}'s fill color is not linked to a style`); | |
} | |
} | |
if ('strokes' in node && 'strokeStyleId' in node) { | |
if (node.strokes.length > 0 && node.strokeStyleId !== '') { | |
print(`${node.name}'s stroke color is not linked to a style`); | |
} | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment