Skip to content

Instantly share code, notes, and snippets.

View jtini's full-sized avatar

Jeremy Tinianow jtini

View GitHub Profile
@jtini
jtini / get-figma-local-styles
Created July 15, 2020 21:06
Run this in the Figma console to export a .js file with locally defined shared styles
(function() {
const styles = [];
const addStyle = style => {
const rawToken = style.name.match(/\([^()]+\)(?=[^()]*$)/);
let token = null;
if (rawToken && rawToken[0] !== '(Underline)') {
token = `--${rawToken[0].split('(')[1].split(')')[0]}`
}