During our meetup yesterday I was talking to Maarten Werner, about applying the style of Sketch text layers to a Framer layer.
This is some (intentionally, because subject to change) undocumented API some of you might not know yet, so here's an example of how you might do that:
applyStyles = (sketchLayer) ->
. sketchLayer.image = null
. sketchLayer.html = sketchLayer._info.metadata.string
. for style in sketchLayer._info.metadata.css
. . if _.startsWith style, '/*'
. . . continue
. . matches = /(.*):\s*(.*);/.exec(style)
. . sketchLayer.style[matches] = matches
Here's how you would use it:
It's not perfect (try disabling the "sketchLayer.image = null" line to see the differences), but still might come in handy in some cases.