All Projects → josephfusco → Angled Edges

josephfusco / Angled Edges

Licence: mit
📐 Quickly create angled section edges using only Sass

Projects that are alternatives of or similar to Angled Edges

Mq Scss
Extremely powerful Sass media query mixin. Allows you to create almost any media query you can imagine.
Stars: ✭ 122 (-87.41%)
Mutual labels:  mixins, sass
Feathericon
simply generic vector icon collection - including sketch file, svg files, and font files.
Stars: ✭ 178 (-81.63%)
Mutual labels:  svg, sass
Personal Goals
List of books I've read, projects I've done, videos I've seen, articles I've read or podcasts I've listened to.
Stars: ✭ 75 (-92.26%)
Mutual labels:  svg, sass
Juice
Mixins for Life
Stars: ✭ 274 (-71.72%)
Mutual labels:  mixins, sass
Sassessentials
Repository for my tutorial course: Sass Essential Training on LinkedIn Learning and Lynda.com.
Stars: ✭ 167 (-82.77%)
Mutual labels:  mixins, sass
Mixins
sass mixins
Stars: ✭ 132 (-86.38%)
Mutual labels:  mixins, sass
Svg Sprite
SVG sprites & stacks galore — A low-level Node.js module that takes a bunch of SVG files, optimizes them and bakes them into SVG sprites of several types along with suitable stylesheet resources (e.g. CSS, Sass, LESS, Stylus, etc.)
Stars: ✭ 1,648 (+70.07%)
Mutual labels:  svg, sass
Skeleton Sass
Skeleton Sass is a highly modular version of Skeleton CSS
Stars: ✭ 151 (-84.42%)
Mutual labels:  mixins, sass
Browser Hack Sass Mixins
Browser hack sass mixin - Apply your SCSS to a specific browser - CSS hacks for: IE, Chrome, Firefox, Edge, Opera
Stars: ✭ 170 (-82.46%)
Mutual labels:  mixins, sass
Csshake
CSS classes to move your DOM!
Stars: ✭ 4,531 (+367.6%)
Mutual labels:  mixins, sass
Loopback Include Through Mixin
A mixin to enable including Through model properties
Stars: ✭ 15 (-98.45%)
Mutual labels:  mixins
Three Dots
🔮 CSS loading animations made by single element.
Stars: ✭ 912 (-5.88%)
Mutual labels:  sass
Nuxt Starter
Personnal nuxt starter
Stars: ✭ 30 (-96.9%)
Mutual labels:  sass
Resvg
An SVG rendering library.
Stars: ✭ 964 (-0.52%)
Mutual labels:  svg
React Toggle Switch Demo
Source code for a simple demo app showing how to build a custom toggle switch for React applications.
Stars: ✭ 15 (-98.45%)
Mutual labels:  sass
Real Time Chat Frontend
Chat Frontend developed with React
Stars: ✭ 30 (-96.9%)
Mutual labels:  sass
Diagram Js
A toolbox for displaying and modifying diagrams on the web.
Stars: ✭ 881 (-9.08%)
Mutual labels:  svg
Concur
Sugar for infectious JavaScript inheritance, metaprogramming & mixins
Stars: ✭ 14 (-98.56%)
Mutual labels:  mixins
Hive Framework
A website development framework built with Sass, and incorporating jQuery UI.
Stars: ✭ 14 (-98.56%)
Mutual labels:  sass
Alom
Alom is the lighest, simplest framework ever
Stars: ✭ 33 (-96.59%)
Mutual labels:  sass

Angled Edges 📐 Build Status Bower version npm version

A Sass mixin for creating angled edges on sections by dynamically encoding SVGs.

Need angled edges in regular CSS? Check out the Angled Edges Generator.

angled edge

Usage

Import partial:

@import "angled-edges";

This mixin has 3 required parameters: location, hypotenuse, fill

@include angled-edge($location, $hypotenuse, $fill);

The main mixin creates an svg right triangle that is encoded, set as a background image of a pseudo element, and absolutely positioned.

Examples

https://codepen.io/fusco/pen/mzymKm

Options

Parameter Description
$location Location of shape relative to parent element
  • inside top
  • outside top
  • inside bottom
  • outside bottom
$hypotenuse Side of the right triangle that the hypotenuse is on
  • upper left
  • upper right
  • lower left
  • lower right
$fill Fill color of triangle
$height Optional - Height of triangle - Accepts a unitless integer that is equivalent to height in px
$width Optional - Width of triangle - Accepts a unitless integer that is equivalent to width in px (If nothing is passed triangle will span to a 100% fluid width)

Upgrading from 1.x

Version 2 now defaults with a fluid width of 100%. Since this is the preferred value, width and height parameters have switched order with height now being first. This allows for easier usage where

@include angled-edge('outside bottom', 'lower right', 150);

now means a 150px tall with at a default of 100% width. If a fluid width is not needed, you can still pass in a unitless width like in 1.x. If you previously were using background-size to manipulate the shape, you will need to remove this property as the mixin also uses this to assist with making the shape full-width.

Demo

https://angled-edges.josephfus.co

Browser Support

Anywhere SVG is supported.

  • [x] IE 9+
  • [x] Edge
  • [x] Firefox
  • [x] Chrome
  • [x] Safari
  • [x] Opera
  • [x] iOS Safari
  • [x] Opera Mini
  • [x] Android Browser
  • [x] Chrome for Android

Project Ports

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].