📐
Angled Edges A Sass mixin for creating angled edges on sections by dynamically encoding SVGs.
Usage
Import partial:
@import "angled-edges";
This mixin has 3 required parameters, location, hypotenuse, & fill.
@include angled-edge($location, $hypotenuse, $fill, $width: 2800, $height: 100);
The main mixin creates an svg right triangle that is encoded, set as a background image of a pseudo element, and absolutely positioned.
Options
Parameter | Description |
---|---|
$location |
Location of shape relative to parent element
|
$hypotenuse |
Side of the right triangle that the hypotenuse is on
|
$fill |
Fill color of triangle |
$width |
Width of triangle - 2800px default |
$height |
Height of triangle - 100px default |
Demo
http://angled-edges.josephfus.co
Browser Support
Anywhere SVG is supported.
- IE 9+
- Edge
- Firefox
- Chrome
- Safari
- Opera
- iOS Safari
- Opera Mini
- Android Browser
- Chrome for Android