• Stars
    star
    970
  • Rank 47,174 (Top 1.0 %)
  • Language
    CSS
  • License
    MIT License
  • Created over 8 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

πŸ“ Quickly create angled section edges using only 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.

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

Project Ports

More Repositories

1

ig-follow-count

πŸ“ˆ A simple Instagram analytics tool that continuously logs and graphs your follower count.
CSS
39
star
2

advanced-custom-fields-viewer

πŸ”Œ View ACF data on the front-end of a theme
PHP
23
star
3

disable-responsive-images

πŸ”Œ WordPress plugin that disables responsive images introduced in 4.4
PHP
9
star
4

wp-self-destruct

Wipe out your entire site with one click, including the database.
PHP
5
star
5

select64

πŸ”½ Quickly generate variations of common select element backgrounds.
JavaScript
5
star
6

symlinked-plugin-branch

Easily identify the current git branch of your symlinked WordPress plugins.
PHP
5
star
7

APFT

πŸ‡ΊπŸ‡Έ Army Physical Fitness Test calculator built with React
JavaScript
4
star
8

wp-git-branch

πŸ”Œ Displays git branch of theme in the admin toolbar
PHP
4
star
9

josephfusco.github.io

My personal site
SCSS
4
star
10

wpdeployer

Pain-free deployment of WordPress themes and plugins directly from GitHub, Bitbucket, and GitLab.
PHP
4
star
11

css-tabs

A CSS only approach to tabbed page content with transitions.
CSS
3
star
12

template-usage

Display info on what page templates are currently being used within a WordPress multisite.
PHP
3
star
13

upfront-to-codepen

WordPress plugin that creates a new pen containing a style guide for theme color & typography settings.
JavaScript
3
star
14

wp-skip-trash

Simple WordPress plugin that permanently deletes items when trashed.
PHP
2
star
15

josephfusco

JavaScript
2
star
16

skipper

βš“ An opinionated WordPress site setup script for Laravel Valet.
Shell
2
star
17

valet-dashboard

A dashboard for Laravel Valet
JavaScript
2
star
18

_s-generator

The underscores.me generator packaged into a WordPress plugin to use on your own version of _s.
PHP
2
star
19

room-finder

JavaScript
2
star
20

wp-new-tab

πŸ”Œ Save a click! WordPress plugin that adds an option in wp-admin to open posts/pages into a new tab.
PHP
2
star
21

remember-me

β˜‘οΈ Plays the chorus of Remember Me from Disney's Coco everytime you check Remember Me on the WordPress login page.
PHP
1
star
22

dogedir

[Work In Progress] The Dogecoin Business Directory
HTML
1
star
23

atlas-blueprint-scaffolding

JavaScript
1
star
24

resume-building-active-theme

πŸ”Œ WordPress plugin to quickly resume building an active Upfront theme from the admin toolbar.
PHP
1
star
25

door-ar-poc

HTML
1
star
26

atlas-blueprint-scaffolding-test

JavaScript
1
star
27

boilerplate

Just a simple boilerplate
JavaScript
1
star
28

simple-lead-gen-form

Add a simple lead generation form to your WordPress website, collect & manage information from potential customers.
PHP
1
star
29

bootstrap-fifths

5 Column Support for Bootstrap 3
1
star
30

atlas-blueprint-portfolio-january

JavaScript
1
star
31

wp-hostname

Simple WordPress plugin to display network hostname.
PHP
1
star
32

base-ui

CSS
1
star
33

sight-words

Sight word flash cards
JavaScript
1
star
34

condensed-bootstrap-grid

A fully configurable grid system inside a tiny Sass partial.
CSS
1
star
35

mett-tc

πŸƒ What is it?
SCSS
1
star
36

atlas-blueprint-scaffolding-test2

1
star
37

twentytwenty-font-fix

This WordPress plugin is a temporary solution for the font rendering issue introduced in Chrome 79.0.3945.88.
PHP
1
star
38

atlas-blueprint-ecommerce-test-2

JavaScript
1
star
39

gitenberg

Edit Github Markdown files using WordPress and the Gutenberg block-based editor.
PHP
1
star