facades 0.1.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/.rbenv-gemsets +1 -0
- data/.rvmrc +1 -0
- data/.travis.yml +6 -0
- data/Gemfile +12 -0
- data/Guardfile +19 -0
- data/README.md +115 -101
- data/Rakefile +8 -0
- data/app/assets/javascripts/facades/debug/grid.js +0 -0
- data/app/helpers/facades_helper.rb +1 -0
- data/config.ru +7 -0
- data/facades.gemspec +9 -2
- data/lib/facades/helpers/layout.rb +36 -73
- data/lib/facades/helpers/navigation.rb +182 -110
- data/lib/facades/helpers/{elements.rb → notifications.rb} +9 -36
- data/lib/facades/helpers.rb +6 -17
- data/lib/facades/patterns/tabs.rb +75 -0
- data/lib/facades/patterns.rb +7 -0
- data/lib/facades/{sass_ext → sass_extensions}/color.rb +5 -13
- data/lib/facades/sass_extensions/conversions.rb +27 -0
- data/lib/facades/sass_extensions/functions.rb +84 -0
- data/lib/facades/sass_extensions/icons.rb +66 -0
- data/lib/facades/sass_extensions.rb +21 -0
- data/lib/facades/support/compass/project/MIT-LICENSE.txt +20 -0
- data/lib/facades/support/compass/project/humans.txt +8 -0
- data/lib/facades/support/compass/project/index.html +45 -0
- data/lib/facades/support/compass/project/manifest.rb +18 -0
- data/lib/facades/support/compass/project/robots.txt +4 -0
- data/lib/facades/support/compass.rb +9 -0
- data/lib/facades/support/rails.rb +12 -15
- data/lib/facades/support/simple_form.rb +32 -0
- data/lib/facades/version.rb +1 -1
- data/lib/facades.rb +21 -44
- data/spec/internal/app/helpers/application_helper.rb +3 -0
- data/spec/internal/app/views/navigation/_multi_list.html.erb +11 -0
- data/spec/internal/app/views/navigation/_multi_option_list.html.erb +14 -0
- data/spec/internal/app/views/navigation/_single_list.html.erb +9 -0
- data/spec/internal/config/database.yml +3 -0
- data/spec/internal/config/routes.rb +3 -0
- data/spec/internal/db/schema.rb +3 -0
- data/spec/internal/log/.gitignore +1 -0
- data/spec/internal/public/favicon.ico +0 -0
- data/spec/spec_helper.rb +16 -6
- data/spec/unit/helpers/layout_spec.rb +4 -0
- data/spec/unit/helpers/navigation_spec.rb +384 -0
- data/spec/unit/helpers/notifications_spec.rb +4 -0
- data/spec/unit/patterns/tabs_spec.rb +58 -0
- data/src/icons/facades.yml +105 -0
- data/src/icons/font-awesome.yml +210 -0
- data/src/scss/facades/_buttons.scss +10 -0
- data/src/scss/facades/_config.scss +99 -0
- data/src/scss/facades/_debug.scss +8 -0
- data/src/scss/facades/_forms.scss +228 -0
- data/src/scss/facades/_global.scss +104 -0
- data/src/scss/facades/_icons.scss +61 -0
- data/src/scss/facades/_mixins.scss +115 -0
- data/src/scss/facades/_mobile.scss +3 -0
- data/src/scss/facades/_setup.scss +191 -0
- data/src/scss/facades/_typography.scss +220 -0
- data/src/scss/facades/buttons/_glossy.scss +29 -0
- data/src/scss/facades/buttons/_gradient.scss +36 -0
- data/src/scss/facades/buttons/_shared.scss +33 -0
- data/src/scss/facades/buttons/_simple.scss +28 -0
- data/src/scss/facades/icons/_classes.scss +37 -0
- data/src/scss/facades/icons/_legacy.scss +27 -0
- data/src/scss/facades/layout/_lists.scss +43 -0
- data/src/scss/facades/mixins/_gradients.scss +30 -0
- data/src/scss/facades/mixins/_rhythm.scss +37 -0
- data/src/scss/facades/mobile/_buttons.scss +97 -0
- data/src/scss/facades/mobile/_config.scss +30 -0
- data/src/scss/facades/mobile/_global.scss +81 -0
- data/src/scss/facades/mobile/_mixins.scss +49 -0
- data/src/scss/facades/mobile/_setup.scss +50 -0
- data/src/scss/facades/mobile/patterns/_navbar.scss +21 -0
- data/src/scss/facades/mobile/patterns/_panel.scss +37 -0
- data/src/scss/facades/mobile/patterns/_stage.scss +20 -0
- data/src/scss/facades/mobile/patterns/_toolbar.scss +25 -0
- data/src/scss/facades/mobile/themes/_apple.scss +17 -0
- data/src/scss/facades/patterns/_labels.scss +50 -0
- data/src/scss/facades/patterns/_navbar.scss +4 -0
- data/src/scss/facades/patterns/_notifications.scss +82 -0
- data/src/scss/facades/patterns/_pagination.scss +4 -0
- data/src/scss/facades/patterns/_pills.scss +50 -0
- data/src/scss/facades/patterns/_tabs.scss +83 -0
- data/src/scss/facades/patterns/_twipsy.scss +84 -0
- data/src/scss/facades/typography/_tables.scss +95 -0
- metadata +201 -58
- data/app/views/facades/_pagination.html.erb +0 -20
- data/lib/facades/builders/form/base.rb +0 -212
- data/lib/facades/builders/form/elements.rb +0 -112
- data/lib/facades/builders/form/helper.rb +0 -29
- data/lib/facades/builders/form.rb +0 -22
- data/lib/facades/builders/sprite.rb +0 -50
- data/lib/facades/builders/table.rb +0 -76
- data/lib/facades/debug/html.rb +0 -6
- data/lib/facades/helpers/builders.rb +0 -24
- data/lib/facades/helpers/mobile.rb +0 -57
- data/lib/facades/helpers/pagination.rb +0 -83
- data/lib/facades/helpers/utility.rb +0 -31
- data/lib/facades/sass_ext/form_elements.rb +0 -52
- data/lib/facades/sass_ext/funcs.rb +0 -33
- data/lib/facades/sass_ext.rb +0 -14
- data/lib/facades/stylesheets/facades/_common.scss +0 -7
- data/lib/facades/stylesheets/facades/_css3.scss +0 -93
- data/lib/facades/stylesheets/facades/_layout.scss +0 -5
- data/lib/facades/stylesheets/facades/_normalize.scss +0 -5
- data/lib/facades/stylesheets/facades/_setup.scss +0 -104
- data/lib/facades/stylesheets/facades/_typography.scss +0 -2
- data/lib/facades/stylesheets/facades/_ui.scss +0 -3
- data/lib/facades/stylesheets/facades/_utilities.scss +0 -32
- data/lib/facades/stylesheets/facades/layout/_dropdown-list.scss +0 -7
- data/lib/facades/stylesheets/facades/layout/_forms.scss +0 -53
- data/lib/facades/stylesheets/facades/layout/_grid.scss +0 -49
- data/lib/facades/stylesheets/facades/layout/_responsive_grid.scss +0 -164
- data/lib/facades/stylesheets/facades/setup/_forms.scss +0 -284
- data/lib/facades/stylesheets/facades/setup/_ie.scss +0 -12
- data/lib/facades/stylesheets/facades/setup/_reset.scss +0 -255
- data/lib/facades/stylesheets/facades/typography/_baseline.scss +0 -91
- data/lib/facades/stylesheets/facades/typography/_lists.scss +0 -34
- data/lib/facades/stylesheets/facades/typography/_shadow.scss +0 -8
- data/lib/facades/stylesheets/facades/ui/_buttons.scss +0 -34
- data/lib/facades/stylesheets/facades/ui/_flash-messages.scss +0 -29
- data/lib/facades/stylesheets/facades/ui/_tabbed.scss +0 -5
- data/lib/facades/stylesheets/facades/ui/_tool-tip.scss +0 -44
- data/lib/facades/stylesheets/facades/utilities/_clearfix.scss +0 -20
- data/lib/facades/stylesheets/facades/utilities/_color.scss +0 -7
- data/lib/facades/stylesheets/facades/utilities/_cursors.scss +0 -4
- data/lib/facades/support/serve.rb +0 -17
- data/lib/facades/support/tipsy.rb +0 -17
- data/spec/facades/helpers/elements_spec.rb +0 -86
- data/spec/facades/helpers/layout_helpers_spec.rb +0 -5
- data/spec/facades/helpers/navigation_spec.rb +0 -107
@@ -1,12 +0,0 @@
|
|
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; }
|
@@ -1,255 +0,0 @@
|
|
1
|
-
article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; }
|
2
|
-
html {
|
3
|
-
cursor: default;
|
4
|
-
font-size: 100%;
|
5
|
-
overflow-y: scroll;
|
6
|
-
-webkit-tap-highlight-color: transparent;
|
7
|
-
-ms-text-size-adjust: 100%;
|
8
|
-
-webkit-text-size-adjust: 100%;
|
9
|
-
}
|
10
|
-
|
11
|
-
body, form, input, button, select, textarea{ font-size: 100%; margin: 0; }
|
12
|
-
body { color:$font-color; margin: 0; font: $font-size $font-family; line-height: $line-height; }
|
13
|
-
|
14
|
-
a{ color:$link-color;
|
15
|
-
&:active{ color:$link-active-color; }
|
16
|
-
&:hover{ color:$link-hover-color; }
|
17
|
-
&:visited{ color:$link-visited-color; }
|
18
|
-
&:active, &:hover{ outline:none; }
|
19
|
-
&:focus{ outline:none; }
|
20
|
-
}
|
21
|
-
|
22
|
-
|
23
|
-
/* =============================================================================
|
24
|
-
Selection
|
25
|
-
========================================================================== */
|
26
|
-
|
27
|
-
/*
|
28
|
-
* These selection declarations have to be separate
|
29
|
-
* No text-shadow: twitter.com/miketaylr/status/12228805301
|
30
|
-
*/
|
31
|
-
|
32
|
-
::-moz-selection { background: $selection-background-color; color: $selection-color; text-shadow: none; }
|
33
|
-
::selection { background: $selection-background-color; color: $selection-color; text-shadow: none; }
|
34
|
-
|
35
|
-
|
36
|
-
/* =============================================================================
|
37
|
-
Typography
|
38
|
-
========================================================================== */
|
39
|
-
|
40
|
-
/*
|
41
|
-
* Corrects styling not present in IE6/7/8/9 S5 C10
|
42
|
-
*/
|
43
|
-
|
44
|
-
abbr { _border-bottom: expression(this.title ? '1px dotted' : 'none'); }
|
45
|
-
abbr[title] { border-bottom: 1px dotted; }
|
46
|
-
|
47
|
-
/*
|
48
|
-
* Corrects style set incorrectly as 'bolder' in FF3/4 S4/5 C10
|
49
|
-
*/
|
50
|
-
|
51
|
-
b, strong{ font-weight: bold; }
|
52
|
-
|
53
|
-
/*
|
54
|
-
* Corrects styling not present in S5 C10
|
55
|
-
*/
|
56
|
-
|
57
|
-
dfn{ font-style: italic; }
|
58
|
-
|
59
|
-
/*
|
60
|
-
* Corrects styling not present in IE6/7/8/9
|
61
|
-
*/
|
62
|
-
|
63
|
-
mark{ background: #FF0; color: #000; }
|
64
|
-
|
65
|
-
hr{
|
66
|
-
display: block;
|
67
|
-
height: 1px;
|
68
|
-
border: 0;
|
69
|
-
border-top: $horizontal-rule-size solid $horizontal-rule-color;
|
70
|
-
margin: 1em 0;
|
71
|
-
padding: 0;
|
72
|
-
}
|
73
|
-
|
74
|
-
|
75
|
-
/*
|
76
|
-
* Corrects font family displayed oddly in IE6 S5 C10
|
77
|
-
* en.wikipedia.org/wiki/User:Davidgothberg/Test59
|
78
|
-
*/
|
79
|
-
|
80
|
-
pre, code, kbd, samp{ font-family: $fixed-font-family; _font-family: 'courier new', monospace; font-size: 1em; }
|
81
|
-
|
82
|
-
/*
|
83
|
-
* Improves readability of pre-formatted text in all browsers
|
84
|
-
*/
|
85
|
-
|
86
|
-
pre{ white-space: pre; white-space: pre-wrap; word-wrap: break-word; }
|
87
|
-
|
88
|
-
/*
|
89
|
-
* Addresses CSS quotes not supported in IE6/7
|
90
|
-
*/
|
91
|
-
|
92
|
-
q{ quotes: none; }
|
93
|
-
|
94
|
-
/*
|
95
|
-
* Addresses quote property not supported in S4
|
96
|
-
*/
|
97
|
-
|
98
|
-
q:before, q:after{ content: ''; content: none; }
|
99
|
-
|
100
|
-
/*
|
101
|
-
* Improves appearance in all browsers
|
102
|
-
*/
|
103
|
-
|
104
|
-
small, sub, sup{ font-size: 75%; }
|
105
|
-
|
106
|
-
/*
|
107
|
-
* Improves appearance in all browsers
|
108
|
-
* gist.github.com/413930
|
109
|
-
*/
|
110
|
-
|
111
|
-
sub,sup { line-height: 0; position: relative; vertical-align: baseline; }
|
112
|
-
sup{ top: -0.5em; }
|
113
|
-
sub{ bottom: -0.25em; }
|
114
|
-
|
115
|
-
small { font-size: 85%; }
|
116
|
-
|
117
|
-
|
118
|
-
/* =============================================================================
|
119
|
-
Lists
|
120
|
-
========================================================================== */
|
121
|
-
|
122
|
-
ul, ol { margin: 1em 0; padding: 0 0 0 40px; }
|
123
|
-
dd { margin: 0 0 0 40px; }
|
124
|
-
nav ul, nav ol { list-style: none; margin: 0; padding: 0; }
|
125
|
-
|
126
|
-
|
127
|
-
/* =============================================================================
|
128
|
-
Embedded content
|
129
|
-
========================================================================== */
|
130
|
-
|
131
|
-
/*
|
132
|
-
* Corrects display not defined in IE6/7/8/9 & FF3
|
133
|
-
*/
|
134
|
-
|
135
|
-
|
136
|
-
audio { display: none; _display: expression(this.controls ? 'inline' : 'none'); *zoom: 1; }
|
137
|
-
audio[controls] { display: inline-block; }
|
138
|
-
|
139
|
-
/*
|
140
|
-
* 1. Improves readability when inside 'a' in all browsers
|
141
|
-
* 2. Improves visual appearance when scaled in IE7
|
142
|
-
* code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/
|
143
|
-
*/
|
144
|
-
|
145
|
-
img {
|
146
|
-
border: 0; /* 1 */
|
147
|
-
}
|
148
|
-
|
149
|
-
/*
|
150
|
-
* Corrects overflow displayed oddly in IE9
|
151
|
-
*/
|
152
|
-
|
153
|
-
svg:not(:root) {
|
154
|
-
overflow: hidden;
|
155
|
-
}
|
156
|
-
|
157
|
-
/* =============================================================================
|
158
|
-
Tables
|
159
|
-
========================================================================== */
|
160
|
-
|
161
|
-
/*
|
162
|
-
* Improves visual appearance in all browsers
|
163
|
-
*/
|
164
|
-
|
165
|
-
table {
|
166
|
-
border-collapse: collapse;
|
167
|
-
border-spacing: 0;
|
168
|
-
}
|
169
|
-
|
170
|
-
/* =============================================================================
|
171
|
-
Figures
|
172
|
-
========================================================================== */
|
173
|
-
|
174
|
-
figure { margin: 0; }
|
175
|
-
|
176
|
-
|
177
|
-
/* =============================================================================
|
178
|
-
Forms
|
179
|
-
========================================================================== */
|
180
|
-
|
181
|
-
form { margin: 0; }
|
182
|
-
fieldset { border: 0; margin: 0; padding: 0; }
|
183
|
-
|
184
|
-
/*
|
185
|
-
* 1. Correct color not inheriting in IE6/7/8/9
|
186
|
-
* 2. Correct alignment displayed oddly in IE6/7
|
187
|
-
*/
|
188
|
-
|
189
|
-
legend { border: 0; padding: 0; }
|
190
|
-
|
191
|
-
/* Indicate that 'label' will shift focus to the associated form element */
|
192
|
-
label { cursor: pointer; }
|
193
|
-
|
194
|
-
/*
|
195
|
-
* 1. Correct font-size not inheriting in all browsers
|
196
|
-
* 2. Remove margins in FF3/4 S5 Chrome
|
197
|
-
* 3. Define consistent vertical alignment display in all browsers
|
198
|
-
*/
|
199
|
-
|
200
|
-
button, input, select, textarea { font-size: 100%; margin: 0; vertical-align: baseline; }
|
201
|
-
|
202
|
-
/*
|
203
|
-
* 1. Define line-height as normal to match FF3/4 (set using !important in the UA stylesheet)
|
204
|
-
* 2. Correct inner spacing displayed oddly in IE6/7
|
205
|
-
*/
|
206
|
-
|
207
|
-
button, input { line-height: normal; }
|
208
|
-
|
209
|
-
/*
|
210
|
-
* 1. Display hand cursor for clickable form elements
|
211
|
-
* 2. Allow styling of clickable form elements in iOS
|
212
|
-
*/
|
213
|
-
|
214
|
-
button, input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; -webkit-appearance: button; }
|
215
|
-
|
216
|
-
/*
|
217
|
-
* Consistent box sizing and appearance
|
218
|
-
*/
|
219
|
-
|
220
|
-
input[type="checkbox"], input[type="radio"] { box-sizing: border-box; }
|
221
|
-
input[type="search"]{
|
222
|
-
-moz-box-sizing:content-box;
|
223
|
-
-webkit-box-sizing:content-box;
|
224
|
-
box-sizing: content-box;
|
225
|
-
}
|
226
|
-
|
227
|
-
/*
|
228
|
-
* Remove inner padding and border in FF3/4
|
229
|
-
* www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/
|
230
|
-
*/
|
231
|
-
|
232
|
-
button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; }
|
233
|
-
|
234
|
-
/* Remove default vertical scrollbar in IE6/7/8/9 */
|
235
|
-
textarea { overflow: auto; vertical-align: top; }
|
236
|
-
|
237
|
-
/* =======================================================
|
238
|
-
Print styles.
|
239
|
-
Inlined to avoid required HTTP connection: h5bp.com/r
|
240
|
-
========================================================================== */
|
241
|
-
|
242
|
-
@media print {
|
243
|
-
* { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } /* Black prints faster: h5bp.com/s */
|
244
|
-
a, a:visited { text-decoration: underline; }
|
245
|
-
a[href]:after { content: " (" attr(href) ")"; }
|
246
|
-
abbr[title]:after { content: " (" attr(title) ")"; }
|
247
|
-
.ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } /* Don't show links for images, or javascript/internal links */
|
248
|
-
pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
|
249
|
-
thead { display: table-header-group; } /* h5bp.com/t */
|
250
|
-
tr, img { page-break-inside: avoid; }
|
251
|
-
img { max-width: 100% !important; }
|
252
|
-
@page { margin: 0.5cm; }
|
253
|
-
p, h2, h3 { orphans: 3; widows: 3; }
|
254
|
-
h2, h3 { page-break-after: avoid; }
|
255
|
-
}
|
@@ -1,91 +0,0 @@
|
|
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
|
-
body{ font:#{$font-size}/#{rhythm(1)} $default-font-family; }
|
52
|
-
|
53
|
-
h1, h2, h3, h4, h5, h6, p, ol, ul{
|
54
|
-
-webkit-margin-before:0;
|
55
|
-
-webkit-margin-after:0;
|
56
|
-
}
|
57
|
-
|
58
|
-
h1{
|
59
|
-
@include font-size(2em, 1);
|
60
|
-
@include margin-trailer(1, 2em);
|
61
|
-
}
|
62
|
-
|
63
|
-
h2{
|
64
|
-
@include font-size(1.75em, 1);
|
65
|
-
@include margin-trailer(1, 1.75em);
|
66
|
-
}
|
67
|
-
|
68
|
-
h3{
|
69
|
-
@include font-size(1.5em, 1);
|
70
|
-
@include margin-trailer(1, 1.5em);
|
71
|
-
}
|
72
|
-
|
73
|
-
h4{
|
74
|
-
@include font-size(1.25em, 1);
|
75
|
-
@include margin-trailer(1, 1.25em);
|
76
|
-
}
|
77
|
-
|
78
|
-
h5{
|
79
|
-
@include font-size(1em, 1);
|
80
|
-
@include margin-trailer(1, 1em);
|
81
|
-
}
|
82
|
-
|
83
|
-
h6{
|
84
|
-
@include font-size(0.9em, 1);
|
85
|
-
@include margin-trailer(1, 0.9em);
|
86
|
-
}
|
87
|
-
|
88
|
-
p, ul, ol{
|
89
|
-
@include font-size(1em, 1);
|
90
|
-
@include margin-trailer(1, 1em);
|
91
|
-
}
|
@@ -1,34 +0,0 @@
|
|
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,8 +0,0 @@
|
|
1
|
-
@mixin inset-text($offset-color, $lum:false, $down: false){
|
2
|
-
$lum: if($lum, $lum, luminance($offset-color));
|
3
|
-
$down: if($down, $down, -1px);
|
4
|
-
|
5
|
-
$c: if($lum == dark, shade($offset-color, 40%), tint($offset-color, 70%));
|
6
|
-
$o: if($lum == dark, $down, 1px);
|
7
|
-
text-shadow:#{$c}, $o, $o, 0px;
|
8
|
-
}
|
@@ -1,34 +0,0 @@
|
|
1
|
-
@import 'facades/utilities';
|
2
|
-
|
3
|
-
@mixin button-base($radius: $button-border-radius){
|
4
|
-
@include inline-block;
|
5
|
-
text-align:center;
|
6
|
-
@if $radius not false and $radius not none{
|
7
|
-
-webkit-border-radius:$radius;
|
8
|
-
-moz-border-radius:$radius;
|
9
|
-
border-radius:$radius;
|
10
|
-
}
|
11
|
-
}
|
12
|
-
|
13
|
-
@mixin simple-button($bg-color, $text-color:white, $radius: $button-border-radius){
|
14
|
-
@include button-base;
|
15
|
-
color:$text-color;
|
16
|
-
background-color:$bg-color;
|
17
|
-
border-top:1px solid lighten($bg-color, 4%);
|
18
|
-
border-bottom:1px solid darken($bg-color, 4%);
|
19
|
-
&:hover{ background-color:lighten($color, 3%); }
|
20
|
-
&:active{ background-color:darken($color, 3%); @include box-shadow(darken($color, 7%) 0px 0px 3px 3px inset); }
|
21
|
-
}
|
22
|
-
|
23
|
-
@mixin gradient-button($start-color, $end-color:darken($start-color, 5%), $text-color:white, $radius: $button-border-radius){
|
24
|
-
@include button-base;
|
25
|
-
color:$text-color;
|
26
|
-
@include background-image(linear-gradient($start-color 10%, $end-color 90%));
|
27
|
-
border-top:1px solid lighten($start-color, 4%);
|
28
|
-
border-bottom:1px solid darken($end-color, 4%);
|
29
|
-
|
30
|
-
&:hover{ @include background-image(linear-gradient(lighten($start-color, 3%) 10%, lighten($end-color, 3%) 90%)); }
|
31
|
-
&:active{ @include background-image(linear-gradient(darken($start-color, 3%) 10%, lighten($end-color, 3%) 90%));
|
32
|
-
@include box-shadow(darken($start-color, 7%) 0px 0px 3px 3px inset);
|
33
|
-
}
|
34
|
-
}
|
@@ -1,29 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// Mixins for styling flash messages
|
3
|
-
//
|
4
|
-
|
5
|
-
|
6
|
-
@mixin flash-message{
|
7
|
-
@include flash-message-base;
|
8
|
-
@include flash-message-colors($flash-success-class, $flash-notice-class, $flash-error-class);
|
9
|
-
}
|
10
|
-
|
11
|
-
@mixin flash-message-base{ display:block; position:relative; }
|
12
|
-
|
13
|
-
@mixin flash-message-colors($success: $flash-success-class, $notice: $flash-notice-class, $error: $flash-error-class){
|
14
|
-
&.flash-message-#{unquote($success)}{
|
15
|
-
color:$success-color;
|
16
|
-
background-color:$success-bg-color;
|
17
|
-
border-color:$success-border-color;
|
18
|
-
}
|
19
|
-
&.flash-message-#{unquote($notice)}{
|
20
|
-
color:$notice-color;
|
21
|
-
background-color:$notice-bg-color;
|
22
|
-
border-color:$notice-border-color;
|
23
|
-
}
|
24
|
-
&.flash-message-#{unquote($error)}{
|
25
|
-
color:$error-color;
|
26
|
-
background-color:$error-bg-color;
|
27
|
-
border-color:$error-border-color;
|
28
|
-
}
|
29
|
-
}
|
@@ -1,44 +0,0 @@
|
|
1
|
-
@import 'facades/utilities';
|
2
|
-
|
3
|
-
//
|
4
|
-
// Creates a pure CSS tool tip using border-styles
|
5
|
-
//
|
6
|
-
$tool-tip-color:#333 !default;
|
7
|
-
$tool-tip-text-color:#fff !default;
|
8
|
-
|
9
|
-
@mixin tool-tip($color: false, $dir: bl, $size: 7px, $text-color: $tool-tip-text-color){
|
10
|
-
$text-color: if($text-color, $text-color, if(luminance($color) == dark, #fff, #333) );
|
11
|
-
background:$color;
|
12
|
-
color:$text-color;
|
13
|
-
padding:.75em 1em;
|
14
|
-
position:relative;
|
15
|
-
@include inline-block;
|
16
|
-
|
17
|
-
&:after{
|
18
|
-
content:"";
|
19
|
-
display:block;
|
20
|
-
position:absolute;
|
21
|
-
width:0;
|
22
|
-
border-width:$size $size 0;
|
23
|
-
border-style:solid;
|
24
|
-
border-color:$color transparent;
|
25
|
-
border-color:inherit transparent;
|
26
|
-
@if( $dir == bl or $dir == br ){ bottom: -$size; }
|
27
|
-
@if( $dir == tl or $dir == tr ){ top: -$size; }
|
28
|
-
@if( $dir == tl or $dir == bl ){ left:1em; }
|
29
|
-
@if( $dir == tl or $dir == bl ){ right:1em; }
|
30
|
-
@if( $dir == left ){
|
31
|
-
left:-$size;
|
32
|
-
border-width:$size ($size * 1.8) $size 0;
|
33
|
-
}
|
34
|
-
@if( $dir == right ){
|
35
|
-
right:-$size;
|
36
|
-
border-width:$size 0 $size ($size * 1.8);
|
37
|
-
}
|
38
|
-
@if( $dir == right or $dir == left ){
|
39
|
-
top:50%;
|
40
|
-
margin-top:-$size;
|
41
|
-
border-color:transparent $color;
|
42
|
-
}
|
43
|
-
}
|
44
|
-
}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
// Cross browser clearfixing
|
2
|
-
@mixin clearfix{
|
3
|
-
&:before, &:after{
|
4
|
-
content: ""; display: table;
|
5
|
-
}
|
6
|
-
&:after{
|
7
|
-
clear: both;
|
8
|
-
}
|
9
|
-
zoom: 1;
|
10
|
-
}
|
11
|
-
|
12
|
-
// Legacy clearfixing
|
13
|
-
@mixin pie-clearfix {
|
14
|
-
&:after {
|
15
|
-
content: "";
|
16
|
-
display: table;
|
17
|
-
clear: both;
|
18
|
-
}
|
19
|
-
zoom:1;
|
20
|
-
}
|
@@ -1,7 +0,0 @@
|
|
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
|
-
}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
require 'facades/helpers'
|
2
|
-
require File.expand_path("../../../../app/helpers/", __FILE__) << '/facades_helper'
|
3
|
-
|
4
|
-
module Facades
|
5
|
-
module Support
|
6
|
-
# Enable facades helpers and files within serve projects
|
7
|
-
# see get-serve.com for more info.
|
8
|
-
module Serve
|
9
|
-
extend ActiveSupport::Concern
|
10
|
-
|
11
|
-
included do
|
12
|
-
include ::FacadesHelper
|
13
|
-
end
|
14
|
-
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
require 'facades/helpers'
|
2
|
-
require File.expand_path("../../../../app/helpers/", __FILE__) << '/facades_helper'
|
3
|
-
|
4
|
-
module Facades
|
5
|
-
module Support
|
6
|
-
# Enable facades helpers and files within serve projects
|
7
|
-
# see github.com/kurbmedia/tipsy for more info.
|
8
|
-
module Tipsy
|
9
|
-
extend ActiveSupport::Concern
|
10
|
-
|
11
|
-
included do
|
12
|
-
include ::FacadesHelper
|
13
|
-
end
|
14
|
-
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,86 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe Facades::Helpers::Elements, :type => :helper do
|
4
|
-
|
5
|
-
describe '#button_link' do
|
6
|
-
|
7
|
-
subject{ button_link("home", "/", attrs).to_html }
|
8
|
-
let(:attrs){ {} }
|
9
|
-
|
10
|
-
it { should have_selector('a.button') }
|
11
|
-
|
12
|
-
context 'when passing classes' do
|
13
|
-
let(:attrs){ { :class => 'test_class' } }
|
14
|
-
|
15
|
-
it { should have_selector('a.test_class') }
|
16
|
-
end
|
17
|
-
|
18
|
-
context 'when providing an icon' do
|
19
|
-
|
20
|
-
let(:attrs) do
|
21
|
-
{ icon: 'sample.png' }
|
22
|
-
end
|
23
|
-
|
24
|
-
it 'adds an image to the link' do
|
25
|
-
subject.should have_selector('img')
|
26
|
-
end
|
27
|
-
it 'should use the icon attribute as the image' do
|
28
|
-
subject.first('img')[:src].should match "sample.png"
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
end
|
33
|
-
|
34
|
-
describe '#flash_messages' do
|
35
|
-
|
36
|
-
let!(:flash) do
|
37
|
-
{ success: 'test flash message' }
|
38
|
-
end
|
39
|
-
subject{ flash_messages(attrs).to_html }
|
40
|
-
|
41
|
-
let(:attrs){ {} }
|
42
|
-
|
43
|
-
context 'when rendering normally' do
|
44
|
-
|
45
|
-
it 'wraps the content in a div.flash_message' do
|
46
|
-
should have_selector('div.flash_message')
|
47
|
-
end
|
48
|
-
it 'should have a span closer' do
|
49
|
-
subject.first('div').should have_selector('span')
|
50
|
-
end
|
51
|
-
|
52
|
-
it 'adds the flash key as a html class' do
|
53
|
-
should have_selector("div.success")
|
54
|
-
end
|
55
|
-
it 'adds :key_flash_message as a html class' do
|
56
|
-
should have_selector("div.flash_message_success")
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
context 'when passed false to :closer' do
|
61
|
-
|
62
|
-
let(:attrs) do
|
63
|
-
{ closer: false }
|
64
|
-
end
|
65
|
-
it 'should not add a closer span' do
|
66
|
-
subject.first('div').should_not have_selector('span')
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
context 'when span is passed to :wrapper' do
|
71
|
-
|
72
|
-
let(:attrs) do
|
73
|
-
{ wrapper: :span }
|
74
|
-
end
|
75
|
-
|
76
|
-
it 'should not use a div wrapper' do
|
77
|
-
should_not have_selector('div')
|
78
|
-
end
|
79
|
-
it 'should have a span wrapper' do
|
80
|
-
should have_selector('span.flash_message')
|
81
|
-
end
|
82
|
-
end
|
83
|
-
|
84
|
-
end
|
85
|
-
|
86
|
-
end
|