Skip to content

Instantly share code, notes, and snippets.

@RayPS
Last active April 24, 2017 21:06
Show Gist options
  • Save RayPS/9460d020b59fe7a201da65207bb369a0 to your computer and use it in GitHub Desktop.
Save RayPS/9460d020b59fe7a201da65207bb369a0 to your computer and use it in GitHub Desktop.
Framer Make CSS Triangle
Layer::makeTriangle = (direction)->
this.borderColor = "transparent"
this.borderWidth = this.width / 2
this.style["border-#{direction}-color"] = this.backgroundColor.toHexString()
this.backgroundColor = "transparent"
# ----------
rect = new Layer
size: 20
backgroundColor: "black"
point: Align.center
rect.makeTriangle "bottom"
# Directions: "top", "right", "bottom", "left"
@RayPS
Copy link
Author

RayPS commented Sep 26, 2016

sep-27-2016 00-58-53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment