facades 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. data/README.md +52 -0
  2. data/app/helpers/facades_helper.rb +0 -26
  3. data/app/views/facades/_pagination.html.erb +20 -0
  4. data/facades.gemspec +2 -3
  5. data/lib/facades/builders/sprite.rb +50 -0
  6. data/lib/facades/builders/table.rb +76 -0
  7. data/lib/facades/helpers/builders.rb +24 -0
  8. data/lib/facades/helpers/elements.rb +2 -2
  9. data/lib/facades/helpers/layout.rb +25 -8
  10. data/lib/facades/helpers/mobile.rb +16 -0
  11. data/lib/facades/helpers/navigation.rb +13 -10
  12. data/lib/facades/helpers/pagination.rb +83 -0
  13. data/lib/facades/helpers/utility.rb +31 -0
  14. data/lib/facades/helpers.rb +13 -5
  15. data/lib/facades/sass_ext/color.rb +30 -0
  16. data/lib/facades/sass_ext/form_elements.rb +8 -2
  17. data/lib/facades/sass_ext.rb +3 -4
  18. data/lib/facades/stylesheets/facades/_common.scss +7 -0
  19. data/lib/facades/stylesheets/facades/_layout.scss +5 -1
  20. data/lib/facades/stylesheets/facades/_normalize.scss +5 -0
  21. data/lib/facades/stylesheets/facades/_setup.scss +67 -0
  22. data/lib/facades/stylesheets/facades/_typography.scss +2 -0
  23. data/lib/facades/stylesheets/facades/_ui.scss +3 -1
  24. data/lib/facades/stylesheets/facades/_utilities.scss +29 -15
  25. data/lib/facades/stylesheets/facades/layout/_debug.scss +18 -0
  26. data/lib/facades/stylesheets/facades/layout/_dropdown-list.scss +7 -0
  27. data/lib/facades/stylesheets/facades/layout/_forms.scss +31 -116
  28. data/lib/facades/stylesheets/facades/layout/_grid.scss +4 -20
  29. data/lib/facades/stylesheets/facades/legacy/_forms.scss +130 -0
  30. data/lib/facades/stylesheets/facades/{_reset.scss → legacy/_reset.scss} +40 -8
  31. data/lib/facades/stylesheets/facades/setup/_forms.scss +212 -0
  32. data/lib/facades/stylesheets/facades/setup/_ie.scss +12 -0
  33. data/lib/facades/stylesheets/facades/setup/_reset.scss +198 -0
  34. data/lib/facades/stylesheets/facades/typography/_baseline.scss +89 -0
  35. data/lib/facades/stylesheets/facades/typography/_lists.scss +34 -0
  36. data/lib/facades/stylesheets/facades/typography/_rhythm.scss +3 -1
  37. data/lib/facades/stylesheets/facades/typography/_shadow.scss +9 -0
  38. data/lib/facades/stylesheets/facades/ui/_buttons.scss +35 -0
  39. data/lib/facades/stylesheets/facades/ui/_flash-messages.scss +58 -0
  40. data/lib/facades/stylesheets/facades/ui/_tool-tip.scss +2 -1
  41. data/lib/facades/stylesheets/facades/utilities/_clearfix.scss +16 -0
  42. data/lib/facades/stylesheets/facades/utilities/_color.scss +7 -0
  43. data/lib/facades/stylesheets/facades/utilities/_cursors.scss +3 -0
  44. data/lib/facades/{engine.rb → support/rails.rb} +6 -0
  45. data/lib/facades/support/serve.rb +17 -0
  46. data/lib/facades/support/tipsy.rb +17 -0
  47. data/lib/facades/version.rb +1 -1
  48. data/lib/facades.rb +25 -4
  49. data/spec/facades/helpers/navigation_spec.rb +103 -0
  50. data/spec/spec_helper.rb +12 -0
  51. metadata +39 -25
  52. data/lib/facades/stylesheets/facades/utilities/_site-map.scss +0 -18
@@ -0,0 +1,212 @@
1
+ .input-tiny{ width: 50px; }
2
+ .input-small{ width: 100px; }
3
+ .input-medium{ width: 150px; }
4
+ .input-large{ width: 200px; }
5
+ .input-xlarge{ width: 250px; }
6
+ .input-xxlarge{ width: 300px; }
7
+ .input-full{ width: 100%; }
8
+
9
+ .input_full_wrap, .input-full-wrap {
10
+ display: block;
11
+ padding-right: 8px;
12
+ }
13
+
14
+ form{
15
+ margin-bottom:1em;
16
+ }
17
+
18
+ fieldset{
19
+ margin-bottom:1em;
20
+ }
21
+
22
+ select{
23
+ padding: 0;
24
+ }
25
+
26
+ label, legend {
27
+ abbr[title]{
28
+ outline:none;
29
+ border:none;
30
+ color:red;
31
+ }
32
+
33
+ display: block;
34
+ font-weight: bold;
35
+ font-size: $font-size;
36
+ }
37
+
38
+
39
+ // Make UI consistant across all browsers.
40
+ //----------------------------------------------------------------------------------------------------
41
+
42
+ ::-moz-focus-inner{ border: 0; padding: 0; }
43
+ input[type="search"]::-webkit-search-decoration { display: none; }
44
+
45
+ input,button,select,textarea {
46
+ margin: 0;
47
+ vertical-align: middle;
48
+ }
49
+
50
+ input[type="radio"], input[type="checkbox"] {
51
+ position: relative;
52
+ vertical-align: top;
53
+ top: 3px;
54
+ top: 0 \0; // IE8, IE9, IE10
55
+ *top: -3px; // IE7
56
+ }
57
+
58
+ // iPad
59
+ @media (-webkit-min-device-pixel-ratio: 1) and (max-device-width: 1024px) {
60
+ input[type="radio"], input[type="checkbox"] {
61
+ vertical-align: baseline;
62
+ top: 2px;
63
+ }
64
+ }
65
+
66
+ // iPhone 3
67
+ @media (-webkit-min-device-pixel-ratio: 1) and (max-device-width: 480px) {
68
+ input[type="radio"], input[type="checkbox"]{
69
+ vertical-align: baseline;
70
+ top: 0;
71
+ }
72
+ }
73
+
74
+ // iPhone 4
75
+ @media (-webkit-min-device-pixel-ratio: 2) and (max-device-width: 480px) {
76
+ input[type="radio"], input[type="checkbox"]{
77
+ vertical-align: baseline;
78
+ top: 0;
79
+ }
80
+ }
81
+
82
+ button, input[type="reset"], input[type="submit"], input[type="button"] {
83
+ -webkit-appearance: none;
84
+ background: #dddddd;
85
+ -moz-background-clip: border-box;
86
+ -webkit-background-clip: border-box;
87
+ background-clip: border-box;
88
+ -webkit-border-radius: $button-border-radius;
89
+ -moz-border-radius: $button-border-radius;
90
+ border-radius: $button-border-radius;
91
+ border: 1px solid;
92
+ border-color: $button-border-color;
93
+ cursor: pointer;
94
+ color: $button-color;
95
+ font: bold 12px / 1.3 "Helvetica Neue", Arial, "Liberation Sans", FreeSans, sans-serif;
96
+ outline: 0;
97
+ overflow: visible;
98
+ padding:$button-padding;
99
+ width: auto;
100
+ user-select:none;
101
+ // IE7
102
+ *padding-top: 2px;
103
+ *padding-bottom: 0px;
104
+ }
105
+
106
+ button{ // IE7
107
+ *padding-top: 1px;
108
+ *padding-bottom: 1px;
109
+ }
110
+
111
+ textarea, select, input[type="date"], input[type="datetime"],
112
+ input[type="datetime-local"], input[type="email"], input[type="month"],
113
+ input[type="number"], input[type="password"], input[type="search"],
114
+ input[type="tel"], input[type="text"], input[type="time"], input[type="url"], input[type="week"] {
115
+ -webkit-appearance: none;
116
+ -moz-border-radius: 0;
117
+ -webkit-border-radius: 0;
118
+ border-radius: 0;
119
+ -webkit-box-sizing: border-box;
120
+ -moz-box-sizing: border-box;
121
+ box-sizing: border-box;
122
+ -moz-background-clip: padding;
123
+ -webkit-background-clip: padding;
124
+ background-clip: padding-box;
125
+ background-color: $input-background-color;
126
+ border: 1px solid;
127
+ -webkit-border-radius: $input-border-radius;
128
+ -moz-border-radius: $input-border-radius;
129
+ border-radius: $input-border-radius;
130
+ border-color: $input-border-color;
131
+ color: $input-color;
132
+ outline: 0;
133
+ padding: 2px 3px;
134
+ font-size: $font-size;
135
+ font-family: Arial, "Liberation Sans", FreeSans, sans-serif;
136
+ height: 2em;
137
+
138
+ // IE7
139
+ *padding-top: 2px;
140
+ *padding-bottom: 1px;
141
+ *height: auto;
142
+
143
+ &[disabled]{
144
+ color: $disabled-input-color;
145
+ border-color: $disabled-input-border-color;
146
+ background-color: $disabled-input-background-color;
147
+ }
148
+
149
+ &:focus, &:active{
150
+ color:$focus-input-color;
151
+ border-color:$focus-input-border-color;
152
+ background-color:$focus-input-background-color;
153
+ }
154
+ }
155
+
156
+
157
+ \:invalid {
158
+ // Suppress red glow that Firefox
159
+ // adds to form fields by default,
160
+ // even when user is still typing.
161
+ -moz-box-shadow: none;
162
+ -webkit-box-shadow: none;
163
+ box-shadow: none;
164
+ }
165
+
166
+ button, input, select, textarea{
167
+ &:focus, &:active{
168
+ outline:none;
169
+ z-index:1;
170
+ }
171
+ }
172
+
173
+ input[type="file"], input[type="file"], input[type="radio"],
174
+ input[type="radio"], input[type="checkbox"], input[type="checkbox"]{
175
+ outline:none;
176
+ }
177
+
178
+ button, input, select, select option, select optgroup, textarea{
179
+ user-select:none;
180
+ color: $input-color;
181
+ cursor:default;
182
+ }
183
+
184
+ textarea, select[size], select[multiple]{
185
+ height: auto;
186
+ }
187
+
188
+ // Tweaks for Safari + Chrome.
189
+ @media (-webkit-min-device-pixel-ratio: 0) {
190
+ select {
191
+ background-repeat: no-repeat;
192
+ background-position: right center;
193
+ padding-right: 20px;
194
+ }
195
+ select[size], select[multiple]{
196
+ background-image: none;
197
+ padding: 0;
198
+ }
199
+ }
200
+
201
+ textarea {
202
+ min-height: 40px;
203
+ overflow: auto;
204
+ resize: vertical;
205
+ width: 100%;
206
+ }
207
+
208
+ optgroup {
209
+ color: black;
210
+ font-style: normal;
211
+ font-weight: normal;
212
+ }
@@ -0,0 +1,12 @@
1
+ /* =============================================================================
2
+ Resets only necessary in IE stylesheets
3
+ ========================================================================== */
4
+
5
+ audio[controls], canvas, video {
6
+ display: inline-block; *display: inline; *zoom: 1;
7
+ }
8
+
9
+ img { -ms-interpolation-mode: bicubic; }
10
+ legend { border: 0; *margin-left: -7px; padding: 0; }
11
+ button, input, select, textarea { *vertical-align: middle; }
12
+ button, input { *overflow: visible; }
@@ -0,0 +1,198 @@
1
+ article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; }
2
+ audio[controls], canvas, video {
3
+ display: inline-block;
4
+ }
5
+
6
+
7
+ html {
8
+ font-size: 100%;
9
+ overflow-y: scroll;
10
+ -webkit-overflow-scrolling: touch;
11
+ -webkit-tap-highlight-color: rgba(0,0,0,0);
12
+ -webkit-text-size-adjust: 100%;
13
+ -ms-text-size-adjust: 100%;
14
+ }
15
+
16
+ body { margin: 0; font-size: 13px; line-height: 1.231; }
17
+ body, button, input, select, textarea { font-family: sans-serif; color: #222; }
18
+
19
+ /*
20
+ * These selection declarations have to be separate
21
+ * No text-shadow: twitter.com/miketaylr/status/12228805301
22
+ * Also: hot pink!
23
+ */
24
+
25
+ ::-moz-selection { background: $selection-background-color; color: $selection-color; text-shadow: none; }
26
+ ::selection { background: $selection-background-color; color: $selection-color; text-shadow: none; }
27
+
28
+
29
+ /* =============================================================================
30
+ Links
31
+ ========================================================================== */
32
+
33
+ a { color: $link-color; }
34
+ a:visited { color: $link-visited-color; }
35
+ a:focus { outline: thin dotted; }
36
+
37
+ /* Improve readability when focused and hovered in all browsers: people.opera.com/patrickl/experiments/keyboard/test */
38
+ a:hover, a:active { outline: 0; color:$link-hover-color; }
39
+
40
+
41
+ /* =============================================================================
42
+ Typography
43
+ ========================================================================== */
44
+
45
+ abbr[title] { border-bottom: 1px dotted; }
46
+
47
+ b, strong { font-weight: bold; }
48
+
49
+ blockquote { margin: 1em 40px; }
50
+
51
+ dfn { font-style: italic; }
52
+
53
+ hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; }
54
+
55
+ ins { background: #ff9; color: #000; text-decoration: none; }
56
+
57
+ mark { background: #ff0; color: #000; font-style: italic; font-weight: bold; }
58
+
59
+ /* Redeclare monospace font family: en.wikipedia.org/wiki/User:Davidgothberg/Test59 */
60
+ pre, code, kbd, samp { font-family: $fixed-font-family, monospace; _font-family: 'courier new', monospace; font-size: 1em; }
61
+
62
+ /* Improve readability of pre-formatted text in all browsers */
63
+ pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; }
64
+
65
+ q { quotes: none; }
66
+ q:before, q:after { content: ""; content: none; }
67
+
68
+ small { font-size: 85%; }
69
+
70
+ /* Position subscript and superscript content without affecting line-height: gist.github.com/413930 */
71
+ sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
72
+ sup { top: -0.5em; }
73
+ sub { bottom: -0.25em; }
74
+
75
+
76
+ /* =============================================================================
77
+ Lists
78
+ ========================================================================== */
79
+
80
+ ul, ol { margin: 1em 0; padding: 0 0 0 40px; }
81
+ dd { margin: 0 0 0 40px; }
82
+ nav ul, nav ol { list-style: none; margin: 0; padding: 0; }
83
+
84
+
85
+ /* =============================================================================
86
+ Embedded content
87
+ ========================================================================== */
88
+
89
+ /*
90
+ * Improve image quality when scaled in IE7
91
+ * code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/
92
+ */
93
+
94
+ img { border: 0; }
95
+
96
+ /*
97
+ * Correct overflow displayed oddly in IE9
98
+ */
99
+
100
+ svg:not(:root) {
101
+ overflow: hidden;
102
+ }
103
+
104
+
105
+ /* =============================================================================
106
+ Figures
107
+ ========================================================================== */
108
+
109
+ figure { margin: 0; }
110
+
111
+
112
+ /* =============================================================================
113
+ Forms
114
+ ========================================================================== */
115
+
116
+ form { margin: 0; }
117
+ fieldset { border: 0; margin: 0; padding: 0; }
118
+
119
+ /*
120
+ * 1. Correct color not inheriting in IE6/7/8/9
121
+ * 2. Correct alignment displayed oddly in IE6/7
122
+ */
123
+
124
+ legend { border: 0; padding: 0; }
125
+
126
+ /* Indicate that 'label' will shift focus to the associated form element */
127
+ label { cursor: pointer; }
128
+
129
+ /*
130
+ * 1. Correct font-size not inheriting in all browsers
131
+ * 2. Remove margins in FF3/4 S5 Chrome
132
+ * 3. Define consistent vertical alignment display in all browsers
133
+ */
134
+
135
+ button, input, select, textarea { font-size: 100%; margin: 0; vertical-align: baseline; }
136
+
137
+ /*
138
+ * 1. Define line-height as normal to match FF3/4 (set using !important in the UA stylesheet)
139
+ * 2. Correct inner spacing displayed oddly in IE6/7
140
+ */
141
+
142
+ button, input { line-height: normal; }
143
+
144
+ /*
145
+ * 1. Display hand cursor for clickable form elements
146
+ * 2. Allow styling of clickable form elements in iOS
147
+ */
148
+
149
+ button, input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; -webkit-appearance: button; }
150
+
151
+ /*
152
+ * Consistent box sizing and appearance
153
+ */
154
+
155
+ input[type="checkbox"], input[type="radio"] { box-sizing: border-box; }
156
+ input[type="search"]{
157
+ -moz-box-sizing:content-box;
158
+ -webkit-box-sizing:content-box;
159
+ box-sizing: content-box;
160
+ }
161
+
162
+ /*
163
+ * Remove inner padding and border in FF3/4
164
+ * www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/
165
+ */
166
+
167
+ button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; }
168
+
169
+ /* Remove default vertical scrollbar in IE6/7/8/9 */
170
+ textarea { overflow: auto; vertical-align: top; }
171
+
172
+
173
+ /* =============================================================================
174
+ Tables
175
+ ========================================================================== */
176
+
177
+ table { border-collapse: collapse; border-spacing: 0; }
178
+ td { vertical-align: top; }
179
+
180
+ /* =======================================================
181
+ Print styles.
182
+ Inlined to avoid required HTTP connection: h5bp.com/r
183
+ ========================================================================== */
184
+
185
+ @media print {
186
+ * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } /* Black prints faster: h5bp.com/s */
187
+ a, a:visited { text-decoration: underline; }
188
+ a[href]:after { content: " (" attr(href) ")"; }
189
+ abbr[title]:after { content: " (" attr(title) ")"; }
190
+ .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } /* Don't show links for images, or javascript/internal links */
191
+ pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
192
+ thead { display: table-header-group; } /* h5bp.com/t */
193
+ tr, img { page-break-inside: avoid; }
194
+ img { max-width: 100% !important; }
195
+ @page { margin: 0.5cm; }
196
+ p, h2, h3 { orphans: 3; widows: 3; }
197
+ h2, h3 { page-break-after: avoid; }
198
+ }
@@ -0,0 +1,89 @@
1
+ @import 'facades/setup';
2
+
3
+ $em-size: $font-size / 1em;
4
+ $em-unit: 1em;
5
+ $font-scale: 0 2 4 6 8;
6
+
7
+
8
+ @mixin font-size($size, $lines: lines-for-font-size($size)){
9
+ $fsize: if(unit($size) == "em", $size, $size / $font-size);
10
+ font-size: $fsize;
11
+ @include leading($lines, $fsize);
12
+ }
13
+
14
+ @mixin leading($lines:1, $size:1em, $add-margin: false){
15
+ line-height:rhythm($lines, $size);
16
+ @if $add-margin == true {
17
+ @include margin-trailer($lines, $size);
18
+ }
19
+ }
20
+
21
+ @function rhythm($lines, $size: $font-size){
22
+ $r-height: $em-unit * $lines * $line-height / $size;
23
+ $r-height: if( unit($r-height) == "px", $r-height / $em-size, $r-height);
24
+ @return $r-height;
25
+ }
26
+
27
+ @mixin margin-trailer($lines, $size: $font-size){
28
+ margin-bottom:rhythm($lines, $size);
29
+ }
30
+
31
+
32
+ @mixin margin-leader($lines, $size: $font-size){
33
+ margin-top:rhythm($lines, $size);
34
+ }
35
+
36
+ @mixin padding-leader($lines, $size: $font-size){
37
+ padding-top:rhythm($lines, $size);
38
+ }
39
+
40
+ @mixin padding-trailer($lines, $size: $font-size){
41
+ padding-bottom:rhythm($lines, $size);
42
+ }
43
+
44
+
45
+ @function lines-for-font-size($size:$font-size) {
46
+ $rhythm-line-height:if(unit($line-height) == "px", $line-height / $em-size, $line-height);
47
+ $lines: ceil($size / $rhythm-line-height);
48
+ @return $lines;
49
+ }
50
+
51
+ h1, h2, h3, h4, h5, h6, p, ol, ul{
52
+ -webkit-margin-before:0;
53
+ -webkit-margin-after:0;
54
+ }
55
+
56
+ h1{
57
+ @include font-size(2em, 1);
58
+ @include margin-trailer(1, 2em);
59
+ }
60
+
61
+ h2{
62
+ @include font-size(1.75em, 1);
63
+ @include margin-trailer(1, 1.75em);
64
+ }
65
+
66
+ h3{
67
+ @include font-size(1.5em, 1);
68
+ @include margin-trailer(1, 1.5em);
69
+ }
70
+
71
+ h4{
72
+ @include font-size(1.25em, 1);
73
+ @include margin-trailer(1, 1.25em);
74
+ }
75
+
76
+ h5{
77
+ @include font-size(1em, 1);
78
+ @include margin-trailer(1, 1em);
79
+ }
80
+
81
+ h6{
82
+ @include font-size(0.9em, 1);
83
+ @include margin-trailer(1, 0.9em);
84
+ }
85
+
86
+ p, ul, ol{
87
+ @include font-size(1em, 1);
88
+ @include margin-trailer(1, 1em);
89
+ }
@@ -0,0 +1,34 @@
1
+ @import 'facades/utilities';
2
+
3
+ // Creates a horizontal list, generally used for navigation elements.
4
+ @mixin inline-list($padding: false) {
5
+ @include box-reset;
6
+ @include clearfix;
7
+ @include no-list;
8
+ li{ @include inline-block;
9
+ white-space:nowrap;
10
+ @if $padding{
11
+ padding-left:$padding;
12
+ padding-right:$padding;
13
+ }
14
+ }
15
+ }
16
+
17
+ // 'alias' for compass compatability
18
+ @mixin inline-block-list($padding:false){
19
+ @include inline-list($padding);
20
+ }
21
+
22
+ // Remove list bullets for a particular list item
23
+ @mixin no-bullet {
24
+ list-style-image : none;
25
+ list-style-type : none;
26
+ margin-left : 0px;
27
+ }
28
+
29
+ // Convert a list into "not" a list.. removing all bullets and padding.
30
+ @mixin no-list {
31
+ list-style: none;
32
+ padding-left:0;
33
+ li { @include no-bullet; }
34
+ }
@@ -1,6 +1,8 @@
1
1
  @import "compass/typography/vertical_rhythm";
2
2
  @import "compass/utilities/general/clearfix";
3
3
 
4
+ @warn "Use facades/typography/baseline. This module will be depreciated.";
5
+
4
6
  @mixin normal-text { font-family: $font-family; color: $font-color; }
5
7
  @mixin fixed-width-text { font: 1em $fixed-font-family; line-height: 1.5; }
6
8
 
@@ -21,7 +23,7 @@
21
23
  $scale: compact($scale);
22
24
  @for $i from 1 through 6 {
23
25
  $sizing: floor((nth($scale, $i) * $offset) - ($base / $offset));
24
- h#{$i}{ @include adjust-font-size-to($sizing, 1); @include margin-trailer(1, $sizing); }
26
+ #{$i}{ @include adjust-font-size-to($sizing, 1); @include margin-trailer(1, $sizing); }
25
27
  }
26
28
  p{ @include adjust-font-size-to($font-size); @include margin-trailer(1, $font-size); }
27
29
  }
@@ -0,0 +1,9 @@
1
+ @import 'compass/css3';
2
+ @mixin inset-text($offset-color, $lum:false, $down: false){
3
+ $lum: if($lum, $lum, luminance($offset-color));
4
+ $down: if($down, $down, -1px);
5
+
6
+ $c: if($lum == dark, shade($offset-color, 40%), tint($offset-color, 70%));
7
+ $o: if($lum == dark, $down, 1px);
8
+ @include single-text-shadow($c, $o, $o, 0px);
9
+ }
@@ -0,0 +1,35 @@
1
+ @import 'facades/utilities';
2
+ @import 'compass/css3';
3
+
4
+ @mixin button-base($radius: $button-border-radius){
5
+ @include inline-block;
6
+ text-align:center;
7
+ @if $radius not false{
8
+ -webkit-border-radius:$radius;
9
+ -moz-border-radius:$radius;
10
+ border-radius:$radius;
11
+ }
12
+ }
13
+
14
+ @mixin simple-button($bg-color, $text-color:white, $radius: $button-border-radius){
15
+ @include button-base;
16
+ color:$text-color;
17
+ background-color:$bg-color;
18
+ border-top:1px solid lighten($bg-color, 4%);
19
+ border-bottom:1px solid darken($bg-color, 4%);
20
+ &:hover{ background-color:lighten($color, 3%); }
21
+ &:active{ background-color:darken($color, 3%); @include box-shadow(darken($color, 7%) 0px 0px 3px 3px inset); }
22
+ }
23
+
24
+ @mixin gradient-button($start-color, $end-color:darken($start-color, 5%), $text-color:white, $radius: $button-border-radius){
25
+ @include button-base;
26
+ color:$text-color;
27
+ @include background-image(linear-gradient($start-color 10%, $end-color 90%));
28
+ border-top:1px solid lighten($start-color, 4%);
29
+ border-bottom:1px solid darken($end-color, 4%);
30
+
31
+ &:hover{ @include background-image(linear-gradient(lighten($start-color, 3%) 10%, lighten($end-color, 3%) 90%)); }
32
+ &:active{ @include background-image(linear-gradient(darken($start-color, 3%) 10%, lighten($end-color, 3%) 90%));
33
+ @include box-shadow(darken($start-color, 7%) 0px 0px 3px 3px inset);
34
+ }
35
+ }
@@ -0,0 +1,58 @@
1
+ //
2
+ // Mixins for styling flash messages
3
+ //
4
+ // Default error text color, red refault
5
+ $error-color: #bd132a !default;
6
+ // Background color for error/alert messages, red default
7
+ $error-bg-color: #fde0e4 !default;
8
+ // Border color for error/alert messages, red default
9
+ $error-border-color: #E41D38 !default;
10
+ // Default success/notice color, green default
11
+ $success-color:#264409 !default;
12
+ // Background color for success/notice messages, green default
13
+ $success-bg-color:#e6efc2 !default;
14
+ // Background color for success/notice messages, green default
15
+ $success-border-color:#c6d880 !default;
16
+ // Default color for notice/warn messages, yellow default
17
+ $notice-color:#514721 !default;
18
+ // Background color for notice/warn messages, yellow default
19
+ $notice-bg-color:#fff6bf !default;
20
+ // Border color for notice/warn messages, yellow default
21
+ $notice-border-color:#ffd324 !default;
22
+ // Default color for informational messages, blue default
23
+ $info-color:#205791 !default;
24
+ // Background color for informational messages, blue default
25
+ $info-bg-color:#d5edf8 !default;
26
+ // Border color for informational messages, blue default
27
+ $info-border-color:#92cae4 !default;
28
+ // Class used for success messages
29
+ $flash-success-class: 'success' !default;
30
+ // Class used for notice messages
31
+ $flash-notice-class: 'notice' !default;
32
+ // Class used for error flash messages
33
+ $flash-error-class: 'error' !default;
34
+
35
+ @mixin flash-message{
36
+ @include flash-message-base;
37
+ @include flash-message-colors($flash-success-class, $flash-notice-class, $flash-error-class);
38
+ }
39
+
40
+ @mixin flash-message-base{ display:block; position:relative; }
41
+
42
+ @mixin flash-message-colors($success: $flash-success-class, $notice: $flash-notice-class, $error: $flash-error-class){
43
+ &.flash-message-#{unquote($success)}{
44
+ color:$success-color;
45
+ background-color:$success-bg-color;
46
+ border-color:$success-border-color;
47
+ }
48
+ &.flash-message-#{unquote($notice)}{
49
+ color:$notice-color;
50
+ background-color:$notice-bg-color;
51
+ border-color:$notice-border-color;
52
+ }
53
+ &.flash-message-#{unquote($error)}{
54
+ color:$error-color;
55
+ background-color:$error-bg-color;
56
+ border-color:$error-border-color;
57
+ }
58
+ }
@@ -1,4 +1,5 @@
1
- @import "compass/typography/lists/inline-block-list";
1
+ @import 'facades/utilities';
2
+
2
3
  //
3
4
  // Creates a pure CSS tool tip using border-styles
4
5
  //
@@ -0,0 +1,16 @@
1
+ // Cross browser clearfixing
2
+ @mixin clearfix{
3
+ &:before, &:after { content: ""; display: table; }
4
+ &:after { clear: both; }
5
+ zoom: 1;
6
+ }
7
+
8
+ // Legacy clearfixing
9
+ @mixin pie-clearfix {
10
+ &:after {
11
+ content: "";
12
+ display: table;
13
+ clear: both;
14
+ }
15
+ zoom:1;
16
+ }
@@ -0,0 +1,7 @@
1
+ // Misc color utilities
2
+ // --------------------------------------------------------------
3
+
4
+ // Takes a color and returns a white if the color is dark or a black if the color is light.
5
+ @function color-contrast($color, $threshold: 30%){
6
+ @return if(lightness($color) < $threshold, #fff, #000);
7
+ }