Skip to content

Instantly share code, notes, and snippets.

@benashman
Last active December 17, 2015 21:10
Show Gist options
  • Save benashman/5673212 to your computer and use it in GitHub Desktop.
Save benashman/5673212 to your computer and use it in GitHub Desktop.
Adventures in border-radius…
@rounded_top_mask = CAShapeLayer.layer
@rounded_top_mask.path = UIBezierPath.bezierPathWithRoundedRect(@insight_header.bounds, byRoundingCorners: UIRectCornerTopLeft | UIRectCornerTopRight, cornerRadii: CGSizeMake(4, 4)).CGPath
@insight_header.layer.mask = @rounded_top_mask
.vs.
.insight-header {
border-radius: 4px 4px 0 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment