Last active
April 24, 2017 21:06
-
-
Save RayPS/9460d020b59fe7a201da65207bb369a0 to your computer and use it in GitHub Desktop.
Framer Make CSS Triangle
This file contains hidden or 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
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" |
Author
RayPS
commented
Sep 26, 2016
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment