rapido-css 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -386,7 +386,6 @@ Modals
386
386
 
387
387
  %modal__btn # For all button links in modals
388
388
  %modal__close # For the default close button
389
- %modal__close--alt # Alternative style for close button in iframes
390
389
  %modal__btnbar-size # Width and height of #fancybox-buttons
391
390
  %modal__overlay # Color of background overlay
392
391
  %modal__skin # For the modal window
@@ -398,9 +397,25 @@ Styleguide 30.12
398
397
 
399
398
  */
400
399
 
400
+ // Buttons
401
401
 
402
+ .btnPlay:after { @include icon-font(\f04b); }
403
+ .btnPlayOn:after { @include icon-font(\f04c); }
404
+ .btnToggle:after { @include icon-font(\f065); }
405
+ .btnToggleOn:after { @include icon-font(\f066); }
406
+ .btnPrev:after { @include icon-font(\f04a); }
407
+ .btnNext:after { @include icon-font(\f051); }
408
+ .btnClose:after { @include icon-font(\f00d); }
409
+ .fancybox-close:after { @include icon-font(\f00d); }
410
+
411
+ .fancybox-prev {
412
+ span:after { @include icon-font(\f053); }
413
+ }
414
+
415
+ .fancybox-next {
416
+ span:after { @include icon-font(\f054); }
417
+ }
402
418
 
403
- // Buttons
404
419
  %modal__btn {
405
420
  @extend %btn--scripts;
406
421
  @include square($modal-btn-size);
@@ -410,18 +425,15 @@ Styleguide 30.12
410
425
  %modal__close {
411
426
  $offset: -$modal-btn-size;
412
427
  @include position(absolute, $offset .5em 0 0);
413
- }
414
-
415
- %modal__close--alt {
416
- @include position(absolute, 0px 0px 0 0);
417
- background-color: transparent;
418
- color: $link-color;
428
+ color: #CCCCCC;
419
429
  &:hover {
420
- color: $link-color-hover;
430
+ color: #FFFFFF;
421
431
  }
422
432
  }
423
433
 
424
- %modal__btnbar-size {@include size($modal-btn-size, $modal-btn-size * 5);}
434
+ %modal__btnbar-size {
435
+ @include size($modal-btn-size, $modal-btn-size * 5);
436
+ }
425
437
 
426
438
  // Other styles
427
439
  %modal__overlay {
@@ -433,17 +445,6 @@ Styleguide 30.12
433
445
  @include border-radius($base-border-radius);
434
446
  background: #fff;
435
447
 
436
- // Icons
437
- .fancybox-close:after { @include icon-font(\f00d); }
438
- .fancybox-prev span:after { @include icon-font(\f053); }
439
- .fancybox-next span:after { @include icon-font(\f054); }
440
- .btnPrev:after { @include icon-font(\f04a); }
441
- .btnNext:after { @include icon-font(\f051); }
442
- .btnPlay:after { @include icon-font(\f04b); }
443
- .btnPlayOn:after { @include icon-font(\f04c); }
444
- .btnToggle:after { @include icon-font(\f065); }
445
- .btnToggleOn:after { @include icon-font(\f066); }
446
- .btnClose:after { @include icon-font(\f00d); }
447
448
  }
448
449
 
449
450
  %modal__nav { margin-top: (0 - ($modal-btn-size / 2)); }
@@ -568,9 +569,10 @@ Styleguide 30.15
568
569
 
569
570
  /*
570
571
 
571
- Responsive Nav
572
+ OffCanvas Nav
572
573
 
573
- %nav--responsive # For the open nav state in responsive mode
574
+ %nav--offcanvas #
575
+ %nav--offcanvas__dim #
574
576
  %nav__toggle # For the toggle open/close button in responsive mode
575
577
 
576
578
  Styleguide 30.16
@@ -578,23 +580,25 @@ Styleguide 30.16
578
580
  */
579
581
 
580
582
 
581
- %nav--responsive {
582
- background-color: $grayLighter;
583
-
584
- a { padding: nth($btn-padding, 1) $wrapper-padding; }
583
+ %nav--offcanvas {
584
+ background-color: $grayDark;
585
+ padding: $wrapper-padding;
586
+ color: $white;
585
587
 
586
- > ul > li > a {
587
- font-weight: bold;
588
- background-color: $grayLight;
588
+ a {
589
+ color: $white;
589
590
  }
591
+ }
590
592
 
593
+ %nav--offcanvas__dim {
594
+ background: rgba(0,0,0,0.2);
591
595
  }
592
596
 
593
- %nav__toggle {
597
+ %nav--offcanvas__toggle {
594
598
  @extend .btn;
595
599
 
596
600
  span {
597
- @include hide-text();
601
+ @extend .visuallyhidden;
598
602
  }
599
603
 
600
604
  &:before {
@@ -2,18 +2,37 @@
2
2
 
3
3
  Captions
4
4
 
5
- Add captions to images. The position is defined by `data-position` and the content by `data-content`.
6
- It's possible to add an animation using `data-animation` with either `fade` or `float`.
5
+ Captions effects adapted from [Effeckt.css](https://github.com/h5bp/Effeckt.css).
7
6
 
8
- For positioning are available: `top`, `right`, `bottom`, `left`, `top-left`, `top-right`, `bottom-right`, `bottom-left`.
7
+ Effects availables (first example is without effect): `cover-push-right`, `cover-slide-top`, `guillotine-reverse`, `half-slide`, `offset`, `quarter-appear`, `quarter-fall-in`, `quarter-slide-side`, `quarter-slide-up`, `quarter-two-step`, `quarter-zoom`, `revolving-door-bottom`, `revolving-door-left`, `revolving-door-right`, `revolving-door-top`.
9
8
 
10
9
  Markup:
11
- <figure class="caption" data-position="bottom" data-animation="{$modifiers}" data-content="Caption text.">
12
- <img src="http://dummyimage.com/300x200/afe600/fff" />
10
+ <figure class="caption" data-effect-type="{$modifiers}">
11
+ <img src=http://dummyimage.com/300x200/afe600/ffffff" alt="">
12
+ <figcaption>
13
+ <div class="effect-figcaption-wrap">
14
+ <h3>Guillotine Reverse</h3>
15
+ <p>Lorem ipsum dolar.</p>
16
+ </div>
17
+ </figcaption>
13
18
  </figure>
14
19
 
15
- fade - Add fade-in animation for the caption
16
- float - Add fade-in and slide-in animation for the caption
20
+ cover-fade - Cover Fade
21
+ cover-push-right - Cover Push Right
22
+ cover-slide-top - Cover Slide Top
23
+ guillotine-reverse - Guillotine Reverse / Reveal Up
24
+ half-slide - Half Slide
25
+ offset - Caption Offset
26
+ quarter-appear - Appear
27
+ quarter-fall-in - Quarter Fall in
28
+ quarter-slide-side - Quarter Slide Side
29
+ quarter-slide-up - Quarter Slide Up
30
+ quarter-two-step - Quarter Two Step
31
+ quarter-zoom - Quarter Caption Zoom
32
+ revolving-door-bottom - Revolving Door
33
+ revolving-door-left - Revolving Door
34
+ revolving-door-right - Revolving Door
35
+ revolving-door-top - Revolving Door
17
36
 
18
37
  Styleguide 5
19
38
 
@@ -21,57 +40,384 @@ Styleguide 5
21
40
 
22
41
  @if $captions {
23
42
 
24
- .caption {
25
- position: relative;
26
- display: inline-block;
27
- width: auto;
28
- overflow: hidden;
29
- line-height: 0;
43
+ .caption {
44
+ position: relative;
45
+ float: left;
46
+ overflow: hidden;
30
47
 
31
- &:after {
32
- @extend %caption !optional;
33
- display: inline-block;
34
- content: attr(data-content);
35
- position: absolute;
36
- line-height: rhythm();
48
+ &:nth-child(2n) {
49
+ margin-right: 0;
50
+ }
51
+ img {
52
+ transition: $caption-animations-duration;
53
+ }
54
+ figcaption {
55
+ @extend %caption;
56
+ position: absolute;
57
+ transition: $caption-animations-duration;
58
+ width: 100%;
59
+
60
+ * {
61
+ margin-bottom: 0;
62
+ }
63
+
64
+ }
65
+
66
+ // Effect 1: Appear
67
+ &[data-effect-type="quarter-appear"] {
68
+ figcaption {
69
+ bottom: 0;
70
+ left: 0;
71
+ opacity: 0;
72
+ }
73
+ &:hover, &:active {
74
+ figcaption {
75
+ opacity: 1;
76
+ }
77
+ }
78
+ }
79
+
80
+
81
+ // Effect 2: Quarter Slide Up
82
+ &[data-effect-type="quarter-slide-up"] {
83
+ figcaption {
84
+ bottom: 0;
85
+ left: 0;
86
+ opacity: 0;
87
+ @include translateY(100%);
88
+ }
89
+ &:hover, &:active {
90
+ figcaption {
91
+ opacity: 1;
92
+ @include translateY(0);
93
+ }
94
+ }
95
+ }
96
+
97
+
98
+ // Effect 4: Quarter Slide Side
99
+ &[data-effect-type="quarter-slide-side"] {
100
+ figcaption {
101
+ left: 0;
102
+ bottom: 0;
103
+ opacity: 0;
104
+ @include translateX(100%);
105
+ }
106
+ &:hover, &:active {
107
+ figcaption {
108
+ opacity: 1;
109
+ @include translateX(0);
110
+ }
111
+ }
112
+ }
113
+
114
+
115
+ // Effect 5: Cover Fade
116
+ &[data-effect-type="cover-fade"] {
117
+ figcaption {
118
+ top: 0;
119
+ left: 0;
120
+ height: 100%;
121
+ opacity: 0;
122
+ }
123
+ &:hover, &:active {
124
+ figcaption {
125
+ opacity: 1;
126
+ }
127
+ }
128
+ }
129
+
130
+
131
+ // Effect 6 - Quarter Fall in
132
+ &[data-effect-type="quarter-fall-in"] {
133
+ figcaption {
134
+ top: 0;
135
+ left: 0;
136
+ @include translateX(100%) ;
137
+ @include rotate(20deg);
138
+ opacity: 0;
139
+ }
140
+ &:hover, &:active {
141
+ figcaption {
142
+ @include translateX(0) ;
143
+ @include rotate(0deg);
144
+ opacity: 1;
145
+ }
146
+ }
147
+ }
148
+
149
+
150
+ // Effect 7 - 3Quarter Two Step
151
+ &[data-effect-type="quarter-two-step"] {
152
+ figcaption {
153
+ top: 0;
154
+ left: 0;
155
+ @include translateX(-100%);
156
+ opacity: 0;
157
+ z-index: 2;
158
+ }
159
+ .effect-figcaption-wrap {
160
+ transition: $caption-animations-duration $caption-animations-duration/2;
161
+ @include translateX(200%);
162
+ }
163
+ &:hover, &:active {
164
+ figcaption {
165
+ @include translateX(0);
166
+ opacity: 1;
167
+ }
168
+ .effect-figcaption-wrap {
169
+ @include translateX(0);
37
170
  }
171
+ }
172
+ }
38
173
 
39
- &[data-position*="top"]:after { top:0; }
40
- &[data-position*="bottom"]:after { bottom:0; }
41
- &[data-position*="left"]:after { left:0; }
42
- &[data-position*="right"]:after { right:0; }
43
174
 
44
- &[data-position$="top"]:after,
45
- &[data-position$="bottom"]:after { left: 0; right: 0; }
175
+ // Effect 8 - Cover Push Right
176
+ &[data-effect-type="cover-push-right"] {
177
+ figcaption {
178
+ top: 0;
179
+ left: 0;
180
+ height: 100%;
181
+ @include translateX(-100%);
182
+ opacity: 0;
183
+ }
184
+ img {
185
+ transition: $caption-animations-duration;
186
+ @include translateX(0);
187
+ }
188
+ &:hover, &:active {
189
+ figcaption {
190
+ @include translateX(0);
191
+ opacity: 1;
192
+ }
193
+ img {
194
+ @include translateX(100%);
195
+ }
196
+ }
197
+ }
46
198
 
47
- // Animations
48
- &[data-animation*="fade"],
49
- &[data-animation*="float"] {
199
+ // Effect 15 - Cover Slide Top
200
+ &[data-effect-type="cover-slide-top"] {
201
+ figcaption {
202
+ top: 0;
203
+ left: 0;
204
+ height: 100%;
205
+ @include translateY(-100%);
206
+ opacity: 0;
207
+ }
208
+ img {
209
+ transition: $caption-animations-duration;
210
+ }
211
+ &:hover, &:active {
212
+ figcaption {
213
+ @include translateY(0);
214
+ opacity: 1;
215
+ }
216
+ }
217
+ }
50
218
 
51
- &:after {
52
- @include transition();
53
- @include opacity(0);
54
- visibility: hidden;
55
- }
56
219
 
57
- &:hover:after {
58
- @include opacity(1);
59
- visibility: visible;
60
- }
220
+ // Effect 9 - Quarter Caption Zoom
221
+ &[data-effect-type="quarter-zoom"] {
222
+ figcaption {
223
+ top: 0;
224
+ left: 0;
225
+ @include scale(2);
226
+ text-align: center;
227
+ opacity: 0;
228
+ }
229
+ img {
230
+ transition: $caption-animations-duration;
231
+ }
232
+ &:hover, &:active {
233
+ figcaption {
234
+ @include scale(1);
235
+ opacity: 1;
236
+ }
237
+ img {
238
+ @include scale(1.1);
61
239
  }
240
+ }
241
+ }
62
242
 
63
243
 
64
- // Float animation
65
- &[data-animation*="float"][data-position*="top"] {
66
- &:after { top: -10px; }
67
- &:hover:after { top: 0; }
244
+ // Effect 10 - Revolving Door
245
+ // BUG: Super flickery in Safari 5.1.7 on Windows 7
246
+ &[data-effect-type="revolving-door-left"] {
247
+ overflow: visible;
248
+ figcaption {
249
+ top: 0;
250
+ left: 0;
251
+ width: 100%;
252
+ height: 100%;
253
+ @include perspective(1300) ;
254
+ @include rotateY(180deg);
255
+ @include backface-visibility(hidden);
256
+ }
257
+ img {
258
+ @include perspective(1300);
259
+ transition: $caption-animations-duration;
260
+ }
261
+ &:hover, &:active {
262
+ figcaption {
263
+ @include perspective(1300) ;
264
+ @include rotateY(0deg);
265
+ }
266
+ img {
267
+ @include perspective(1300) ;
268
+ @include rotateY(-180deg);
68
269
  }
270
+ }
271
+ }
69
272
 
70
- &[data-animation*="float"][data-position*="bottom"] {
71
- &:after { bottom: -10px; }
72
- &:hover:after { bottom: 0; }
273
+ &[data-effect-type="revolving-door-right"] {
274
+ overflow: visible;
275
+ figcaption {
276
+ top: 0;
277
+ left: 0;
278
+ width: 100%;
279
+ height: 100%;
280
+ @include perspective(1300) ;
281
+ @include rotateY(180deg);
282
+ @include backface-visibility(hidden);
283
+ }
284
+ img {
285
+ @include perspective(1300);
286
+ transition: $caption-animations-duration;
287
+ }
288
+ &:hover, &:active {
289
+ figcaption {
290
+ @include perspective(1300) ;
291
+ @include rotateY(360deg);
292
+ }
293
+ img {
294
+ @include perspective(1300) ;
295
+ @include rotateY(180deg);
73
296
  }
297
+ }
298
+ }
74
299
 
300
+ &[data-effect-type="revolving-door-top"] {
301
+ overflow: visible;
302
+ figcaption {
303
+ top: 0;
304
+ left: 0;
305
+ width: 100%;
306
+ height: 100%;
307
+ @include perspective(1300);
308
+ @include rotateX(180deg);
309
+ @include backface-visibility(hidden);
310
+ }
311
+ img {
312
+ @include perspective(1300);
313
+ transition: $caption-animations-duration;
314
+ }
315
+ &:hover, &:active {
316
+ figcaption {
317
+ @include perspective(1300);
318
+ @include rotateX(360deg);
319
+ }
320
+ img {
321
+ @include perspective(1300) ;
322
+ @include rotateX(180deg);
323
+ }
324
+ }
75
325
  }
76
326
 
77
- }
327
+ &[data-effect-type="revolving-door-bottom"] {
328
+ overflow: visible;
329
+ figcaption {
330
+ top: 0;
331
+ left: 0;
332
+ width: 100%;
333
+ height: 100%;
334
+ @include perspective(1300);
335
+ @include rotateX(180deg);
336
+ @include backface-visibility(hidden);
337
+ }
338
+ img {
339
+ @include perspective(1300);
340
+ transition: $caption-animations-duration;
341
+ }
342
+ &:hover, &:active {
343
+ figcaption {
344
+ @include perspective(1300);
345
+ @include rotateX(0deg);
346
+ }
347
+ img {
348
+ @include perspective(1300);
349
+ @include rotateX(-180deg);;
350
+ }
351
+ }
352
+ }
353
+
354
+ // Effect 11 - Caption Offset
355
+ &[data-effect-type="offset"] {
356
+ overflow: visible;
357
+ figcaption {
358
+ top: 0;
359
+ left: 0;
360
+ text-align: center;
361
+ opacity: 0;
362
+ height: 100%;
363
+ }
364
+ img {
365
+ transition: $caption-animations-duration;
366
+ }
367
+ &:hover, &:active {
368
+ figcaption {
369
+ @include translate(15px, 15px);
370
+ opacity: 1;
371
+ z-index: 100; //prevent ovarslap
372
+ overflow: hidden;
373
+ }
374
+ }
375
+ }
376
+ // Effect 12 - Guillotine Reverse / Reveal Up
377
+ &[data-effect-type="guillotine-reverse"] {
378
+ overflow: visible;
379
+ figcaption {
380
+ top: 0;
381
+ left: 0;
382
+ text-align: center;
383
+ height: 100%;
384
+ }
385
+ img {
386
+ display: block;
387
+ position:relative;
388
+ z-index:10;
389
+ transition: $caption-animations-duration;
390
+ }
391
+ &:hover, &:active {
392
+ img {
393
+ @include translateY(-100%);
394
+ }
395
+ }
396
+ }
397
+ // Effect 13 - Half Slide
398
+ &[data-effect-type="half-slide"] {
399
+ figcaption {
400
+ top: 0;
401
+ left: 0;
402
+ text-align: center;
403
+ height: 100%;
404
+ @include translateY(100%);
405
+ }
406
+ img {
407
+ display: block;
408
+ position:relative;
409
+ transition: $caption-animations-duration;
410
+ }
411
+ &:hover, &:active {
412
+ img {
413
+ @include translateY(-50%);
414
+ }
415
+ figcaption {
416
+ @include translateY(50%);
417
+ }
418
+ }
419
+ }
420
+
421
+ }
422
+
423
+ }
@@ -6,6 +6,10 @@ Toggleable, contextual menu for displaying lists of links. Made interactive with
6
6
 
7
7
  Looking at just the dropdown menu, here's the required HTML. You need to wrap the dropdown's trigger and the dropdown menu within `.dropdown`. Then just create the menu.
8
8
 
9
+ Script required:
10
+
11
+ <script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.1/js/bootstrap-dropdown.min.js"></script>
12
+
9
13
  Markup:
10
14
  <div class="dropdown">
11
15
  <a href="#" class="btn btn--default dropdown__toggle " data-toggle="dropdown">
@@ -87,10 +91,10 @@ Styleguide 7.2
87
91
 
88
92
  .dropdown__menu {
89
93
  @extend %dropdown !optional;
94
+ @extend .transition;
90
95
  @include border-bottom-radius($base-border-radius);
91
96
  @include opacity(0);
92
97
  @include position(absolute, 100% 0 0 0px);
93
- @include transition();
94
98
  border-style: solid;
95
99
  border-width: $input-border;
96
100
  display/*\**/: none\9; // Ugly IE8 Hack