ellipsis-compass 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +15 -0
  2. data/lib/ellipsis-compass.rb +4 -0
  3. data/stylesheets/animation/_animate.scss +1206 -0
  4. data/stylesheets/animation/_animation.scss +121 -0
  5. data/stylesheets/animation/_animations.scss +771 -0
  6. data/stylesheets/animation/_transit.scss +425 -0
  7. data/stylesheets/animation/_transitions.scss +320 -0
  8. data/stylesheets/base/_breakpoints.scss +64 -0
  9. data/stylesheets/base/_document.scss +219 -0
  10. data/stylesheets/base/_global.scss +88 -0
  11. data/stylesheets/base/_normalize.scss +406 -0
  12. data/stylesheets/component/_component.scss +939 -0
  13. data/stylesheets/component/_ui.scss +955 -0
  14. data/stylesheets/flexbox/_flexbox.scss +305 -0
  15. data/stylesheets/font/_icons.scss +1492 -0
  16. data/stylesheets/font/_ubuntu.scss +38 -0
  17. data/stylesheets/form/_form.scss +836 -0
  18. data/stylesheets/grid/_grid.scss +312 -0
  19. data/stylesheets/helpers/_all.scss +8 -0
  20. data/stylesheets/helpers/_component.scss +177 -0
  21. data/stylesheets/helpers/_convenience.scss +277 -0
  22. data/stylesheets/helpers/_functions.scss +427 -0
  23. data/stylesheets/helpers/_grid.scss +39 -0
  24. data/stylesheets/helpers/_hardware-acceleration.scss +22 -0
  25. data/stylesheets/helpers/_mixins.scss +207 -0
  26. data/stylesheets/helpers/_touch.scss +107 -0
  27. data/stylesheets/helpers/_visibility.scss +138 -0
  28. data/stylesheets/image/_images.scss +19 -0
  29. data/stylesheets/imports/elements/_autosearch.scss +11 -0
  30. data/stylesheets/imports/elements/_badge.scss +23 -0
  31. data/stylesheets/imports/elements/_barchart.scss +254 -0
  32. data/stylesheets/imports/elements/_form.scss +8 -0
  33. data/stylesheets/imports/elements/_loginform.scss +6 -0
  34. data/stylesheets/imports/elements/_modellist.scss +14 -0
  35. data/stylesheets/imports/elements/_pluralize.scss +8 -0
  36. data/stylesheets/imports/elements/_signupform.scss +6 -0
  37. data/stylesheets/imports/elements/_slidenotification.scss +65 -0
  38. data/stylesheets/imports/elements/_stickyreveal.scss +44 -0
  39. data/stylesheets/imports/elements/_template.scss +7 -0
  40. data/stylesheets/imports/elements/_veneer.scss +36 -0
  41. data/stylesheets/shared/_shared.scss +282 -0
  42. data/stylesheets/touch/ui/_drawer.scss +41 -0
  43. data/stylesheets/touch/ui/_dropdown.scss +58 -0
  44. data/stylesheets/touch/ui/_menu.scss +131 -0
  45. data/stylesheets/touch/ui/_navbar.scss +44 -0
  46. data/stylesheets/touch/ui/_toggle.scss +127 -0
  47. data/stylesheets/touch/ui/_topbar.scss +48 -0
  48. data/stylesheets/typography/_typography.scss +746 -0
  49. data/stylesheets/ui/_autocomplete.scss +117 -0
  50. data/stylesheets/ui/_badge.scss +73 -0
  51. data/stylesheets/ui/_box.scss +78 -0
  52. data/stylesheets/ui/_breadcrumb.scss +64 -0
  53. data/stylesheets/ui/_button.scss +395 -0
  54. data/stylesheets/ui/_carousel.scss +284 -0
  55. data/stylesheets/ui/_collapsible.scss +61 -0
  56. data/stylesheets/ui/_container.scss +297 -0
  57. data/stylesheets/ui/_datepicker.scss +218 -0
  58. data/stylesheets/ui/_drawer.scss +96 -0
  59. data/stylesheets/ui/_dropdown.scss +394 -0
  60. data/stylesheets/ui/_file.scss +147 -0
  61. data/stylesheets/ui/_gallery.scss +219 -0
  62. data/stylesheets/ui/_label.scss +167 -0
  63. data/stylesheets/ui/_loading.scss +70 -0
  64. data/stylesheets/ui/_mediaobject.scss +108 -0
  65. data/stylesheets/ui/_menu.scss +287 -0
  66. data/stylesheets/ui/_menutab.scss +175 -0
  67. data/stylesheets/ui/_modal.scss +47 -0
  68. data/stylesheets/ui/_navbar.scss +315 -0
  69. data/stylesheets/ui/_notification.scss +154 -0
  70. data/stylesheets/ui/_pagination.scss +137 -0
  71. data/stylesheets/ui/_parallax.scss +233 -0
  72. data/stylesheets/ui/_popover.scss +3 -0
  73. data/stylesheets/ui/_rating.scss +106 -0
  74. data/stylesheets/ui/_sidebar.scss +110 -0
  75. data/stylesheets/ui/_slidingpanel.scss +57 -0
  76. data/stylesheets/ui/_social.scss +213 -0
  77. data/stylesheets/ui/_sticky.scss +9 -0
  78. data/stylesheets/ui/_table.scss +423 -0
  79. data/stylesheets/ui/_tabs.scss +242 -0
  80. data/stylesheets/ui/_toggle.scss +49 -0
  81. data/stylesheets/ui/_tooltip.scss +57 -0
  82. data/stylesheets/ui/_topbar.scss +210 -0
  83. data/stylesheets/ui/_tree.scss +3 -0
  84. data/stylesheets/ui/_window.scss +205 -0
  85. metadata +140 -0
@@ -0,0 +1,939 @@
1
+ /* variables */
2
+ $include-component-gradient: true !default;
3
+ $include-component-gradient-inset: true !default;
4
+ $include-component-text-shadow: false !default;
5
+ $include-component-box-shadow: true !default;
6
+ $include-component-active-box-shadow: true !default;
7
+ $include-component-animation: false !default;
8
+ $component-animation: all 0.15s ease-in !default;
9
+ $component-hover-darken-factor: 4% !default;
10
+ $component-border-hover-darken-factor: 4% !default;
11
+ $component-border: 1px solid !default;
12
+ $component-text-shadow: 0 1px 0 !default;
13
+ $component-inset-box-shadow: rgba(0, 0, 0, .20) 0px 1px 1px, rgba(255, 255, 255, .40) 0 1px 0 0 inset !default;
14
+ $component-inset-box-shadow-30: rgba(0, 0, 0, .20) 0px 1px 1px, rgba(255, 255, 255, .30) 0 1px 0 0 inset !default;
15
+ $component-inset-box-shadow-40: rgba(0, 0, 0, .20) 0px 1px 1px, rgba(255, 255, 255, .40) 0 1px 0 0 inset !default;
16
+ $component-box-shadow: rgba(0, 0, 0, .20) 0px 1px 1px !default;
17
+ $component-box-shadow-active: inset 0 3px 5px rgba(0, 0, 0, .175) !default;
18
+ $component-background-disabled: #eee !default;
19
+ $component-font-color-disabled: darken(#eee, 5%) !default;
20
+ $component-border-disabled:1px solid transparent !important !default;
21
+ //$component-icon-text-shadow: 0 1px 0 !default;
22
+
23
+ /* mixins */
24
+
25
+ /* private -----------------------------------------------------------------------------------------------------------*/
26
+
27
+ /* mixin helpers for background */
28
+
29
+ //set a background value if passed value is color or string(e.g: none;transparent)
30
+ //if force bit is set, will otherwise set to gray if passed val not color or string
31
+ @mixin _background-set($color, $force: false) {
32
+ @if type-of($color) == color or type-of($color) == string {
33
+ background: $color;
34
+ } @else {
35
+ @if $force == true{
36
+ background: $gray;
37
+ }
38
+ }
39
+ }
40
+
41
+ //set a background gradient from a list
42
+ @mixin _background-gradient($list) {
43
+ @include mod-background-image(linear-gradient(top, $list));
44
+ }
45
+
46
+ //process a background request
47
+ @mixin _background($background, $background-alt) {
48
+ @if type-of($background) == list {
49
+ @if $include-component-gradient == true{
50
+ @include _background-set($background-alt, false);
51
+ @include _background-gradient($background);
52
+ } @else {
53
+ @include _background-set($background-alt, true);
54
+ }
55
+ } @else {
56
+ @include _background-set($background, false);
57
+ }
58
+ }
59
+
60
+
61
+
62
+ //darken a background color
63
+ @mixin _darken-background-color($color, $force: false) {
64
+ $_darkenFactor: $component-hover-darken-factor;
65
+
66
+ @if type-of($color) == color{
67
+ background: darken($color, $_darkenFactor);
68
+ } @else {
69
+ @if $force == true{
70
+ background: darken($gray, $_darkenFactor);
71
+ }
72
+ }
73
+ }
74
+
75
+ //darken a gradient background
76
+ @mixin _darken-background-gradient($list) {
77
+ $_darkenFactor: $component-hover-darken-factor;
78
+
79
+ $_start: darken(first($list), $_darkenFactor);
80
+ $_end: darken(last($list), $_darkenFactor);
81
+ @include mod-background-image(linear-gradient(top, $_start, $_end));
82
+
83
+ }
84
+
85
+ //process a background hover darken request
86
+ @mixin _background-hover($background, $background-alt) {
87
+ $_darkenFactor: $component-hover-darken-factor;
88
+
89
+ @if type-of($background) == list {
90
+ @if $include-component-gradient == true{
91
+ @include _darken-background-color($background-alt, false);
92
+ @include _darken-background-gradient($background);
93
+
94
+ } @else {
95
+ @include _darken-background-color($background-alt, true);
96
+ }
97
+ } @else {
98
+ @include _darken-background-color($background, false);
99
+ }
100
+ }
101
+
102
+
103
+
104
+ /* mixin helpers for border */
105
+ @mixin _border($border) {
106
+ @if type-of($border) == color{
107
+ border: $component-border;
108
+ border-color: $border !important;
109
+ } @else if type-of($border) == list{
110
+ @if list-has-number($border) {
111
+ border: $border !important;
112
+
113
+ } @else {
114
+ border: $component-border;
115
+ border-color: $border !important;
116
+
117
+ }
118
+ } @else {
119
+ border: none;
120
+
121
+ }
122
+ }
123
+
124
+
125
+ /* apply a darken to a border value */
126
+ @mixin _border-hover($border) {
127
+ $_darkenFactor: $component-border-hover-darken-factor;
128
+
129
+ @if type-of($border) == list{
130
+ @if list-has-number($border) {
131
+ border: $border !important;
132
+ } @else {
133
+ border: $component-border;
134
+ border-color: darken-rule($border, $_darkenFactor) !important;
135
+ }
136
+ } @else if type-of($border) == color{
137
+ border: $component-border !important;
138
+ border-color: darken-rule($border, $_darkenFactor) !important;
139
+ } @else {
140
+ border: none;
141
+ }
142
+
143
+ }
144
+
145
+ /* mixin helpers for box-shadow */
146
+
147
+ //box-shadow
148
+ @mixin _box-shadow($box-shadow) {
149
+
150
+ @if $include-component-box-shadow == true{
151
+ @if $box-shadow == null {
152
+ @include box-shadow($component-box-shadow);
153
+ } @else if type-of($box-shadow) == list {
154
+ @include box-shadow($box-shadow);
155
+ } @else {
156
+ box-shadow: none;
157
+ }
158
+ } @else {
159
+ @if type-of($box-shadow) ==list{
160
+ @include box-shadow($box-shadow);
161
+ }@else{
162
+ box-shadow: none;
163
+ }
164
+ }
165
+ }
166
+
167
+ //set default box-shadow for active if flag is true
168
+ @mixin _box-shadow-active() {
169
+ @if $include-component-active-box-shadow ==true{
170
+ @include box-shadow($component-box-shadow-active);
171
+ } @else {
172
+ box-shadow: none;
173
+ }
174
+ }
175
+
176
+ /* mixin helpers for font */
177
+
178
+ //set font for default state
179
+ @mixin _font-set($color: null, $text-shadow: null) {
180
+
181
+ @if type-of($color) == color{
182
+ color: $color;
183
+ opacity:1;
184
+ }@else if type-of($color) == number{
185
+ opacity:$color;
186
+ }
187
+ @if type-of($text-shadow) == list {
188
+ @if $include-component-text-shadow == true{
189
+ text-shadow: $text-shadow;
190
+ } @else {
191
+ text-shadow: none; //explicitly set text-shadow to avoid css-component inheriting another's text-shadow;
192
+ }
193
+ } @else {
194
+ text-shadow: none; //explicitly set text-shadow to avoid unexpected inheritance
195
+ }
196
+ }
197
+
198
+ @mixin _font-set-ext($color: null, $text-shadow: null) {
199
+
200
+ @if type-of($color) == color{
201
+ color: $color;
202
+ opacity:1;
203
+ }@else if type-of($color) == number{
204
+ opacity:$color;
205
+ }
206
+ @if type-of($text-shadow) == list {
207
+ @if $include-component-text-shadow == true{
208
+ text-shadow: $text-shadow;
209
+ } @else {
210
+ text-shadow: none;
211
+ }
212
+ } @else {
213
+ @if type-of($text-shadow) == string{
214
+ text-shadow: $text-shadow;
215
+ }
216
+
217
+ }
218
+ }
219
+
220
+ //set font for hover and active
221
+ @mixin _font-set-hover($color: null, $text-shadow: null) {
222
+
223
+ @if type-of($color) == color{
224
+ color: $color;
225
+ opacity:1;
226
+ }@else if type-of($color) == number{
227
+ opacity:$color;
228
+ }
229
+
230
+ @if type-of($text-shadow) == list {
231
+ @if $include-component-text-shadow == true{
232
+ text-shadow: $text-shadow;
233
+ }
234
+ }
235
+ }
236
+
237
+ //set the placeholder color
238
+ @mixin _placeholder-set($color:null){
239
+ &::-webkit-input-placeholder {
240
+ color: $color !important;
241
+ }
242
+ &::-moz-placeholder {
243
+ color: $color !important;
244
+ }
245
+ &::-o-placeholder {
246
+ color: $color !important;
247
+ }
248
+ &:-ms-input-placeholder {
249
+ color: $color !important;
250
+ }
251
+ }
252
+
253
+ /* mixin helper for disabled component */
254
+
255
+ //disabled component
256
+ @mixin _disabled-component($background-disabled, $font-color-disabled,$background) {
257
+ @if not(type-of($background-disabled) == color or type-of($background-disabled) == list or $background-disabled == none){
258
+ @if not(type-of($background) ==color or type-of($background) == list){
259
+ $background-disabled:none;
260
+ }@else{
261
+ $background-disabled: $component-background-disabled;
262
+ }
263
+ }
264
+
265
+ @if type-of($font-color-disabled) != color{
266
+ $font-color-disabled: $component-font-color-disabled;
267
+ }
268
+
269
+ background: $background-disabled !important;
270
+ text-shadow: none !important;
271
+ outline: none !important;
272
+ box-shadow: none !important;
273
+ border: $component-border-disabled;
274
+ cursor: default !important;
275
+ color: $font-color-disabled !important;
276
+ &:after {
277
+ background: none !important;
278
+ color: $font-color-disabled !important;
279
+ }
280
+ &:before {
281
+ background: none !important;
282
+ color: $font-color-disabled !important;
283
+ }
284
+ @include _placeholder-set($font-color-disabled);
285
+
286
+
287
+ }
288
+
289
+ @function _return-color($background, $background-alt) {
290
+ @if type-of($background) == color{
291
+ @return $background;
292
+ } @else if type-of($background-alt) == color{
293
+ @return $background-alt;
294
+ } @else {
295
+ @return $gray;
296
+ }
297
+ }
298
+
299
+ @mixin _core-color-variable-assignment($component, $background, $background-alt) {
300
+ @if $component == primary{
301
+ $primary-color: _return-color($background, $background-alt);
302
+ } @else if $component == secondary {
303
+ $secondary-color: _return-color($background, $background-alt);
304
+ } @else if $component == inverse {
305
+ $inverse-color: _return-color($background, $background-alt);
306
+ } @else if $component == default {
307
+ $default-color: _return-color($background, $background-alt);
308
+ } @else if $component == error {
309
+ $error-color: _return-color($background, $background-alt);
310
+ } @else if $component == warning {
311
+ $warning-color: _return-color($background, $background-alt);
312
+ } @else if $component == info {
313
+ $info-color: _return-color($background, $background-alt);
314
+ } @else if $component == success {
315
+ $success-color: _return-color($background, $background-alt);
316
+ }
317
+ }
318
+
319
+ /* public ------------------------------------------------------------------------------------------------------------*/
320
+
321
+ /* component mixin */
322
+ @mixin component($component: null,
323
+ $background: null,
324
+ $background-alt: null,
325
+ $background-hover: null,
326
+ $background-hover-alt: null,
327
+ $background-active: null,
328
+ $background-active-alt: null,
329
+ $font-color: $white,
330
+ $font-color-hover: null,
331
+ $font-color-active: null,
332
+ $border: null,
333
+ $border-hover: null,
334
+ $border-active: null,
335
+ $text-shadow: null,
336
+ $text-shadow-hover: null,
337
+ $text-shadow-active: null,
338
+ $box-shadow: null,
339
+ $box-shadow-hover: null,
340
+ $box-shadow-active: null,
341
+ $icon-color: null,
342
+ $icon-text-shadow: null,
343
+ $background-disabled: null,
344
+ $font-color-disabled: null,
345
+ $placeholder-color:null
346
+ ) {
347
+
348
+ /* assign core components a variable {component}-color that can be used in your sass. unfortunately, no variable interpolation in sass */
349
+ @if $component == primary or $component == secondary or $component == inverse or $component == default or $component == error
350
+ or $component == info or $component == warning or $component == success {
351
+ @include _core-color-variable-assignment($component, $background, $background-alt);
352
+ }
353
+
354
+ /* background --------------------------------------------------------------------------------------------------*/
355
+
356
+ /* background for component default state */
357
+ %#{$component}-background {
358
+
359
+ @include _background($background, $background-alt);
360
+ }
361
+
362
+ /*
363
+ background for component hover state
364
+ if no values are passed, we set hover background to a darken factor of default state background
365
+ if hover values are passed, set hover background accordingly
366
+ */
367
+ %#{$component}-background-hover {
368
+
369
+ @if $background-hover == null {
370
+ @include _background-hover($background, $background-alt);
371
+ } @else {
372
+ @include _background($background-hover, $background-hover-alt);
373
+ }
374
+ }
375
+
376
+ /* background for component active state
377
+ if no values are passed, we extend hover
378
+ if hover values are passed, set hover background accordingly
379
+ */
380
+ %#{$component}-background-active {
381
+
382
+ @if $background-active == null {
383
+ @extend %#{$component}-background-hover !optional;
384
+ } @else {
385
+ @include _background($background-active, $background-active-alt);
386
+ }
387
+ }
388
+
389
+ /* font --------------------------------------------------------------------------------------------------*/
390
+
391
+ /* font/text for component default state */
392
+ %#{$component}-font {
393
+ @include _font-set($font-color, $text-shadow);
394
+ }
395
+
396
+ /* font/text for component hover state */
397
+ %#{$component}-font-hover {
398
+
399
+ @if $font-color-hover !=null and $text-shadow-hover != null{
400
+ @include _font-set-hover($font-color-hover, $text-shadow-hover);
401
+ } @else {
402
+ @include _font-set($font-color, $text-shadow);
403
+ //@extend %#{$component}-font !optional;
404
+ @include _font-set-hover($font-color-hover, $text-shadow-hover);
405
+ }
406
+ }
407
+
408
+ /* font/text for component active state */
409
+ %#{$component}-font-active {
410
+ @if $font-color-active !=null and $text-shadow-active != null{
411
+ @include _font-set-hover($font-color-active, $text-shadow-active);
412
+ } @else {
413
+ @extend %#{$component}-font-hover !optional;
414
+ @include _font-set-hover($font-color-active, $text-shadow-active);
415
+ }
416
+ }
417
+
418
+ /* border --------------------------------------------------------------------------------------------------*/
419
+
420
+ /* border for component default state */
421
+ %#{$component}-border {
422
+ @include _border($border);
423
+ }
424
+
425
+ /* border for component hover state */
426
+ %#{$component}-border-hover {
427
+ @if $border-hover != null {
428
+ @include _border($border-hover);
429
+ } @else {
430
+ @include _border-hover($border);
431
+ }
432
+
433
+ }
434
+
435
+ /* border for component active state */
436
+ %#{$component}-border-active {
437
+ @if $border-active == null {
438
+ @extend %#{$component}-border-hover !optional;
439
+ } @else {
440
+ @include _border($border-active);
441
+ }
442
+ }
443
+
444
+ /* box shadow --------------------------------------------------------------------------------------------------*/
445
+
446
+ /* box-shadow for component default state */
447
+ %#{$component}-box-shadow {
448
+ @include _box-shadow($box-shadow);
449
+ }
450
+
451
+ /* box-shadow for component hover state */
452
+ %#{$component}-box-shadow-hover {
453
+ @if $box-shadow-hover == null {
454
+ @extend %#{$component}-box-shadow !optional;
455
+ } @else {
456
+ @include _box-shadow($box-shadow-hover);
457
+ }
458
+
459
+ }
460
+
461
+ /* box-shadow for component active state */
462
+ %#{$component}-box-shadow-active {
463
+ @if $box-shadow-active == null {
464
+ @include _box-shadow-active();
465
+ } @else {
466
+ @include _box-shadow($box-shadow-active);
467
+ }
468
+ }
469
+
470
+ /* icon --------------------------------------------------------------------------------------------------*/
471
+ /* component icon */
472
+ %#{$component}-icon {
473
+ @if $icon-color == null and $icon-text-shadow == null{
474
+ @extend %#{$component}-font !optional;
475
+ } @else {
476
+ @extend %#{$component}-font !optional;
477
+ @include _font-set-hover($icon-color, $icon-text-shadow);
478
+ }
479
+ }
480
+
481
+ /* placeholder --------------------------------------------------------------------------------------------------*/
482
+ /* component placeholder */
483
+ %#{$component}-placeholder {
484
+ $_placeholder-color:$font-color;
485
+ @if $placeholder-color !=null{
486
+ $_placeholder-color:$placeholder-color;
487
+ }
488
+ @include _placeholder-set($_placeholder-color);
489
+ }
490
+
491
+ /* disabled --------------------------------------------------------------------------------------------------*/
492
+ /* disabled state */
493
+ %#{$component}-disabled {
494
+ @include _disabled-component($background-disabled, $font-color-disabled,$background);
495
+
496
+ }
497
+
498
+ }
499
+
500
+ /* touch component mixin
501
+ components rely on extending placeholders.
502
+ you cannot create components within a media query because of the @extending an outer selector from within @media limitation
503
+ The requirement of @extending selectors within the same directive thus necessitates a touch-component mixin that creates and extends
504
+ inside the touch breakpoint media directive
505
+ */
506
+ @mixin touch-component($component: null,
507
+ $background: null,
508
+ $background-alt: null,
509
+ $background-hover: null,
510
+ $background-hover-alt: null,
511
+ $background-active: null,
512
+ $background-active-alt: null,
513
+ $font-color: $white,
514
+ $font-color-hover: null,
515
+ $font-color-active: null,
516
+ $border: null,
517
+ $border-hover: null,
518
+ $border-active: null,
519
+ $text-shadow: null,
520
+ $text-shadow-hover: null,
521
+ $text-shadow-active: null,
522
+ $box-shadow: null,
523
+ $box-shadow-hover: null,
524
+ $box-shadow-active: null,
525
+ $icon-color: null,
526
+ $icon-text-shadow: null,
527
+ $background-disabled: null,
528
+ $font-color-disabled: null,
529
+ $placeholder-color:null) {
530
+
531
+ // calling component but inside the touch breakpoint
532
+ @media #{$breakpoint-touch}{
533
+ @include component($component,
534
+ $background,
535
+ $background-alt,
536
+ $background-hover,
537
+ $background-hover-alt,
538
+ $background-active,
539
+ $background-active-alt,
540
+ $font-color,
541
+ $font-color-hover,
542
+ $font-color-active,
543
+ $border,
544
+ $border-hover,
545
+ $border-active,
546
+ $text-shadow,
547
+ $text-shadow-hover,
548
+ $text-shadow-active,
549
+ $box-shadow,
550
+ $box-shadow-hover,
551
+ $box-shadow-active,
552
+ $icon-color,
553
+ $icon-text-shadow,
554
+ $background-disabled,
555
+ $font-color-disabled,
556
+ $placeholder-color
557
+ );
558
+
559
+ }
560
+
561
+ }
562
+
563
+ @mixin desktop-component($component: null,
564
+ $background: null,
565
+ $background-alt: null,
566
+ $background-hover: null,
567
+ $background-hover-alt: null,
568
+ $background-active: null,
569
+ $background-active-alt: null,
570
+ $font-color: $white,
571
+ $font-color-hover: null,
572
+ $font-color-active: null,
573
+ $border: null,
574
+ $border-hover: null,
575
+ $border-active: null,
576
+ $text-shadow: null,
577
+ $text-shadow-hover: null,
578
+ $text-shadow-active: null,
579
+ $box-shadow: null,
580
+ $box-shadow-hover: null,
581
+ $box-shadow-active: null,
582
+ $icon-color: null,
583
+ $icon-text-shadow: null,
584
+ $background-disabled: null,
585
+ $font-color-disabled: null,
586
+ $placeholder-color:null) {
587
+
588
+ // calling component but inside the desktop breakpoint
589
+ @media #{$breakpoint-desktop}{
590
+ @include component($component,
591
+ $background,
592
+ $background-alt,
593
+ $background-hover,
594
+ $background-hover-alt,
595
+ $background-active,
596
+ $background-active-alt,
597
+ $font-color,
598
+ $font-color-hover,
599
+ $font-color-active,
600
+ $border,
601
+ $border-hover,
602
+ $border-active,
603
+ $text-shadow,
604
+ $text-shadow-hover,
605
+ $text-shadow-active,
606
+ $box-shadow,
607
+ $box-shadow-hover,
608
+ $box-shadow-active,
609
+ $icon-color,
610
+ $icon-text-shadow,
611
+ $background-disabled,
612
+ $font-color-disabled,
613
+ $placeholder-color
614
+ );
615
+ }
616
+
617
+ }
618
+
619
+ /*
620
+ extend component mixin
621
+ create a new component that inherits from existing component
622
+ $extend-component=existing component, $component=new component
623
+ */
624
+ @mixin extend-component($extend-component:null, $component:null,
625
+ $background:null,
626
+ $background-alt:null,
627
+ $background-hover:null,
628
+ $background-hover-alt:null,
629
+ $background-active:null,
630
+ $background-active-alt:null,
631
+ $font-color:null,
632
+ $font-color-hover:null,
633
+ $font-color-active:null,
634
+ $border:null,
635
+ $border-hover:null,
636
+ $border-active:null,
637
+ $text-shadow:null,
638
+ $text-shadow-hover:null,
639
+ $text-shadow-active:null,
640
+ $box-shadow:null,
641
+ $box-shadow-hover:null,
642
+ $box-shadow-active:null,
643
+ $icon-color:null,
644
+ $icon-text-shadow:null,
645
+ $background-disabled:null,
646
+ $font-color-disabled:null,
647
+ $placeholder-color:null
648
+ ) {
649
+
650
+ //background
651
+ %#{$component}-background {
652
+
653
+ @if $background != null {
654
+ @include _background($background,$background-alt);
655
+ } @else {
656
+ @extend %#{$extend-component}-background !optional;
657
+ }
658
+ }
659
+ %#{$component}-background-hover {
660
+ @if $background-hover == null{
661
+ @if $background != null{
662
+ @include _background-hover($background,$background-alt);
663
+ }@else{
664
+ @extend %#{$extend-component}-background-hover !optional;
665
+ }
666
+ }@else{
667
+ @include _background($background-hover,$background-hover-alt);
668
+ }
669
+
670
+ }
671
+ %#{$component}-background-active {
672
+ @if $background-active != null {
673
+ @include _background($background-active,$background-active-alt);
674
+ } @else {
675
+ @extend %#{$extend-component}-background-active !optional;
676
+ }
677
+
678
+ }
679
+
680
+ //font
681
+ %#{$component}-font {
682
+ @if type-of($font-color)== color and type-of($text-shadow)==list{
683
+ @include _font-set($font-color, $text-shadow);
684
+ } @else {
685
+ @extend %#{$extend-component}-font !optional;
686
+ @include _font-set-ext($font-color, $text-shadow);
687
+ }
688
+
689
+ }
690
+ %#{$component}-font-hover {
691
+ @if type-of($font-color-hover)== color and type-of($text-shadow-hover)==list{
692
+ @include _font-set-hover($font-color-hover, $text-shadow-hover);
693
+ } @else {
694
+ @extend %#{$extend-component}-font-hover !optional;
695
+ @include _font-set-hover($font-color-hover, $text-shadow-hover);
696
+ }
697
+
698
+ }
699
+ %#{$component}-font-active {
700
+ @if type-of($font-color-active)== color and type-of($text-shadow-active)==list{
701
+ @include _font-set-hover($font-color-active, $text-shadow-active);
702
+ } @else {
703
+ @extend %#{$extend-component}-font-active !optional;
704
+ @include _font-set-hover($font-color-active, $text-shadow-active);
705
+ }
706
+ }
707
+
708
+ //border
709
+
710
+ %#{$component}-border {
711
+ @if $border != null{
712
+ @include _border($border);
713
+ } @else {
714
+ @extend %#{$extend-component}-border !optional;
715
+
716
+ }
717
+
718
+ }
719
+ %#{$component}-border-hover {
720
+ @if $border-hover != null{
721
+ @include _border($border-hover);
722
+ } @else {
723
+ @if type-of($border)== color or type-of($border) == list{
724
+ @include _border-hover($border);
725
+ } @else {
726
+ @extend %#{$extend-component}-border-hover !optional;
727
+ }
728
+ }
729
+ }
730
+
731
+ %#{$component}-border-active {
732
+ @if $border-active != null{
733
+ @include _border($border-active);
734
+ } @else {
735
+ @extend %#{$extend-component}-border-active !optional;
736
+ }
737
+ }
738
+
739
+
740
+ //box-shadow
741
+ %#{$component}-box-shadow {
742
+ @if $box-shadow != null{
743
+ @include _box-shadow($box-shadow);
744
+ }@else{
745
+ @extend %#{$extend-component}-box-shadow !optional;
746
+ }
747
+
748
+ }
749
+
750
+ %#{$component}-box-shadow-hover {
751
+ @if $box-shadow-hover != null{
752
+ @include _box-shadow($box-shadow-hover);
753
+ }@else{
754
+
755
+ @extend %#{$extend-component}-box-shadow-hover !optional;
756
+ }
757
+
758
+ }
759
+
760
+ %#{$component}-box-shadow-active {
761
+ @if $box-shadow-active != null{
762
+ @include _box-shadow($box-shadow-active);
763
+ }@else{
764
+ @extend %#{$extend-component}-box-shadow-active !optional;
765
+ }
766
+ }
767
+
768
+ //icon
769
+ %#{$component}-icon {
770
+ @extend %#{$extend-component}-icon !optional;
771
+ @if $icon-color != null or $icon-text-shadow != null {
772
+ @include _font-set-ext($icon-color, $icon-text-shadow);
773
+ }
774
+ }
775
+
776
+ //placeholder
777
+ %#{$component}-placeholder {
778
+ @extend %#{$extend-component}-placeholder !optional;
779
+ @if $placeholder-color != null {
780
+ @include _placeholder-set($placeholder-color);
781
+ }
782
+
783
+ }
784
+
785
+ //disabled
786
+ %#{$component}-disabled {
787
+
788
+ @extend %#{$extend-component}-disabled !optional;
789
+ }
790
+ }
791
+
792
+ /* extend touch component mixin */
793
+ @mixin extend-touch-component($extend-component:null, $component:null,
794
+ $background:null,
795
+ $background-alt:null,
796
+ $background-hover:null,
797
+ $background-hover-alt:null,
798
+ $background-active:null,
799
+ $background-active-alt:null,
800
+ $font-color:null,
801
+ $font-color-hover:null,
802
+ $font-color-active:null,
803
+ $border:null,
804
+ $border-hover:null,
805
+ $border-active:null,
806
+ $text-shadow:null,
807
+ $text-shadow-hover:null,
808
+ $text-shadow-active:null,
809
+ $box-shadow:null,
810
+ $box-shadow-hover:null,
811
+ $box-shadow-active:null,
812
+ $icon-color:null,
813
+ $icon-text-shadow:null,
814
+ $background-disabled:null,
815
+ $font-color-disabled:null,
816
+ $placeholder-color:null
817
+ ) {
818
+ @media #{$breakpoint-touch}{
819
+ @include extend-component($extend-component, $component,
820
+ $background,
821
+ $background-alt,
822
+ $background-hover,
823
+ $background-hover-alt,
824
+ $background-active,
825
+ $background-active-alt,
826
+ $font-color,
827
+ $font-color-hover,
828
+ $font-color-active,
829
+ $border,
830
+ $border-hover,
831
+ $border-active,
832
+ $text-shadow,
833
+ $text-shadow-hover,
834
+ $text-shadow-active,
835
+ $box-shadow,
836
+ $box-shadow-hover,
837
+ $box-shadow-active,
838
+ $icon-color,
839
+ $icon-text-shadow,
840
+ $background-disabled,
841
+ $font-color-disabled,
842
+ $placeholder-color
843
+ );
844
+ }
845
+ }
846
+
847
+ /* extend desktop component mixin */
848
+ @mixin extend-desktop-component($extend-component:null, $component:null,
849
+ $background:null,
850
+ $background-alt:null,
851
+ $background-hover:null,
852
+ $background-hover-alt:null,
853
+ $background-active:null,
854
+ $background-active-alt:null,
855
+ $font-color:null,
856
+ $font-color-hover:null,
857
+ $font-color-active:null,
858
+ $border:null,
859
+ $border-hover:null,
860
+ $border-active:null,
861
+ $text-shadow:null,
862
+ $text-shadow-hover:null,
863
+ $text-shadow-active:null,
864
+ $box-shadow:null,
865
+ $box-shadow-hover:null,
866
+ $box-shadow-active:null,
867
+ $icon-color:null,
868
+ $icon-text-shadow:null,
869
+ $background-disabled:null,
870
+ $font-color-disabled:null,
871
+ $placeholder-color:null
872
+ ) {
873
+ @media #{$breakpoint-desktop}{
874
+ @include extend-component($extend-component, $component,
875
+ $background,
876
+ $background-alt,
877
+ $background-hover,
878
+ $background-hover-alt,
879
+ $background-active,
880
+ $background-active-alt,
881
+ $font-color,
882
+ $font-color-hover,
883
+ $font-color-active,
884
+ $border,
885
+ $border-hover,
886
+ $border-active,
887
+ $text-shadow,
888
+ $text-shadow-hover,
889
+ $text-shadow-active,
890
+ $box-shadow,
891
+ $box-shadow-hover,
892
+ $box-shadow-active,
893
+ $icon-color,
894
+ $icon-text-shadow,
895
+ $background-disabled,
896
+ $font-color-disabled,
897
+ $placeholder-color
898
+ );
899
+ }
900
+ }
901
+
902
+ /**********************************************************************************************************************
903
+ we call the below mixins from ui-components(or widgets) to bind a component reference to the widget css
904
+ */
905
+
906
+ /* invoke component mixin */
907
+ @mixin invoke-component($component) {
908
+ @extend %#{$component}-background !optional;
909
+ @extend %#{$component}-border !optional;
910
+ @extend %#{$component}-box-shadow !optional;
911
+ @extend %#{$component}-font !optional;
912
+ &:hover, &:focus {
913
+ @extend %#{$component}-background-hover !optional;
914
+ @extend %#{$component}-border-hover !optional;
915
+ @extend %#{$component}-box-shadow-hover !optional;
916
+ @extend %#{$component}-font-hover !optional;
917
+ }
918
+ &:active, &.active {
919
+ @extend %#{$component}-background-active !optional;
920
+ @extend %#{$component}-border-active !optional;
921
+ @extend %#{$component}-box-shadow-active !optional;
922
+ @extend %#{$component}-font-active !optional;
923
+ }
924
+ &.disabled, &[disabled] {
925
+ @extend %#{$component}-disabled !optional;
926
+ }
927
+ }
928
+
929
+ /* invoke component default state mixin */
930
+ @mixin invoke-component-default-state($component) {
931
+ @extend %#{$component}-background !optional;
932
+ @extend %#{$component}-border !optional;
933
+ @extend %#{$component}-box-shadow !optional;
934
+ @extend %#{$component}-font !optional;
935
+
936
+ &.disabled, &[disabled] {
937
+ @extend %#{$component}-disabled !optional;
938
+ }
939
+ }