Collection of LESS mixins for various shapes
Shape.LESS is a collection of mixins for CSS shapes that we often use in web applications. The aim of this project is to reduce the repitive tasks of a developer required to create shapes using CSS.
You can download it with Bower:
$ bower install shape.less
Import the less/shape.less file in your own LESS files, and start using it right away:
@import "path-to-shape.less/less/shape.less";
.my-square {
.shape-square(100px);
}
.rectangle {
.shape-rectangle(100px, 50px);
}
.square {
.shape-square(50px);
}
.circle {
.shape-circle(50px);
}
.circle {
.shape-oval(50px);
}
.triangle-up {
.shape-triangle-up(50px);
}
.triangle-down {
.shape-triangle-down(50px);
}
.triangle-left {
.shape-triangle-left(50px);
}
.triangle-right {
.shape-triangle-right(50px);
}
.triangle-top-left {
.shape-triangle-top-left(50px);
}
.triangle-top-right {
.shape-triangle-top-right(50px);
}
.triangle-bottom-left {
.shape-triangle-bottom-left(50px);
}
.triangle-bottom-right {
.shape-triangle-bottom-right(50px);
}
Special thanks to Chris Coyier for his Shapes of CSS article.