3d-ribbon 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,15 +1,13 @@
1
1
  #3D CSS Ribbons
2
2
 
3
3
  A extension (for [Compass](http://compass-style.org/)) to create 3D ribbons using only CSS.
4
- **[Live example](http://jsfiddle.net/dzignus/LXJ7X/)**.
4
+ **[Live example](http://codepen.io/dzignus/pen/yjLwD)**.
5
5
 
6
- ![some nice example](http://static.tumblr.com/djfsbl4/N1qllypq4/ribbon_example.png)
6
+ ![some nice example](http://i.imgur.com/O7o32NZ.png)
7
7
 
8
8
  The extension is inspired in [3D Ribbon Generator](http://www.css3d.net/ribbon-generator/).
9
9
 
10
10
 
11
-
12
-
13
11
  #Installation
14
12
 
15
13
  From the command line:
@@ -27,14 +25,9 @@ Installing into an existing project:
27
25
  #import the extension into your scss/sass file
28
26
  @import "3d-ribbon"
29
27
 
30
- Or create a new project:
31
-
32
- compass create <project_name> -r 3d-ribbon --using 3d-ribbon
33
-
34
- #import the extension into your scss/sass file
35
- @import "3d-ribbon"
36
-
28
+ If you don't have/want use Compass, you can download the main sass file and import it:
37
29
 
30
+ @import "<path to the file>/_3d-ribbon.scss"
38
31
 
39
32
 
40
33
  #Intro
@@ -43,188 +36,171 @@ The extension offer a simple and flexible way to create 3D ribbons with CSS.
43
36
 
44
37
  Browser support:
45
38
 
46
- * IE7+
47
- * Firefox 3.5+
39
+ * IE8+
40
+ * Firefox
48
41
  * Google Chrome
49
42
  * Safari / Safari iOS
50
43
 
51
- Note: In IE7/8, box-shadows and border-radius only using [CSS3 Pie](http://compass-style.org/reference/compass/css3/pie/).
52
-
53
44
  ## First, in your HTML document:
54
45
 
55
- This is the basic structure to create a ribbon with two sides (left / right):
56
-
57
- <div id="ribbon-example-foo">
46
+ You only need a block element to apply the ribbon, for example:
58
47
 
59
- <!--start ribbon-->
60
- <div class="ribbon-wrapper">
61
- <div class="ribbon-front">
62
-
63
- Here you can put some content (like "Lorem ipsum dolor sit amet...") or HTML elements
64
-
65
- </div>
66
- <div class="ribbon-edge-left-top"></div>
67
- <div class="ribbon-edge-right-top"></div>
68
- <div class="ribbon-edge-left-bottom"></div>
69
- <div class="ribbon-edge-right-bottom"></div>
70
- <div class="ribbon-back-left"></div>
71
- <div class="ribbon-back-right"></div>
72
- </div>
73
- <!--end ribbon -->
74
-
75
- </div>
76
-
77
-
78
- If you need only one side in the ribbon, you can remove some `<div />`. For example, if you need a ribbon with only the right side, you can remove `<div class="ribbon-edge-left-top"></div>`, `<div class="ribbon-edge-left-bottom"></div>` and `<div class="ribbon-back-left"></div>`.
48
+ <h3 class="ribbon">This is my title</h3>
79
49
 
80
50
 
81
51
  ## Then, in your Sass document:
82
52
 
83
53
  **The simple way**:
84
54
 
85
- #ribbon-example-foo{
86
- @include ribbon($front-width: 400px);
55
+ .ribbon{
56
+ @include ribbon();
87
57
  }
88
58
 
89
59
  **The flexible way (with all options)**:
90
60
 
91
- #ribbon-example-foo{
92
- @include ribbon(
93
- $front-width: 750px,
94
- $sides: left-bottom,
95
- $ribbon-height: 40px,
96
- $front-color: #80B5AD,
97
- $edges-color: darken(#8ABD9A, 30%),
98
- $back-color: #8DBF96,
99
- $back-width: 30px,
100
- $overlap-width: 35px,
101
- $overlap-height: 15px,
102
- $border-radius: 7px,
103
- $include-pie: true);
104
- }
105
-
106
-
107
-
108
- #Settings:
109
-
110
- ## $front-width:
111
-
112
- The width of the ribbon content, in px. This is the only mandatory argument.
61
+ .ribbon{
62
+ @include ribbon(
63
+ // Set the background color of the ribbon
64
+ $background-color : <color>,
113
65
 
66
+ // Set the position of the sides
67
+ $position : <bottom> | <top>,
114
68
 
115
- ## $sides:
69
+ // Set the sides of the ribbon
70
+ $sides : <left> | <rigth> | <left right>,
116
71
 
117
- The sides of the ribbon (left / right) and position (top / bottom). Options availables:
72
+ // Set the width of the overlaps
73
+ $overlap-horizontal : <width>,
118
74
 
119
- * `left-top`
120
- * `left-bottom`
121
- * `right-top`
122
- * `right-bottom`
75
+ // Set the height of the overlaps
76
+ $overlap-vertical : <height>,
123
77
 
124
- For example, is you want a ribbon with only one side (right) and orientation top:
78
+ // Set the color of the edges
79
+ $overlap-color : <color>
80
+ )
81
+ }
125
82
 
126
- @include ribbon($front-width: 450px, $sides: right-top);
127
83
 
84
+ #Settings:
128
85
 
129
- Default value: `left-bottom right-bottom`.
86
+ ## $background-color:
130
87
 
88
+ Set the background color of the ribbon. Default value: `#428bca`.
131
89
 
132
- ## $ribbon-height:
133
90
 
134
- The height of the ribbon, in px. Default value: `40px`.
91
+ ## $position:
135
92
 
93
+ Set the position of the sides. Default value: `top`.
136
94
 
137
- ## $front-color:
138
95
 
139
- The color of the front of the ribbon. Default value: `#3A89CE`.
96
+ ## $sides:
140
97
 
98
+ Set the sides of the ribbon. Default value: `left right`.
141
99
 
142
- ## $edges-color:
143
100
 
144
- The color of the edges of the ribbon. Default value: `darken($front-color, 30%)`.
101
+ ## $overlap-horizontal:
145
102
 
103
+ Set the width of the overlaps. Default value: `30px`.
146
104
 
147
- ## $back-color:
148
105
 
149
- The color of the back part of the ribbon. Default value: `$front-color`.
106
+ ## $overlap-vertical:
150
107
 
108
+ Set the height of the overlaps. Default value: `20px`.
151
109
 
152
- ## $back-width:
153
110
 
154
- The width of the back part of the ribbon, in px. Default value: `40px`.
111
+ ## $overlap-color:
155
112
 
113
+ Set the color of the edges. Default value: `darken(#428bca, 30%)`.
156
114
 
157
- ## $overlap-width:
158
115
 
159
- The width of the overlap of the ribbon, in px. Default value: `30px`.
116
+ #Adding the ribbon's back
160
117
 
118
+ If you want the ribbon's back you need add some spans into your HTML:
161
119
 
162
- ## $overlap-height:
163
120
 
164
- The height of the overlap of the ribbon, in px. Default value: `20px`.
121
+ <h3 class="ribbon">
122
+ This is my title
123
+ <span class="ribbon-left"></span>
124
+ <span class="ribbon-right"></span>
125
+ </h3>
165
126
 
127
+ Later in your sass use the `ribbon-back` mixin:
166
128
 
167
- ## $border-radius:
129
+ .ribbon-left{
130
+ @include ribbon-back($side: left);
131
+ }
168
132
 
169
- Border radius of the back part of the ribbon. Default value: `0`.
133
+ .ribbon-right{
134
+ @include ribbon-back($side: right);
135
+ }
170
136
 
137
+ The mixin also have many setting for customization:
171
138
 
172
- ## $include-pie:
139
+ .ribbon-back{
140
+ @include ribbon-back(
141
+ // The side to create. This is the only required param
142
+ $side,
173
143
 
174
- Support for CSS3 PIE (AKA: border-radius, box-shadow and others CSS3 styles for IE8/7/6). [More info](http://compass-style.org/reference/compass/css3/pie/). Remember set `$pie-behavior` with the path of the `PIE.htc` and deliver the file with the mime-type `Content-Type: text/x-component`.
144
+ // Set the background color of the ribbon's back
145
+ $background-color : <color>,
175
146
 
176
- Default value: `false`.
147
+ // Set the position of the ribbon's back
148
+ $position : <top> | <bottom>,
177
149
 
150
+ // Set the height of the ribbon's back
151
+ $height : <height>,
178
152
 
153
+ // Set the width of the ribbon's back
154
+ $width : <width>,
179
155
 
156
+ // Set the vertical distance of the ribbon's back
157
+ $horizontal-distance : <height>,
180
158
 
181
- #Examples
159
+ // Set the horizontal distance of the ribbon's back
160
+ $vertical-distance : <width>,
182
161
 
183
- The examples in action can be found in `templates/project/3d-ribbon-examples.html`.
184
-
185
- #ribbon-example-1{
186
- @include ribbon($front-width: 400px);
187
- }
188
-
189
- #ribbon-example-2{
190
- @include ribbon($front-width: 450px, $sides: left-top right-bottom); //Asimetric ribbon!
191
- }
192
-
193
- #ribbon-example-3{
194
- @include ribbon($front-width: 550px, $ribbon-height: 40px, $front-color: #8C46C3);
195
- }
196
-
197
- #ribbon-example-4{
198
- @include ribbon($front-width: 600px, $front-color: #8C46C3, $edges-color: darken(#9F4BBA, 10%), $back-color: #B952AE);
199
- }
200
-
201
- #ribbon-example-5{
202
- @include ribbon($front-width: 650px, $back-width: 20px, $overlap-width: 25px, $overlap-height: 10px);
203
- }
204
-
205
- #ribbon-example-6{
206
- @include ribbon($front-width: 650px, $back-width: 0);
207
- }
208
-
209
- #ribbon-example-7{
210
- @include ribbon($front-width: 700px, $border-radius: 5px);
211
- }
212
-
213
- #ribbon-example-8{
214
- @include ribbon(
215
- $front-width: 750px,
216
- $sides: left-bottom,
217
- $ribbon-height: 40px,
218
- $front-color: #80B5AD,
219
- $edges-color: darken(#8ABD9A, 30%),
220
- $back-color: #8DBF96,
221
- $back-width: 30px,
222
- $overlap-width: 35px,
223
- $overlap-height: 15px,
224
- $border-radius: 7px,
225
- $include-pie: true);
162
+ // Set the color of the back's snip
163
+ $snip-color : <color>
164
+ )
226
165
  }
227
166
 
167
+ It's probably that the two mixins (`ribbon` and `ribbon-back`) share values, so, the best way is declare some variables to use with the mixins. For example:
228
168
 
169
+ $ribbon-background-color: #d9534f;
170
+ $ribbon-position: top;
171
+ $ribbon-sides: left right;
172
+ $ribbon-overlap-horizontal-distance: 20px;
173
+ $ribbon-overlap-vertical-distance: 15px;
174
+ $ribbon-back-width: 20px;
175
+ $ribbon-back-height: 30px;
229
176
 
230
-
177
+ .ribbon{
178
+ @include ribbon(
179
+ $background-color: $ribbon-background-color,
180
+ $position: $ribbon-position,
181
+ $sides: $ribbon-sides,
182
+ $overlap-horizontal: $ribbon-overlap-horizontal-distance,
183
+ $overlap-vertical: $ribbon-overlap-vertical-distance,
184
+ $overlap-color: darken($ribbon-background-color, 30%)
185
+ );
186
+
187
+ @each $side in $ribbon-sides {
188
+
189
+ .ribbon-#{$side}{
190
+ @include ribbon-back(
191
+ $side: #{$side},
192
+ $background-color: $ribbon-background-color,
193
+ $position: $ribbon-position,
194
+ $width: $ribbon-back-width,
195
+ $height: $ribbon-back-height,
196
+ $horizontal-distance: $ribbon-overlap-horizontal-distance,
197
+ $vertical-distance: $ribbon-overlap-vertical-distance,
198
+ $snip-color: transparent
199
+ );
200
+ }
201
+
202
+ }
203
+
204
+ }
205
+
206
+ **[Live example](http://codepen.io/dzignus/pen/yjLwD)**
@@ -1,249 +1,175 @@
1
1
  // 3D CSS Ribbon ------------------------------------------------------------
2
- // Plugin by Leandro D'onofrio - http://dzign.us/
2
+ // Plugin by Leandro D'Onofrio - http://dzign.us/
3
3
 
4
+ //** Default variables for the ribbon **//
4
5
 
5
- // Imports --------------------------------------------------------------------
6
+ $ribbon-3d-background-color: #428bca!default;
7
+ $ribbon-3d-position: bottom!default;
8
+ $ribbon-3d-sides: left right!default;
9
+ $ribbon-3d-overlap-horizontal: 30px!default;
10
+ $ribbon-3d-overlap-vertical: 20px!default;
11
+ $ribbon-3d-overlap-color: darken($ribbon-3d-background-color, 30%)!default;
6
12
 
7
- @import "compass/css3/images";
8
- @import "compass/css3/box-shadow";
9
- @import "compass/css3/border-radius";
10
- @import "compass/css3/pie";
13
+ //** 3D CSS Ribbon mixin **//
11
14
 
12
- //** 3D CSS Ribbon **//
13
-
14
- //The real name was "3d-ribbon" but mixins can't start with a number...
15
15
  @mixin ribbon(
16
16
 
17
- // Set the sides of the ribbon
18
- $sides : left-bottom right-bottom,
19
-
20
- // Set the color of the ribbon
21
- $front-color : #3A89CE,
22
-
23
- // Set the color of the edges
24
- $edges-color : darken($front-color, 30%),
25
-
26
- // Set the color of the back sides
27
- $back-color : $front-color,
28
-
29
- // Set the width of the front
30
- $front-width : 0,
31
-
32
- // Set the height of the ribbon
33
- $ribbon-height : 40px,
34
-
35
- // Set the width of the back sides
36
- $back-width : 40px,
37
-
38
- // Set the width of the overlaps
39
- $overlap-width : 30px,
40
-
41
- // Set the height of the overlaps
42
- $overlap-height : 20px,
43
-
44
- // Set the distance of the overlaps
45
- $overlap-distance : 0,
46
-
47
- // Set the border radius of the back sides
48
- $border-radius : 0,
49
-
50
- //Support for CSS3 PIE - More info: http://compass-style.org/reference/compass/css3/pie/
51
- $include-pie : false
52
-
53
- ) {
54
-
55
- //If include CSS3 PIE, don't repeat position: relative
56
- $pie-default-approach : none;
57
-
58
- //ribbon-wrapper
59
- div.ribbon-wrapper {
60
- height: ($ribbon-height + $overlap-height);
61
- width: $front-width;
62
- position: relative;
63
- z-index: 3;
17
+ // Set the background color of the ribbon
18
+ $background-color : $ribbon-3d-background-color,
64
19
 
65
- //Shadow only for bottom sides
66
- @if ($overlap-distance == 0) and ($sides == (left-bottom right-bottom)) or ($sides == (right-bottom left-bottom)) {
20
+ // Set the position of the sides
21
+ $position : $ribbon-3d-position,
67
22
 
68
- @include background(linear-gradient(#555 0px, rgba(255, 255, 255, 0) $overlap-height) 0 $ribbon-height);
69
-
70
- }
71
-
72
- }
73
-
74
- //ribbon-front
75
- div.ribbon-front {
76
- width: ($front-width + ($overlap-width*length($sides)) + ($overlap-distance*length($sides)));
77
- height: $ribbon-height;
78
- background-color: $front-color;
79
- position: relative;
80
- z-index: 2;
81
- @include box-shadow(rgba(0, 0, 0, 0.5) 0px 0px 4px);
82
-
83
- @if ($sides == right-top) or ($sides == right-bottom) {
84
-
85
- left: 0;
86
-
87
- } @else {
88
-
89
- left: -($overlap-width + $overlap-distance);
90
-
91
- }
92
-
93
- @if $include-pie == true {
23
+ // Set the sides of the ribbon
24
+ $sides : $ribbon-3d-sides,
94
25
 
95
- @include pie;
26
+ // Set the width of the overlaps
27
+ $overlap-horizontal : $ribbon-3d-overlap-horizontal,
96
28
 
97
- }
98
-
99
- }
100
-
101
- //for each side
102
- @each $position in (left right) {
103
-
104
- //left side
105
- @if ($position == left) and (($sides == left-top) or ($sides == left-bottom)) {
106
-
107
- div.ribbon-edge-left-top,
108
- div.ribbon-edge-left-bottom {
109
- @include _ribbon-edge(left, $overlap-width, $overlap-distance);
110
- }
111
-
112
- div.ribbon-back-left {
113
- @include _ribbon-back($back-width, $ribbon-height, $back-color, $border-radius, left, $overlap-distance, $include-pie);
114
- }
115
-
116
- //right side
117
- } @else if ($position == right) and (($sides == right-top) or ($sides == right-bottom)) {
118
-
119
- div.ribbon-edge-right-top,
120
- div.ribbon-edge-right-bottom {
121
- @include _ribbon-edge(right, $overlap-width, $overlap-distance);
122
- }
123
-
124
- div.ribbon-back-right {
125
- @include _ribbon-back($back-width, $ribbon-height, $back-color, $border-radius, right, $overlap-distance, $include-pie);
126
- }
127
-
128
- //both sides
129
- } @else if ($sides == (left-top right-top)) or ($sides == (left-bottom right-bottom)) or ($sides == (left-top right-bottom)) or ($sides == (left-bottom right-top)) or ($sides == (right-top left-top)) or ($sides == (right-bottom left-bottom)) or ($sides == (right-top left-bottom)) or ($sides == (right-bottom left-top)) {
130
-
131
- div.ribbon-edge-#{$position}-top,
132
- div.ribbon-edge-#{$position}-bottom {
133
- @include _ribbon-edge(#{$position}, $overlap-width, $overlap-distance);
29
+ // Set the height of the overlaps
30
+ $overlap-vertical : $ribbon-3d-overlap-vertical,
31
+
32
+ // Set the color of the edges
33
+ $overlap-color : $ribbon-3d-overlap-color
34
+
35
+ ) {
36
+
37
+ background-color: $background-color;
38
+ position: relative;
39
+ z-index: 6;
40
+
41
+ &:before, &:after{
42
+ content: "";
43
+ width: 0;
44
+ height: 0;
45
+ position: absolute;
46
+ font-size: 0;
47
+ line-height: 0;
48
+ z-index: 5;
49
+
50
+ @if $position == "bottom" {
51
+ border-top: 0 solid transparent;
52
+ border-bottom: $overlap-vertical solid transparent;
53
+ bottom: -$overlap-vertical;
134
54
  }
135
-
136
- div.ribbon-back-#{$position} {
137
- @include _ribbon-back($back-width, $ribbon-height, $back-color, $border-radius, #{$position}, $overlap-distance, $include-pie);
55
+
56
+ @if $position == "top" {
57
+ border-bottom: 0 solid transparent;
58
+ border-top: $overlap-vertical solid transparent;
59
+ top: -$overlap-vertical;
138
60
  }
139
-
61
+
140
62
  }
141
-
142
- }
143
-
144
- //for each selected side
145
- @each $side in $sides {
146
-
147
- //left-top side
148
- @if $side == left-top {
149
-
150
- div.ribbon-edge-left-top {
151
- bottom: ($ribbon-height + $overlap-height);
152
- border-width: $overlap-height $overlap-width 0 0;
153
- border-color: transparent $edges-color transparent transparent;
154
- }
155
-
156
- div.ribbon-back-left {
157
- top: -$overlap-height;
158
- }
159
-
160
- //left-bottom side
161
- } @else if $side == left-bottom {
162
-
163
- div.ribbon-edge-left-bottom {
164
- top: $ribbon-height;
165
- border-width: 0 $overlap-width $overlap-height 0;
166
- border-color: transparent $edges-color transparent transparent;
167
- }
168
-
169
- div.ribbon-back-left {
170
- top: $overlap-height;
171
- }
172
-
173
- //right-top side
174
- } @else if $side == right-top {
175
-
176
- div.ribbon-edge-right-top {
177
- bottom: ($ribbon-height + $overlap-height);
178
- border-width: 0 $overlap-width $overlap-height 0;
179
- border-color: transparent transparent $edges-color transparent;
180
- }
181
-
182
- div.ribbon-back-right {
183
- top: -$overlap-height;
184
- }
185
-
186
- //right-bottom side
187
- } @else if $side == right-bottom {
188
-
189
- div.ribbon-edge-right-bottom {
190
- top: $ribbon-height;
191
- border-width: $overlap-height $overlap-width 0 0;
192
- border-color: $edges-color transparent transparent transparent;
63
+
64
+ $sides-length: length($sides);
65
+
66
+ @if ($sides == right) or ($sides-length == 2) {
67
+
68
+ &:before{
69
+ border-left: $overlap-horizontal solid $overlap-color;
70
+ right: 0;
193
71
  }
194
-
195
- div.ribbon-back-right {
196
- top: $overlap-height;
72
+
73
+ }
74
+
75
+ @if ($sides == left) or ($sides-length == 2) {
76
+
77
+ &:after{
78
+ border-right: $overlap-horizontal solid $overlap-color;
79
+ left: 0;
197
80
  }
198
-
81
+
199
82
  }
200
-
201
- }
202
83
 
203
84
  }
204
85
 
205
- //private mixins
206
- @mixin _ribbon-edge($position, $overlap-width, $overlap-distance) {
86
+ //** Default variables for the ribbon's back **//
207
87
 
208
- height:0;
209
- width:0;
210
- position: absolute;
211
- z-index: 1;
212
- #{$position}: -($overlap-width + $overlap-distance);
213
- border-style:solid;
214
-
215
- }
88
+ $ribbon-3d-back-background-color: $ribbon-3d-background-color!default;
89
+ $ribbon-3d-back-position: $ribbon-3d-position!default;
90
+ $ribbon-3d-back-height: 40px!default;
91
+ $ribbon-3d-back-width: 60px!default;
92
+ $ribbon-3d-back-horizontal-distance: $ribbon-3d-overlap-horizontal!default;
93
+ $ribbon-3d-back-vertical-distance: $ribbon-3d-overlap-vertical!default;
94
+ $ribbon-3d-back-snip-color: transparent!default;
95
+
96
+ //** 3D CSS Ribbon mixin's back **//
97
+
98
+ @mixin ribbon-back(
99
+
100
+ // The side to create
101
+ $side,
102
+
103
+ // Set the background color of the ribbon's back
104
+ $background-color : $ribbon-3d-back-background-color,
105
+
106
+ // Set the position of the ribbon's back
107
+ $position : $ribbon-3d-back-position,
108
+
109
+ // Set the height of the ribbon's back
110
+ $height : $ribbon-3d-back-height,
111
+
112
+ // Set the width of the ribbon's back
113
+ $width : $ribbon-3d-back-width,
114
+
115
+ // Set the vertical distance of the ribbon's back
116
+ $horizontal-distance : $ribbon-3d-back-horizontal-distance,
117
+
118
+ // Set the horizontal distance of the ribbon's back
119
+ $vertical-distance : $ribbon-3d-back-vertical-distance,
216
120
 
217
- @mixin _ribbon-back($back-width, $ribbon-height, $back-color, $border-radius, $position, $overlap-distance, $include-pie) {
121
+ // Set the color of the back's snip
122
+ $snip-color : $ribbon-3d-back-snip-color
218
123
 
219
- width: $back-width;
220
- height: $ribbon-height;
124
+ ){
125
+
126
+ display: block;
127
+ height: $height;
128
+ width: $width;
129
+ background-color: $background-color;
221
130
  position: absolute;
222
- z-index: 0;
223
- @include box-shadow(rgba(0, 0, 0, 0.5) 0px 0px 4px);
224
-
225
- @if $border-radius != 0 {
226
-
227
- @if $position == left {
228
-
229
- @include border-left-radius($border-radius);
230
-
231
- } @else if $position == right {
232
-
233
- @include border-right-radius($border-radius);
234
-
235
- }
236
-
131
+ z-index: -1;
132
+
133
+ @if $side == left {
134
+ left: - ($width - $horizontal-distance);
237
135
  }
238
-
239
- background-color: $back-color;
240
- #{$position}: -($back-width + $overlap-distance);
241
-
242
- @if $include-pie == true {
243
-
244
- @include pie;
245
-
136
+
137
+ @if $side == right {
138
+ right: - ($width - $horizontal-distance);
246
139
  }
247
140
 
248
- }
141
+ @if $position == bottom {
142
+ bottom: -$vertical-distance;
143
+ }
144
+
145
+ @if $position == top {
146
+ top: -$vertical-distance;
147
+ }
148
+
149
+ @if $snip-color != transparent {
150
+
151
+ &:before{
152
+ content: "";
153
+ width: 0;
154
+ height: 0;
155
+ position: absolute;
156
+ font-size: 0;
157
+ line-height: 0;
158
+ border-bottom: $height / 2 solid transparent;
159
+ border-top: $height / 2 solid transparent;
160
+
161
+ @if $side == left {
162
+ border-left: ($height / 2) / 2 solid $snip-color;
163
+ left: 0;
164
+ }
165
+
166
+ @if $side == right {
167
+ border-right: ($height / 2) / 2 solid $snip-color;
168
+ right: 0;
169
+ }
170
+
171
+ }
172
+
173
+ }
249
174
 
175
+ }