rapido-css 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/lib/rapido-css.rb CHANGED
@@ -1,3 +1,5 @@
1
1
  require 'compass'
2
+ require 'susy'
3
+
2
4
  extension_path = File.expand_path(File.join(File.dirname(__FILE__), ".."))
3
- Compass::Frameworks.register('rapido-css', :path => extension_path)
5
+ Compass::Frameworks.register('rapido-css', :path => extension_path)
@@ -4,6 +4,7 @@ Breadcrumbs
4
4
 
5
5
  Add a breadcrumb with a list with class `.breadcrumb`.
6
6
 
7
+ Markup:
7
8
  <ul class="breadcrumbs">
8
9
  <li><a href="#">Home</a></li>
9
10
  <li><a href="#">Library</a></li>
@@ -29,4 +30,4 @@ Styleguide 2
29
30
  .current {@extend %breadcrumbs__current !optional;}
30
31
  }
31
32
 
32
- }
33
+ }
@@ -2,7 +2,9 @@
2
2
 
3
3
  Buttons
4
4
 
5
- Button styles can be applied to anything with the `.btn` class applied. However, typically you'll want to apply these to only `<a>` and `<button>` elements for the best rendering.
5
+ Button styles can be applied to anything with the `.btn` class applied.
6
+ However, typically you'll want to apply these to only `<a>` and `<button>`
7
+ elements for the best rendering.
6
8
 
7
9
  Markup:
8
10
  <a href="#" class="btn btn--default {$modifiers}">Link Button</a>
@@ -43,6 +45,28 @@ Styleguide 3
43
45
  }
44
46
  }
45
47
 
48
+ /*
49
+
50
+ Buttons with Icons
51
+
52
+ To add an icon to a button (or eny other type of element) just enable the font
53
+ (see 27.2), add a class with the name of the font and use the unicode of
54
+ the character.
55
+
56
+ It's not a pretty way of doing it, if you prefer more fine control i suggest
57
+ to ditch the icon font integration and use the tools and resources made
58
+ available on the fonts sites.
59
+
60
+ Markup:
61
+ <a href="#" class="btn btn--default fontawesome">&#xf02b;</a>
62
+ <a href="#" class="btn btn--default fontawesome">&#xf040;</a>
63
+ <a href="#" class="btn btn--default fontawesome">&#xf06c;</a>
64
+
65
+ Styleguide 3.1
66
+
67
+ */
68
+
69
+
46
70
  /*
47
71
 
48
72
  Colors
@@ -52,7 +76,7 @@ Markup:
52
76
  <a href="#" class="btn btn--primary">Link Button</a>
53
77
  <a href="#" class="btn btn--secondary">Link Button</a>
54
78
 
55
- Styleguide 3.1
79
+ Styleguide 3.2
56
80
 
57
81
  */
58
82
 
@@ -70,7 +94,7 @@ Markup:
70
94
  <a href="#" class="btn btn--default btn--small">Link Button</a>
71
95
  <a href="#" class="btn btn--default btn--mini">Link Button</a>
72
96
 
73
- Styleguide 3.2
97
+ Styleguide 3.3
74
98
 
75
99
  */
76
100
 
@@ -93,12 +117,12 @@ Styleguide 3.2
93
117
  }
94
118
 
95
119
  .btn--small {
96
- @include adjust-font-size-to($milli-size);
120
+ @include adjust-font-size-to($small-size);
97
121
  padding: $btn-small-padding;
98
122
  }
99
123
 
100
124
  .btn--mini {
101
- @include adjust-font-size-to($micro-size);
125
+ @include adjust-font-size-to($smaller-size);
102
126
  padding: $btn-mini-padding;
103
127
  }
104
128
 
@@ -117,7 +141,7 @@ Markup:
117
141
  .btn--pill - Button width rounded full corners.
118
142
  .btn--link - Deemphasize a button by making it look like a link while maintaining button behavior.
119
143
 
120
- Styleguide 3.3
144
+ Styleguide 3.4
121
145
 
122
146
  */
123
147
 
@@ -141,11 +165,25 @@ Styleguide 3.3
141
165
  @include border-radius(200px);
142
166
  }
143
167
 
144
- // Link buttons
168
+ /*
169
+
170
+ Link
171
+
172
+ Deemphasize a button by making it look like a link while maintaining
173
+ button behavior.
174
+
175
+ Markup:
176
+ <a href="#" class="btn btn--link ">Link Button</a>
177
+ <button class="btn btn--link">Button Element</button>
178
+
179
+ Styleguide 3.5
180
+
181
+ */
182
+
145
183
 
146
184
  .btn--link {
147
185
  @include border-radius(0);
148
- border: 0 transparent;
186
+ border-color: transparent;
149
187
  background: none;
150
188
  color: $link-color;
151
189
  cursor: pointer;
@@ -168,4 +206,4 @@ Styleguide 3.3
168
206
  }
169
207
  }
170
208
 
171
- }
209
+ }
@@ -7,7 +7,7 @@ Toggleable, contextual menu for displaying lists of links. Made interactive with
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
9
  Markup:
10
- <div class="dropdown {$modifiers}">
10
+ <div class="dropdown">
11
11
  <a href="#" class="btn btn--default dropdown__toggle " data-toggle="dropdown">
12
12
  Dropdown
13
13
  <span class="dropdown__caret"></span>
@@ -20,6 +20,21 @@ Markup:
20
20
  <li><a tabindex="-1" href="#">Separated link</a></li>
21
21
  </ul>
22
22
  </div>
23
+ <div class="dropdown">
24
+ <a href="#" class="btn btn--default dropdown__toggle " data-toggle="dropdown">
25
+ Dropdown
26
+ <span class="dropdown__caret"></span>
27
+ </a>
28
+ <ul class="dropdown__menu pull-right ">
29
+ <li><a tabindex="-1" href="#">Action</a></li>
30
+ <li><a tabindex="-1" href="#">Another action</a></li>
31
+ <li><a tabindex="-1" href="#">Something else here</a></li>
32
+ <li class="divider"></li>
33
+ <li><a tabindex="-1" href="#">Separated link</a></li>
34
+ </ul>
35
+ </div>
36
+
37
+
23
38
 
24
39
  Styleguide 7
25
40
 
@@ -30,6 +45,7 @@ Styleguide 7
30
45
  .dropdown,
31
46
  .dropdown__toggle {
32
47
  position: relative;
48
+ display: inline-block;
33
49
  }
34
50
 
35
51
  .dropdown__toggle:focus { outline: 0; }
@@ -56,14 +72,14 @@ Dropdown menu
56
72
 
57
73
  List of the links to show in the dropdown.
58
74
 
59
- Markup:
60
- <ul class="dropdown__menu ">
61
- <li><a tabindex="-1" href="#">Action</a></li>
62
- <li><a tabindex="-1" href="#">Another action</a></li>
63
- <li><a tabindex="-1" href="#">Something else here</a></li>
64
- <li class="divider"></li>
65
- <li><a tabindex="-1" href="#">Separated link</a></li>
66
- </ul>
75
+
76
+ <ul class="dropdown__menu ">
77
+ <li><a tabindex="-1" href="#">Action</a></li>
78
+ <li><a tabindex="-1" href="#">Another action</a></li>
79
+ <li><a tabindex="-1" href="#">Something else here</a></li>
80
+ <li class="divider"></li>
81
+ <li><a tabindex="-1" href="#">Separated link</a></li>
82
+ </ul>
67
83
 
68
84
  Styleguide 7.2
69
85
 
@@ -72,16 +88,19 @@ Styleguide 7.2
72
88
  .dropdown__menu {
73
89
  @extend %dropdown !optional;
74
90
  @include border-bottom-radius($base-border-radius);
91
+ @include opacity(0);
92
+ @include position(absolute, 100% 0 0 0px);
75
93
  @include transition();
76
94
  border-style: solid;
77
95
  border-width: $input-border;
96
+ display/*\**/: none\9; // Ugly IE8 Hack
78
97
  float: left;
79
98
  list-style: none;
80
99
  margin: -$input-border 0 0 0;
100
+ max-height: 0;
81
101
  min-width: 10em;
82
102
  overflow: hidden;
83
103
  z-index: $zindex-dropdown;
84
- display/*\**/: none\9; // Ugly IE8 Hack
85
104
 
86
105
  &[data-content] { min-width: em(600px); }
87
106
 
@@ -135,16 +154,8 @@ Styleguide 7.2
135
154
  cursor: default;
136
155
  }
137
156
 
138
-
139
- // Hide .dropdown__menu when .dropdown is closed
140
- .dropdown .dropdown__menu {
141
- @include opacity(0);
142
- @include position(absolute, 100% 0 0 0px);
143
- max-height: 0;
144
- }
145
-
146
157
  // Dropdown open
147
- //
158
+
148
159
  .dropdown.open {
149
160
  z-index: $zindex-dropdown ;
150
161
 
@@ -2,9 +2,10 @@
2
2
 
3
3
  Forms
4
4
 
5
- Individual form controls receive default styling with `form` Results in stacked, left-aligned labels on top of form controls.
5
+ Individual form controls receive default styling with `form` Results in
6
+ stacked, left-aligned labels on top of form controls.
6
7
 
7
- .form
8
+ form
8
9
  +–– .form__group
9
10
  | |–– .form__label
10
11
  | +–– .form__controls
@@ -141,20 +142,22 @@ select[size] {
141
142
  height: auto;
142
143
  }
143
144
 
144
-
145
145
  input,
146
146
  textarea {
147
147
  @include placeholder($placeholder-color);
148
148
  }
149
149
 
150
- // input[disabled],
151
- // select[disabled],
152
- // textarea[disabled],
153
- // input[readonly],
154
- // select[readonly],
155
- // textarea[readonly] {
156
- // cursor: not-allowed;
157
- // }
150
+ input[readonly],
151
+ select[readonly],
152
+ textarea[readonly] {
153
+ cursor: default;
154
+ }
155
+
156
+ input[disabled],
157
+ select[disabled],
158
+ textarea[disabled],{
159
+ cursor: not-allowed;
160
+ }
158
161
 
159
162
  input[type="radio"][disabled],
160
163
  input[type="checkbox"][disabled],
@@ -177,7 +180,12 @@ select:focus:invalid {
177
180
 
178
181
  .form__group + .form__group { margin-top: em($control-margin-bottom); }
179
182
 
180
- .form__controls { @extend .clearfix; }
183
+ .form__controls {
184
+ @extend .clearfix;
185
+ position: relative;
186
+ display: inline-block;
187
+ }
188
+
181
189
 
182
190
  /*
183
191
 
@@ -249,7 +257,8 @@ Styleguide 8.2
249
257
 
250
258
  Custom Select
251
259
 
252
- Add custom styling to a select element wrapping the `<select>` with a `<span>` with class `.form__select`.
260
+ Add custom styling to a select element wrapping the `<select>` with a `<span>`
261
+ with class `.form__select`.
253
262
 
254
263
  Markup:
255
264
  <span class="form__select">
@@ -301,6 +310,42 @@ Styleguide 8.3
301
310
 
302
311
  }
303
312
 
313
+ /*
314
+
315
+ Custom icons in inputs
316
+
317
+ Markup:
318
+ <div class="form__controls">
319
+ <span class="form__icon fontawesome">&#xf02b;</span>
320
+ <input type="text">
321
+ </div>
322
+ <div class="form__controls">
323
+ <span class="form__icon fontawesome pull-right">&#xf040;</span>
324
+ <input type="text">
325
+ </div>
326
+
327
+ Styleguide 8.4
328
+
329
+ */
330
+
331
+ .form__icon {
332
+ @include position(absolute, em($input-padding-top) 0 0 em($input-padding-side));
333
+
334
+ + input {
335
+ padding-left: em(30px);
336
+ }
337
+
338
+ &.pull-right {
339
+ left: auto;
340
+ right: em($input-padding-side);
341
+
342
+ + input {
343
+ padding-left: em($input-padding-side);
344
+ padding-right: em(30px);
345
+ }
346
+ }
347
+
348
+ }
304
349
 
305
350
 
306
351
  /*
@@ -309,21 +354,16 @@ Help
309
354
 
310
355
  Add an help text block
311
356
 
312
- **Block Help**
313
-
314
- <div class="form__controls">
315
- <input type="text">
316
- <span class="form__help--block">Help text</span>
317
- </div>
318
-
319
- **Help Inline**
357
+ Markup:
358
+ <div class="form__controls">
359
+ <input type="text">
360
+ <span class="{$modifiers}">This is an example help text</span>
361
+ </div>
320
362
 
321
- <div class="form__controls">
322
- <input type="text">
323
- <span class="form__help--inline">Help text</span>
324
- </div>
363
+ .form__help--block - Block Help
364
+ .form__help--inline - Help Inline
325
365
 
326
- Styleguide 8.4
366
+ Styleguide 8.5
327
367
 
328
368
  */
329
369
 
@@ -349,12 +389,13 @@ Append & Prepend
349
389
 
350
390
  Markup:
351
391
  <div class="form__controls form__controls--multi">
392
+ <span class="form__addon fontawesome">&#xf06c;</span>
352
393
  <span class="form__addon">$</span>
353
394
  <input type="text">
354
395
  <span class="form__addon">.00</span>
355
396
  </div>
356
397
 
357
- Styleguide 8.5
398
+ Styleguide 8.6
358
399
 
359
400
  */
360
401
 
@@ -411,7 +452,7 @@ Markup:
411
452
  <button type="button" class="btn btn--default btn--secondary">Cancel</button>
412
453
  </div>
413
454
 
414
- Styleguide 8.6
455
+ Styleguide 8.7
415
456
 
416
457
  */
417
458
 
@@ -430,7 +471,7 @@ Styleguide 8.6
430
471
  Form Layouts
431
472
 
432
473
  Markup:
433
- <form class="form {$modifiers}">
474
+ <form class="{$modifiers}">
434
475
  <div class="form__group">
435
476
  <label class="form__label">Label</label>
436
477
  <div class="form__controls">
@@ -458,7 +499,7 @@ Markup:
458
499
  .form--aligned - Right align labels and float them to the left to make them appear on the same line as controls.
459
500
  .form--inline - For left-aligned labels and inline-block controls for a compact layout. This layout doesn't support `.form__group`, `.form__addon`, `.form__actions`
460
501
 
461
- Styleguide 8.7
502
+ Styleguide 8.8
462
503
 
463
504
  */
464
505
 
@@ -490,7 +531,7 @@ Styleguide 8.7
490
531
  text-align: right;
491
532
  }
492
533
 
493
- .form__controls { margin-left: em($horizontal-offset); }
534
+ .form__controls { margin-left: em(20px); }
494
535
 
495
536
  .form__help--block { margin-bottom: 0; }
496
537
 
@@ -530,7 +571,7 @@ Inline Form (semplified)
530
571
  The inline layout can also be used width a samplified markup.
531
572
 
532
573
  Markup:
533
- <form class="form form--inline">
574
+ <form class="form--inline">
534
575
  <label class="form__label">Label</label>
535
576
  <input type="text" placeholder="Type something…">
536
577
  <label class="form__label">Label</label>
@@ -540,7 +581,7 @@ Markup:
540
581
  <button type="submit" class="btn btn--default ">Save changes</button>
541
582
  </form>
542
583
 
543
- Styleguide 8.7.1
584
+ Styleguide 8.8.1
544
585
 
545
586
  */
546
587
 
@@ -42,12 +42,7 @@ $media-queries: palm, lap, portable, lap-and-up, desk;
42
42
  @include span-columns($i);
43
43
  }
44
44
 
45
- [class*="#{$device}-#{$i}"]:nth-child(#{$nth}n) {
46
- @include omega()
47
- }
48
-
49
45
  $i: $i - 1;
50
-
51
46
  }
52
47
  }
53
48
  }
@@ -81,6 +76,7 @@ Styleguide 9.1
81
76
  @include media($device) {
82
77
  .#{$device}-hide { display: none !important; }
83
78
  .#{$device}-show { display: block !important; }
79
+ .#{$device}-omega { @include omega(); }
84
80
  }
85
81
  }
86
82
  }
@@ -70,7 +70,7 @@ Styleguide 12
70
70
  // Nav Title
71
71
 
72
72
  .nav__title {
73
- @include adjust-font-size-to($milli-size);
73
+ @include adjust-font-size-to($small-size);
74
74
  color: $gray;
75
75
  display: block;
76
76
  font-weight: bold;
@@ -54,7 +54,7 @@ Styleguide 16
54
54
  z-index: 200;
55
55
 
56
56
  i {font-style: normal;}
57
- span {@include hide-text;}
57
+ span {@extend .visuallyhidden;}
58
58
  }
59
59
 
60
60
  .disabled { display: none; }
@@ -103,4 +103,4 @@ Styleguide 16
103
103
  }
104
104
  }
105
105
 
106
- }
106
+ }
@@ -71,7 +71,7 @@ p { margin: 0 0 rhythm(1);}
71
71
 
72
72
  // Emphasis & misc
73
73
 
74
- small { @include adjust-font-size-to($milli-size); }
74
+ small { @include adjust-font-size-to($small-size); }
75
75
 
76
76
  strong { font-weight: bold; }
77
77
  em { font-style: italic; }
@@ -204,6 +204,8 @@ Markup:
204
204
  <dl>
205
205
  <dt>Rock Hammer</dt>
206
206
  <dd>A geologist’s hammer, rock hammer, rock pick or geological pick is a hammer used for splitting and breaking rocks.</dd>
207
+ <dt>Rock Hammer</dt>
208
+ <dd>A geologist’s hammer, rock hammer, rock pick or geological pick is a hammer used for splitting and breaking rocks.</dd>
207
209
  </dl>
208
210
 
209
211
  Styleguide 19.4
@@ -223,6 +225,8 @@ Markup:
223
225
  <dl class="dl-horizontal">
224
226
  <dt>Rock Hammer</dt>
225
227
  <dd>A geologist’s hammer, rock hammer, rock pick or geological pick is a hammer used for splitting and breaking rocks.</dd>
228
+ <dt>Rock Hammer</dt>
229
+ <dd>A geologist’s hammer, rock hammer, rock pick or geological pick is a hammer used for splitting and breaking rocks.</dd>
226
230
  </dl>
227
231
 
228
232
  Styleguide 19.4.1
@@ -295,7 +299,7 @@ blockquote {
295
299
  font-weight: 300;
296
300
  }
297
301
 
298
- small, cite {
302
+ cite {
299
303
  display: block;
300
304
  color: $grayLight;
301
305
  &:before {
@@ -31,16 +31,17 @@ Font sizes you can used with the compass mixin `adjust-font-size-to()`. Naming c
31
31
  $h5-size: $base-font-size * 1.25 # 17.5px
32
32
  $h6-size: $base-font-size * 1 # 14px
33
33
 
34
- $milli-size: $base-font-size * .85 # 12px
35
- $micro-size: $base-font-size * .7 # 10px
34
+ $small-size: $base-font-size * .85 # 12px
35
+ $smaller-size: $base-font-size * .7 # 10px
36
+ $smallest-size: $base-font-size * .5 # 7px
36
37
 
37
38
  Styleguide 28.1
38
39
 
39
40
  */
40
41
 
41
- $giga-size: $base-font-size * 7 !default;
42
- $mega-size: $base-font-size * 5 !default;
43
- $kilo-size: $base-font-size * 3.5 !default;
42
+ $biggest-size: $base-font-size * 7 !default;
43
+ $bigger-size: $base-font-size * 5 !default;
44
+ $big-size: $base-font-size * 3.5 !default;
44
45
 
45
46
  $h1-size: $base-font-size * 2.5 !default;
46
47
  $h2-size: $base-font-size * 2 !default;
@@ -49,12 +50,17 @@ $h4-size: $base-font-size * 1.5
49
50
  $h5-size: $base-font-size * 1.25 !default;
50
51
  $h6-size: $base-font-size * 1 !default;
51
52
 
52
- $milli-size: $base-font-size * .85 !default;
53
- $micro-size: $base-font-size * .7 !default;
53
+ $small-size: $base-font-size * .85 !default;
54
+ $smaller-size: $base-font-size * .7 !default;
55
+ $smallest-size: $base-font-size * .5 !default;
54
56
 
55
- $small-size: $milli-size !default;
56
- $smaller-size: $micro-size !default;
57
+ // Backward compatibility
57
58
 
59
+ $giga-size: $biggest-size ;
60
+ $mega-size: $bigger-size ;
61
+ $kilo-size: $big-size ;
62
+ $milli-size: $small-size ;
63
+ $micro-size: $smaller-size ;
58
64
 
59
65
  /*
60
66
 
@@ -63,7 +69,7 @@ Line-Height
63
69
  By default all titles have a line-height based on the font-size, to ensure that it will allways respect the vertical rhythm.
64
70
  Sometimes this result is not what we expect/want so it's possible to override the default proportion width these.
65
71
 
66
- These values mean: X times the base line-height.
72
+ These values mean: n times the base line-height.
67
73
 
68
74
  $h1-line-height: 2
69
75
  $h2-line-height: 2
@@ -13,8 +13,11 @@ Styleguide 22
13
13
  Generic
14
14
 
15
15
  Add a a simple `transition all`, used as a generic extend for element that can accept transition on all attributes.
16
+
16
17
  .transition
17
- Simple divider class used in some components (like dropdowns).␣␣
18
+
19
+ Simple divider class used in some components (like dropdowns).
20
+
18
21
  .divider
19
22
 
20
23
  Styleguide 22.1