compass-helium 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. data/README.md +47 -0
  2. data/lib/compass-helium.rb +3 -0
  3. data/stylesheets/_compass-helium.scss +17 -0
  4. data/stylesheets/compass-helium/buttons.scss +520 -0
  5. data/stylesheets/compass-helium/components.scss +109 -0
  6. data/stylesheets/compass-helium/config.scss +134 -0
  7. data/stylesheets/compass-helium/dropdowns.scss +94 -0
  8. data/stylesheets/compass-helium/forms.scss +272 -0
  9. data/stylesheets/compass-helium/grid.scss +113 -0
  10. data/stylesheets/compass-helium/master.scss +17 -0
  11. data/stylesheets/compass-helium/modals.scss +159 -0
  12. data/stylesheets/compass-helium/navs.scss +264 -0
  13. data/stylesheets/compass-helium/type.scss +150 -0
  14. data/stylesheets/compass-helium/utilities.scss +272 -0
  15. data/stylesheets/compass-helium/webfonts.scss +8 -0
  16. data/templates/project/config.rb +12 -0
  17. data/templates/project/fonts/entypo.eot +0 -0
  18. data/templates/project/fonts/entypo.svg +13 -0
  19. data/templates/project/fonts/entypo.ttf +0 -0
  20. data/templates/project/fonts/entypo.woff +0 -0
  21. data/templates/project/forms.html +439 -0
  22. data/templates/project/index.html +151 -0
  23. data/templates/project/js/bootstrap-collapse.js +156 -0
  24. data/templates/project/js/bootstrap-dropdown.js +153 -0
  25. data/templates/project/js/bootstrap-modal-ck.js +18 -0
  26. data/templates/project/js/bootstrap-modal.js +234 -0
  27. data/templates/project/js/bootstrap-transition.js +60 -0
  28. data/templates/project/js/bootstrap.min.js +6 -0
  29. data/templates/project/js/jquery.min.js +2 -0
  30. data/templates/project/manifest.rb +30 -0
  31. data/templates/project/modals.html +152 -0
  32. data/templates/project/sass/style.scss +3 -0
  33. metadata +116 -0
@@ -0,0 +1,47 @@
1
+ # ![compass-helium](http://i.imgur.com/p9qAv.png)
2
+
3
+ This scaffolding is meant to encourage rapid development with Compass Extensions. Customize everything, make it your own! Build and publishing instructions are in the gemspec file.
4
+
5
+ ## Contribute
6
+ Please fork this repository, then submit a pull request with your changes in a new branch.
7
+
8
+ ## Installation
9
+
10
+ ### Bundler
11
+ If you want to bundle into your app, install bundler.
12
+
13
+ $ gem install bundler
14
+
15
+ With Bundler installed, add this to your Gemfile.
16
+
17
+ group :assets do
18
+ gem 'compass-helium'
19
+ end
20
+
21
+ Run this in the command line:
22
+
23
+ $ bundle install
24
+ $ git add Gemfile Gemfile.lock
25
+
26
+ ### Manual
27
+ If bundler isn't your thing, install this gem.
28
+
29
+ $ gem install compass-helium
30
+
31
+ Next in your Compass project add this to your config.rb
32
+
33
+ require 'compass-helium'
34
+
35
+ ## Documentation
36
+
37
+ To get started install into your project.
38
+
39
+ compass install compass-helium
40
+
41
+ Then verify it's installed.
42
+
43
+ compass help compass-helium
44
+
45
+ ## Credits
46
+
47
+ This Compass extension for [helium](https://github.com/cbrauckmuller/helium) was created by **[Stephen Way](https://twitter.com/stephencway)**
@@ -0,0 +1,3 @@
1
+ require 'compass'
2
+ extension_path = File.expand_path(File.join(File.dirname(__FILE__), ".."))
3
+ Compass::Frameworks.register('compass-helium', :path => extension_path)
@@ -0,0 +1,17 @@
1
+ // Compass files first
2
+ @import "compass/css3";
3
+ @import "compass/reset";
4
+
5
+ // Import core files in this order
6
+ @import "compass-helium/config";
7
+ @import "compass-helium/utilities";
8
+ @import "compass-helium/grid";
9
+ @import "compass-helium/type";
10
+
11
+ // Optional components
12
+ @import "compass-helium/webfonts";
13
+ @import "compass-helium/forms";
14
+ @import "compass-helium/buttons";
15
+ @import "compass-helium/navs";
16
+ @import "compass-helium/dropdowns";
17
+ @import "compass-helium/modals";
@@ -0,0 +1,520 @@
1
+ // Button sizing
2
+ // -------------
3
+
4
+ @mixin button-size($height, $font-size, $border-width, $border-color, $horizontal-padding) {
5
+
6
+ height: $height;
7
+ padding: ($height - $font-size - ($border-width * 2)) / 2 $horizontal-padding;
8
+ font-size: $font-size;
9
+ }
10
+
11
+ // Button border
12
+ // -------------
13
+
14
+ @mixin button-border($theme) {
15
+ @if $theme == "glossy" {
16
+ border-color: $button-border-color;
17
+ }
18
+
19
+ @if $theme == "flat" {
20
+ border-color: $button-border-color;
21
+ }
22
+ }
23
+
24
+ // Button theme
25
+ // ------------
26
+
27
+ @mixin button-theme($theme) {
28
+ @if $theme == "glossy" {
29
+ @include background-image(
30
+ linear-gradient(
31
+ top,
32
+ $button-highlight 1px,
33
+ $button-shine 1px,
34
+ $button-shine 2px,
35
+ $button-highlight 2px,
36
+ $button-lowlight 100%
37
+ )
38
+ );
39
+ @include box-shadow($button-box-shadow);
40
+ text-shadow: 0px 1px 0px $button-shine;
41
+ }
42
+
43
+ @if $theme == "flat" {
44
+ background: $button-solid-background;
45
+ }
46
+ }
47
+
48
+ // Custom colored buttons
49
+ // ----------------------
50
+
51
+ @mixin button-custom(
52
+ $theme,
53
+ $background-color,
54
+ $text-color,
55
+ $reversed: false
56
+ ) {
57
+
58
+ @if $theme == "glossy" {
59
+ @include background-image(
60
+ linear-gradient(
61
+ top,
62
+ lighten($background-color, 5%) 1px,
63
+ lighten($background-color, 10%) 1px,
64
+ lighten($background-color, 10%) 2px,
65
+ lighten($background-color, 5%) 2px,
66
+ darken($background-color, 5%) 100%
67
+ )
68
+ );
69
+ }
70
+
71
+ @if $theme == "flat" {
72
+ background: $background-color;
73
+ }
74
+
75
+ @if $reversed == true {
76
+ text-shadow: 0px 1px 0px rgba(0,0,0,0.2);
77
+ @include box-shadow(0px 1px 0px rgba(0,0,0,0.2));
78
+ }
79
+
80
+ @if $reversed == false {
81
+ text-shadow: 0px 1px 0px rgba(0,0,0,0.2);
82
+ }
83
+
84
+ color: $text-color;
85
+
86
+ &:hover {
87
+
88
+ @if $theme == "glossy" {
89
+ @include background-image(
90
+ linear-gradient(
91
+ top,
92
+ lighten($background-color, 10%) 1px,
93
+ lighten($background-color, 15%) 1px,
94
+ lighten($background-color, 15%) 2px,
95
+ lighten($background-color, 15%) 2px,
96
+ darken($background-color, 0%) 100%
97
+ )
98
+ );
99
+ }
100
+
101
+ @if $theme == "flat" {
102
+ background: lighten($background-color, 5%);
103
+ }
104
+ }
105
+
106
+ &:active,
107
+ &.active {
108
+
109
+ @if $theme == "glossy" {
110
+ @include background-image(
111
+ linear-gradient(
112
+ top,
113
+ darken($background-color, 5%) 0%,
114
+ $background-color 100%
115
+ )
116
+ );
117
+ @include box-shadow(inset 0px 1px 2px rgba(0,0,0,0.15));
118
+ }
119
+
120
+ @if $theme == "flat" {
121
+ background: darken($background-color, 5%);
122
+ }
123
+ }
124
+ }
125
+
126
+ // Base button styles
127
+ // ------------------
128
+
129
+ .button {
130
+
131
+ @include clearfix();
132
+ @include background-origin(border-box);
133
+ @include background-clip(border-box);
134
+ @include border-radius($button-border-radius);
135
+ @include button-size($button-height, $button-font-size, $button-border-width, $button-border-color, $button-horizontal-padding);
136
+ @include button-border($button-theme);
137
+ @include button-theme($button-theme);
138
+
139
+ display: inline-block;
140
+ margin: 0 $base-font-size / 4 0 0;
141
+ border-width: $button-border-width;
142
+ border-style: solid;
143
+ cursor: pointer;
144
+
145
+ color: $button-font-color;
146
+ font-family: $button-font-family;
147
+ font-weight: $button-font-weight;
148
+ line-height: 1;
149
+ text-align: center;
150
+ text-decoration: none;
151
+ vertical-align: middle;
152
+
153
+ // Last child
154
+ // ----------
155
+
156
+ &:last-child {
157
+ margin-right: 0;
158
+ }
159
+
160
+ // Button icons
161
+ // ------------
162
+
163
+ .icon {
164
+ position: relative;
165
+ vertical-align: top;
166
+ top: ($button-font-size - $button-icon-size) / 2;
167
+ }
168
+
169
+ // Buttons with icon dividers
170
+ // --------------------------
171
+
172
+ &.has-icon-divider {
173
+ position: relative;
174
+
175
+ .icon.icon-prepend {
176
+ margin-right: ($button-font-size * 1.8);
177
+ }
178
+
179
+ &:before {
180
+ @include pseudo();
181
+ width: 1px;
182
+ height: 100%;
183
+ background: $button-border-color;
184
+ left: $button-horizontal-padding + $button-icon-size + $button-font-size - 2;
185
+ top: 0px;
186
+ }
187
+ }
188
+
189
+ // Hover state
190
+ // -----------
191
+
192
+ &:hover {
193
+
194
+ @if $button-theme == "glossy" {
195
+
196
+ @include background-image(
197
+ linear-gradient(
198
+ top,
199
+ $button-shine 0px,
200
+ lighten($button-highlight, 3%) 1px,
201
+ lighten($button-lowlight, 3%) 100%
202
+ )
203
+ );
204
+
205
+ }
206
+
207
+ @if $button-theme == "flat" {
208
+ background: lighten($button-solid-background, 5%);
209
+ }
210
+
211
+ color: $button-font-color;
212
+ text-decoration: none;
213
+ }
214
+
215
+ // Active state
216
+ // ------------
217
+
218
+ &:active,
219
+ &.active {
220
+
221
+ @if $button-theme == "glossy" {
222
+ @include background-image(
223
+ linear-gradient(
224
+ top,
225
+ $button-lowlight 0px,
226
+ $button-highlight 100%
227
+ )
228
+ );
229
+ @include box-shadow(inset 0px 1px 2px rgba(0,0,0,0.15));
230
+ }
231
+
232
+ @if $button-theme == "flat" {
233
+ background: darken($button-solid-background, 5%);
234
+ }
235
+ }
236
+
237
+ // Focus state
238
+ // -----------
239
+
240
+ &:focus {
241
+ outline: none;
242
+ }
243
+
244
+ // Large buttons
245
+ // -------------
246
+
247
+ &.button-large {
248
+
249
+ $height: $button-large-height;
250
+ $font-size: $button-large-font-size;
251
+ $border-width: $button-border-width;
252
+ $border-color: $button-border-color;
253
+ $horizontal-padding: $button-large-horizontal-padding;
254
+
255
+ @include button-size($height, $font-size, $border-width, $border-color, $horizontal-padding);
256
+
257
+ .icon {
258
+ top: ($font-size - $button-icon-size) / 2;
259
+ }
260
+
261
+ &.has-icon-divider {
262
+
263
+ .icon.icon-prepend {
264
+ margin-right: $horizontal-padding * 2;
265
+ }
266
+
267
+ &:before {
268
+ left: $horizontal-padding + $button-icon-size + $horizontal-padding - 2;
269
+ }
270
+ }
271
+ }
272
+
273
+ // Small buttons
274
+ // -------------
275
+
276
+ &.button-small {
277
+
278
+ $height: $button-small-height;
279
+ $font-size: $button-small-font-size;
280
+ $border-width: $button-border-width;
281
+ $border-color: $button-border-color;
282
+ $horizontal-padding: $button-small-horizontal-padding;
283
+
284
+ @include button-size($height, $font-size, $border-width, $border-color, $horizontal-padding);
285
+
286
+ .icon {
287
+ top: ($font-size - $button-icon-size) / 2;
288
+ }
289
+
290
+ &.has-icon-divider {
291
+
292
+ .icon.icon-prepend {
293
+ margin-right: $horizontal-padding * 2;
294
+ }
295
+
296
+ &:before {
297
+ left: $horizontal-padding + $button-icon-size + $horizontal-padding - 2;
298
+ }
299
+ }
300
+ }
301
+
302
+ // Pill buttons
303
+ // ------------
304
+
305
+ &.button-pill {
306
+ @include border-radius(100px);
307
+ padding-left: 1.5em;
308
+ padding-right: 1.5em;
309
+ }
310
+
311
+ // Custom buttons
312
+ // --------------
313
+
314
+ &.button-facebook {
315
+ @include button-custom(
316
+ $theme: $button-theme,
317
+ $background-color: $facebook-blue,
318
+ $text-color: #fff,
319
+ $reversed: true
320
+ );
321
+ }
322
+
323
+ &.button-twitter {
324
+ @include button-custom(
325
+ $theme: $button-theme,
326
+ $background-color: darken($twitter-blue, 5%),
327
+ $text-color: #fff,
328
+ $reversed: true
329
+ );
330
+ }
331
+
332
+ // Disabled buttons
333
+ // ----------------
334
+
335
+ &.button-disabled {
336
+ opacity: 0.5;
337
+ cursor: not-allowed;
338
+ }
339
+ }
340
+
341
+ // Button dropdowns
342
+ // ----------------
343
+
344
+ .has-dropdown.button-dropdown {
345
+ display: inline-block;
346
+ margin-right: $base-font-size / 4; // Add back button right margin
347
+
348
+ .button {
349
+ margin-right: 0; // Remove button right margin so button and container are coterminous
350
+ padding-right: ($button-horizontal-padding * 1.5) + ($button-caret-height * 2);
351
+
352
+ .caret {
353
+ display: block;
354
+ position: absolute;
355
+ top: 0;
356
+ right: $button-horizontal-padding;
357
+ width: $navbar-caret-height * 2;
358
+ height: $button-height;
359
+
360
+ &:after {
361
+ @include css-triangle($navbar-caret-height, $button-font-color, top);
362
+ position: absolute;
363
+ top: ($button-height / 2) - ($navbar-caret-height / 2);
364
+ left: 0;
365
+ }
366
+ }
367
+ }
368
+
369
+ .dropdown {
370
+ left: 0;
371
+ margin-top: -1px;
372
+ @include border-radius(0 $small-border-radius $small-border-radius $small-border-radius);
373
+
374
+ &.right {
375
+ left: auto;
376
+ right: 0;
377
+ @include border-radius($small-border-radius 0 $small-border-radius $small-border-radius);
378
+
379
+ }
380
+
381
+ > li {
382
+ > a {
383
+ padding-left: $button-horizontal-padding;
384
+ padding-right: $button-horizontal-padding;
385
+ }
386
+ }
387
+ }
388
+
389
+ &.open {
390
+
391
+ > .button {
392
+
393
+ @if $button-theme == "glossy" {
394
+ @include box-shadow($dropdown-box-shadow);
395
+ }
396
+
397
+ @if $button-theme == "flat" {
398
+ border-color: $button-border-color;
399
+ }
400
+
401
+ @include border-radius($button-border-radius $button-border-radius 0 0);
402
+
403
+ background: $dropdown-background;
404
+ color: $base-font-color;
405
+ text-shadow: none;
406
+ }
407
+ }
408
+ }
409
+
410
+ // Button groups
411
+ // -------------
412
+
413
+ .button-group {
414
+
415
+ @include clearfix();
416
+ display: inline-block;
417
+ vertical-align: middle;
418
+ margin: 0 $base-font-size / 4 0 0;
419
+
420
+ > * {
421
+ float: left;
422
+ }
423
+
424
+ .button {
425
+ @include border-radius(0);
426
+ margin-right: 0;
427
+
428
+ @if $button-theme == "glossy" {
429
+ border-right: none;
430
+ }
431
+
432
+ @if $button-theme == "flat" {
433
+ border-right-color: $button-border-color;
434
+ }
435
+ }
436
+
437
+ > .button {
438
+
439
+ &:first-child {
440
+ @include border-radius($button-border-radius 0 0 $button-border-radius);
441
+ }
442
+
443
+ &:last-child {
444
+ @include border-radius(0 $button-border-radius $button-border-radius 0);
445
+ @include button-border($button-theme);
446
+ border-right-style: solid;
447
+ border-right-width: $button-border-width;
448
+ }
449
+ }
450
+
451
+ // Dropdowns in button groups
452
+ // --------------------------
453
+
454
+ .has-dropdown.button-dropdown {
455
+
456
+ margin-right: 0;
457
+
458
+ .dropdown {
459
+ @include border-radius(0 0 $small-border-radius $small-border-radius);
460
+ }
461
+
462
+ &:first-child {
463
+ .button {
464
+ @include border-radius($button-border-radius 0 0 $button-border-radius);
465
+ }
466
+ }
467
+
468
+ &:last-child {
469
+ .button {
470
+ @include border-radius(0 $button-border-radius $button-border-radius 0);
471
+ @include button-border($button-theme);
472
+ border-right-style: solid;
473
+ border-right-width: $button-border-width;
474
+
475
+ @if $button-theme == "flat" {
476
+ border-left: none;
477
+ }
478
+ }
479
+ }
480
+
481
+ &.open {
482
+ .button {
483
+ @include border-radius(0);
484
+
485
+ @if $button-theme == "flat" {
486
+ border-color: $button-border-color;
487
+ }
488
+ }
489
+
490
+ &:first-child {
491
+ .button {
492
+ @include border-radius($button-border-radius 0 0 0);
493
+ }
494
+ }
495
+
496
+ &:last-child {
497
+ .button {
498
+ @include border-radius(0 $button-border-radius 0 0);
499
+ }
500
+ }
501
+ }
502
+ }
503
+ }
504
+
505
+ // Button icons
506
+ // ------------
507
+
508
+ .icon {
509
+ font-family: "Entypo";
510
+ display: inline-block;
511
+ width: 16px;
512
+ height: 16px;
513
+ @include border-radius(100px);
514
+ background: rgba(0,0,0,0.2);
515
+ vertical-align: middle;
516
+
517
+ &.icon-prepend {
518
+ margin-right: 0.8em;
519
+ }
520
+ }