-
Notifications
You must be signed in to change notification settings - Fork 14
/
index.html
111 lines (80 loc) · 3.82 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Angled edges (SASS mixin)</title>
<link rel="stylesheet" href="assets/styles/site.css">
<link rel="stylesheet" href="assets/styles/angled-edges.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Cutive+Mono|Lato:300,400">
</head>
<body>
<header class="header">
<div class="container">
<h1 class="logo-text">Angled edges (SASS mixin)</h1>
<div class="header--links">
<a href="https://github.com/NigelOToole/angled-edges/archive/master.zip" class="btn btn-white">Download</a>
<a href="https://github.com/NigelOToole/angled-edges" target="_blank" class="btn btn-white">View on GitHub</a>
</div>
</div>
</header>
<div class="demo demo--intro container">
<h3>Add a consistent angled edge to a full width element.</h3>
<p>This technique uses CSS clip-path to clip the image but has a fallback using pseudo elements for older browsers.<br>
It is only intended for use on full width elements as it uses the vw unit to calulate the angle.</p>
</div>
<div class="demo">
<h2 class="container">Examples</h2>
<h3 class="container">Top left</h3>
<div class="angle--top-left">
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/69/Cygnus_Wall.jpg/1024px-Cygnus_Wall.jpg" alt="Nebula" class="angle__content">
</div>
</div>
<div class="demo">
<h3 class="container">Bottom left</h3>
<div class="angle--bottom-left">
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/69/Cygnus_Wall.jpg/1024px-Cygnus_Wall.jpg" alt="Nebula" class="angle__content">
</div>
</div>
<div class="demo">
<h3 class="container">Top and bottom</h3>
<div class="angle--both-left-right">
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/69/Cygnus_Wall.jpg/1024px-Cygnus_Wall.jpg" alt="Nebula" class="angle__content">
</div>
</div>
<div class="demo">
<h3 class="container">Backgound Colour</h3>
<div class="angle--colour angle--both-right-right">
<h2 class="header-colour__text">Background colour</h2>
</div>
</div>
<div class="container">
<div class="demo install">
<h2>Installation</h2>
<a href="https://github.com/NigelOToole/angled-edges/archive/master.zip" class="btn">Download</a>
<a href="https://raw.githubusercontent.com/NigelOToole/angled-edges/master/assets/styles/angled-edges.scss" class="btn">Download CSS</a>
<a href="https://github.com/NigelOToole/angled-edges" target="_blank" class="btn">View on GitHub</a>
</div>
<div class="demo usage">
<h2>Usage</h2>
<p>Once you have downloaded the code, run the commands below to view the demo site.</p>
<pre>
<code>$ npm install
$ gulp serve</code>
</pre>
<p>You can also import <strong>angled-edges.scss</strong> into your own project directly and use the classes already setup or use the mixin in your own classes.</p>
</div>
</div>
<div class="container">
<p>Inspired by <a href="https://kilianvalkhof.com/2017/design/sloped-edges-with-consistent-angle-in-css/" target="_blank">Kilian Valkhof</a> and <a href="https://www.viget.com/articles/angled-edges-with-css-masks-and-transforms" target="_blank">Viget</a><br>
<a title="By Ken Crawford [CC BY-SA 4.0 (http://creativecommons.org/licenses/by-sa/4.0)], via Wikimedia Commons" href="https://commons.wikimedia.org/wiki/File%3ACygnus_Wall.jpg">Image from Wikimedia Commons</a>
</p>
</div>
<footer class="footer">
<div class="container">
Made by Nigel O Toole <a href="http://www.purestructure.com" target="_blank">pure structure</a>
</div>
</footer>
</body>
</html>