facades 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +70 -73
- data/app/controllers/facades_controller.rb +4 -0
- data/app/views/facades/style_guide.html.erb +300 -0
- data/lib/facades/helpers/frontend.rb +55 -0
- data/lib/facades/helpers/navigation.rb +11 -4
- data/lib/facades/helpers/notifications.rb +1 -1
- data/lib/facades/helpers.rb +2 -0
- data/lib/facades/support/rails.rb +3 -0
- data/lib/facades/version.rb +1 -1
- data/lib/facades.rb +11 -3
- data/spec/internal/log/test.log +188 -0
- data/spec/unit/helpers/navigation_spec.rb +16 -2
- data/src/scss/facades/_config.scss +48 -37
- data/src/scss/facades/_debug.scss +1 -1
- data/src/scss/facades/_forms.scss +19 -3
- data/src/scss/facades/_global.scss +46 -46
- data/src/scss/facades/_icons.scss +39 -39
- data/src/scss/facades/_mixins.scss +10 -0
- data/src/scss/facades/_typography.scss +85 -142
- data/src/scss/facades/debug/_susy.scss +20 -0
- data/src/scss/facades/icons/_classes.scss +30 -30
- data/src/scss/facades/typography/_code.scss +27 -0
- data/src/scss/facades/typography/_extra.scss +34 -0
- metadata +10 -4
@@ -3,59 +3,59 @@
|
|
3
3
|
@import 'facades/icons/legacy';
|
4
4
|
|
5
5
|
/*
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
CSS Psuedo font-face icons
|
7
|
+
Creates an inline font-face icon using $icon-font-family.
|
8
|
+
------------------------------------------------------------------
|
9
9
|
*/
|
10
10
|
|
11
11
|
@mixin icon($name, $size: $font-size, $psuedo: before, $adjust-sizing: true){
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
12
|
+
@if unquote($size) == before or unquote($size) == after{
|
13
|
+
$psuedo: $size;
|
14
|
+
$size: $font-size;
|
15
|
+
}
|
16
|
+
|
17
|
+
$psuedo:unquote($psuedo);
|
18
|
+
|
19
|
+
@if $legacy-icon-format{ @include icon-expression($name, $size, $psuedo); }
|
20
|
+
@else{
|
21
|
+
&:#{$psuedo}{
|
22
|
+
font-family:$icon-font-family;
|
23
|
+
@include icon-content($name);
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
27
|
}
|
28
28
|
|
29
29
|
@mixin icon-before($name, $size: $font-size){
|
30
|
-
|
30
|
+
@include icon($name, $size, before);
|
31
31
|
}
|
32
32
|
|
33
33
|
@mixin icon-after($name, $size: $font-size){
|
34
|
-
|
34
|
+
@include icon($name, $size, after);
|
35
35
|
}
|
36
36
|
|
37
37
|
// Creates a square sprite-like icon
|
38
38
|
@mixin icon-rect($size: 24px, $name: false){
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
39
|
+
&{
|
40
|
+
overflow:hidden;
|
41
|
+
width:$size;
|
42
|
+
height:$size;
|
43
|
+
line-height:$size;
|
44
|
+
font-size:ceil($size * 0.8);
|
45
|
+
white-space:nowrap;
|
46
|
+
display:inline-block;
|
47
|
+
}
|
48
|
+
|
49
|
+
&:before{
|
50
|
+
line-height:1.1;
|
51
|
+
display:inline-block;
|
52
|
+
width:$size;
|
53
|
+
height:$size;
|
54
|
+
text-align:center;
|
55
|
+
@if $name{ @include icon-content($name); }
|
56
|
+
}
|
57
57
|
}
|
58
58
|
|
59
59
|
@mixin icon-content($name){
|
60
|
-
|
60
|
+
content:"#{icon-glyph($name, $icon-pack)}";
|
61
61
|
}
|
@@ -113,3 +113,13 @@ $experimental-support-for-khtml: false !default;
|
|
113
113
|
@if ($width != auto){ width: $width; }
|
114
114
|
@if ($height != auto){ height: $height; }
|
115
115
|
}
|
116
|
+
|
117
|
+
// helper for webkit smoothing
|
118
|
+
@mixin font-smoothing($type: antialised){
|
119
|
+
-webkit-font-smoothing:$type;
|
120
|
+
}
|
121
|
+
|
122
|
+
// reversing text
|
123
|
+
@mixin reverse-text{
|
124
|
+
unicode-bidi: bidi-override; direction: rtl
|
125
|
+
}
|
@@ -6,17 +6,17 @@
|
|
6
6
|
// ----------------------------------------------------------------------------------------
|
7
7
|
|
8
8
|
/*
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
9
|
+
Headings
|
10
|
+
------------------------------------
|
11
|
+
1. Fixes spacing and optimizes appearance
|
12
|
+
2. Sexier rendering in webkit and ios/android
|
13
|
+
|
14
14
|
*/
|
15
15
|
|
16
16
|
|
17
17
|
|
18
18
|
body{
|
19
|
-
|
19
|
+
font-family: $font-family;
|
20
20
|
}
|
21
21
|
|
22
22
|
@include establish-baseline($font-size);
|
@@ -27,194 +27,137 @@ a:visited { color: $link-visited-color; }
|
|
27
27
|
a:hover { color: $link-hover-color; }
|
28
28
|
a:focus { outline: thin dotted; }
|
29
29
|
|
30
|
-
h1, h2, h3, h4, h5, h6 {
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
30
|
+
h1, h2, h3, h4, h5, h6 {
|
31
|
+
margin:0;
|
32
|
+
font-weight: bold;
|
33
|
+
text-rendering: optimizelegibility; // 1
|
34
|
+
-webkit-font-smoothing: subpixel-antialiased;
|
35
|
+
&.headline{
|
36
|
+
@include box-sizing(border-box);
|
37
|
+
}
|
38
|
+
// this fixes rhythm breakage introduced by the added tag
|
39
|
+
small{
|
40
|
+
@include inline-block(baseline);
|
41
|
+
margin:-.2em 0;
|
42
|
+
font-size:.75em;
|
43
|
+
}
|
44
44
|
}
|
45
45
|
|
46
46
|
@function _heading_size($num){
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
47
|
+
$sizes: $heading-font-sizes;
|
48
|
+
$orig: 30px 24px 18px 14px;
|
49
|
+
|
50
|
+
@if $num > length($sizes){ @return nth($orig, $num); }
|
51
|
+
@return nth($sizes, $num);
|
52
52
|
}
|
53
53
|
|
54
|
+
|
54
55
|
h1 {
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
56
|
+
@include font-size(_heading_size(1), 2);
|
57
|
+
@if $include-headline-styles == true{
|
58
|
+
&.headline{
|
59
|
+
@include leading(1, _heading_size(1));
|
60
|
+
@include margins(1, _heading_size(1));
|
61
|
+
}
|
62
|
+
}
|
60
63
|
}
|
61
64
|
|
62
65
|
h2 {
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
66
|
+
@include font-size(_heading_size(2));
|
67
|
+
@include margins(.5, _heading_size(2));
|
68
|
+
@if $include-headline-styles == true{
|
69
|
+
&.headline{
|
70
|
+
@include margins(1, _heading_size(2));
|
71
|
+
}
|
72
|
+
}
|
69
73
|
}
|
70
74
|
|
71
75
|
h3 {
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
76
|
+
@include font-size(_heading_size(3));
|
77
|
+
@include margins(.5, _heading_size(3));
|
78
|
+
@if $include-headline-styles == true{
|
79
|
+
&.headline{
|
80
|
+
@include margins(.5, _heading_size(3));
|
81
|
+
}
|
82
|
+
}
|
78
83
|
}
|
79
84
|
|
80
85
|
|
81
86
|
h4 {
|
82
|
-
|
83
|
-
|
84
|
-
|
87
|
+
@include font-size(_heading_size(4));
|
88
|
+
@include margins(.5, _heading_size(4));
|
85
89
|
}
|
86
90
|
|
87
91
|
h5 {
|
88
|
-
|
92
|
+
@include font-size(12px);
|
89
93
|
}
|
90
94
|
|
91
95
|
h6 {
|
92
|
-
|
93
|
-
|
96
|
+
@include font-size(11px);
|
97
|
+
text-transform:uppercase;
|
94
98
|
}
|
95
99
|
|
96
100
|
|
97
101
|
/*
|
98
|
-
|
99
|
-
|
102
|
+
Headings
|
103
|
+
------------------------------------
|
100
104
|
*/
|
101
105
|
|
102
106
|
p {
|
103
|
-
|
104
|
-
|
105
|
-
|
107
|
+
font-size:$font-size;
|
108
|
+
line-height:$line-height;
|
109
|
+
@include margins(0 1, $font-size);
|
106
110
|
}
|
107
111
|
|
108
112
|
|
109
113
|
/*
|
110
|
-
|
111
|
-
|
114
|
+
Lists
|
115
|
+
------------------------------------
|
112
116
|
*/
|
113
117
|
|
114
118
|
ul, ol {
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
119
|
+
@include font-size($font-size, 1);
|
120
|
+
@include margins(0 1, $font-size);
|
121
|
+
line-height:1;
|
122
|
+
margin-left: 1.6em;
|
123
|
+
padding:0;
|
124
|
+
|
125
|
+
&.block{
|
126
|
+
margin-left:0;
|
127
|
+
list-style:none;
|
128
|
+
}
|
129
|
+
|
130
|
+
ul, ol{
|
131
|
+
@include margins(.5, $font-size);
|
132
|
+
}
|
133
|
+
|
130
134
|
}
|
131
135
|
|
132
136
|
|
133
137
|
|
134
138
|
ul {
|
135
|
-
|
139
|
+
list-style: disc;
|
136
140
|
}
|
137
141
|
|
138
142
|
ol {
|
139
|
-
|
143
|
+
list-style: decimal;
|
140
144
|
}
|
141
145
|
|
142
146
|
li {
|
143
|
-
|
147
|
+
@include leading(1);
|
144
148
|
}
|
145
149
|
|
146
150
|
// for some reason older ie makes list items slightly smaller?
|
147
151
|
.lt-ie9 li{
|
148
|
-
|
152
|
+
@include leading(1.01);
|
149
153
|
}
|
150
154
|
|
151
155
|
dl{
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
}
|
160
|
-
|
161
|
-
/*
|
162
|
-
Misc items.
|
163
|
-
------------------------------------
|
164
|
-
*/
|
165
|
-
|
166
|
-
hr {
|
167
|
-
border: 0;
|
168
|
-
line-height:$line-height;
|
169
|
-
margin-bottom:.3em;
|
170
|
-
overflow:hidden;
|
171
|
-
height:1.25em;
|
172
|
-
@include box-sizing(content-box);
|
173
|
-
position:relative;
|
174
|
-
padding:0;
|
175
|
-
display:block;
|
176
|
-
border-top: 1px solid $horizontal-rule-color;
|
177
|
-
border-bottom:1px solid rgba(white,0);
|
178
|
-
}
|
179
|
-
|
180
|
-
html.lt-ie9{
|
181
|
-
hr{ margin-bottom:.4em; }
|
182
|
-
}
|
183
|
-
|
184
|
-
|
185
|
-
// useful for using email addresses in text. type the text
|
186
|
-
// in reverse and apply this style.
|
187
|
-
span.rev, a.rev{
|
188
|
-
unicode-bidi: bidi-override;
|
189
|
-
direction: rtl
|
190
|
-
}
|
191
|
-
|
192
|
-
address {
|
193
|
-
display: block;
|
194
|
-
margin-bottom: $line-height;
|
195
|
-
line-height: $line-height;
|
196
|
-
}
|
197
|
-
|
198
|
-
code {
|
199
|
-
font-size:$font-size * .9;
|
200
|
-
@include leading(1, $font-size + 1px);
|
201
|
-
padding:1px .5em;
|
202
|
-
position:relative;
|
203
|
-
top:-1px;
|
204
|
-
}
|
205
|
-
|
206
|
-
pre {
|
207
|
-
display: block;
|
208
|
-
@include margins(0 1, 12px);
|
209
|
-
@include font-size(12px);
|
210
|
-
white-space: pre;
|
211
|
-
white-space: pre-wrap;
|
212
|
-
word-break: break-all;
|
213
|
-
padding:rhythm(0.5);
|
214
|
-
border-style:solid;
|
215
|
-
|
216
|
-
code {
|
217
|
-
padding: 0;
|
218
|
-
background-color: transparent;
|
219
|
-
}
|
156
|
+
dt{
|
157
|
+
font-weight:bold;
|
158
|
+
}
|
159
|
+
|
160
|
+
dd{
|
161
|
+
margin:rhythm(.5) 0 rhythm(.5) rhythm(.5);
|
162
|
+
}
|
220
163
|
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
$grid-background-column-color:rgba(black, 0.075) !default;
|
2
|
+
|
3
|
+
@mixin debug-susy-grid($points){
|
4
|
+
#grid{ position:absolute; top:0px; right:$grid-padding; left:$grid-padding; bottom:0px; display:none;
|
5
|
+
@include susy-grid-background; z-index:10000;
|
6
|
+
@for $i from 1 to length($points){
|
7
|
+
@include at-breakpoint(nth($points, $i)){
|
8
|
+
@include susy-grid-background;
|
9
|
+
}
|
10
|
+
}
|
11
|
+
}
|
12
|
+
|
13
|
+
#grid:after{ position:fixed; top:0px; left:0px; z-index:10000; background:rgba(white, 0.5); display:block; padding:.25em 1em; font-size:11px;
|
14
|
+
@for $i from 1 to length($points){
|
15
|
+
@include at-breakpoint(nth($points, $i)){
|
16
|
+
content:"#{$total-columns} | #{container-outer-width()} | #{columns-width()}";
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
@@ -1,37 +1,37 @@
|
|
1
1
|
@import 'facades/config';
|
2
2
|
|
3
3
|
@mixin icon-classes($prefix:'icon-', $names: false){
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
4
|
+
|
5
|
+
$prefix:unquote($prefix);
|
6
|
+
|
7
|
+
[class^="#{$prefix}"]:before, [class*=" #{$prefix}"]:before{
|
8
|
+
display: inline;
|
9
|
+
width: auto;
|
10
|
+
height: auto;
|
11
|
+
line-height: inherit;
|
12
|
+
vertical-align: baseline;
|
13
|
+
font-weight:normal;
|
14
|
+
font-family:$icon-font-family;
|
15
|
+
}
|
16
|
+
|
17
|
+
@if type-of($names) != list{
|
18
|
+
$names: icon-names($icon-pack);
|
19
|
+
}
|
20
|
+
|
21
|
+
@each $ico in $names{
|
22
|
+
$ico: unquote($ico);
|
23
|
+
.#{$prefix}#{$ico}:before{ @include icon-content($ico); }
|
24
|
+
}
|
25
|
+
|
26
|
+
.#{$prefix}large:before {
|
27
|
+
vertical-align: top;
|
28
|
+
display:inline-block;
|
29
|
+
font-size: 1.3333333333333333em;
|
30
|
+
}
|
31
31
|
}
|
32
32
|
|
33
33
|
@mixin icon-rect-classes{
|
34
|
-
|
35
|
-
|
36
|
-
|
34
|
+
.icon-16{ @include icon-rect(16px); }
|
35
|
+
.icon-32{ @include icon-rect(32px); }
|
36
|
+
.icon-24{ @include icon-rect(24px); }
|
37
37
|
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
//---------------------------------------------------
|
2
|
+
// Styles for code elements
|
3
|
+
//---------------------------------------------------
|
4
|
+
|
5
|
+
code {
|
6
|
+
font-size:$font-size * .9;
|
7
|
+
@include leading(1, $font-size + 1px);
|
8
|
+
padding:1px .5em;
|
9
|
+
position:relative;
|
10
|
+
top:-1px;
|
11
|
+
}
|
12
|
+
|
13
|
+
pre {
|
14
|
+
display: block;
|
15
|
+
@include margins(0 1, 12px);
|
16
|
+
@include font-size(12px);
|
17
|
+
white-space: pre;
|
18
|
+
white-space: pre-wrap;
|
19
|
+
word-break: break-all;
|
20
|
+
padding:rhythm(0.5);
|
21
|
+
border-style:solid;
|
22
|
+
|
23
|
+
code {
|
24
|
+
padding: 0;
|
25
|
+
background-color: transparent;
|
26
|
+
}
|
27
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
//---------------------------------------------------
|
2
|
+
// Extra typography styles
|
3
|
+
//---------------------------------------------------
|
4
|
+
|
5
|
+
hr {
|
6
|
+
border: 0;
|
7
|
+
line-height:$line-height;
|
8
|
+
margin-bottom:.3em;
|
9
|
+
overflow:hidden;
|
10
|
+
height:1.25em;
|
11
|
+
@include box-sizing(content-box);
|
12
|
+
position:relative;
|
13
|
+
padding:0;
|
14
|
+
display:block;
|
15
|
+
border-top: 1px solid $horizontal-rule-color;
|
16
|
+
border-bottom:1px solid rgba(white,0);
|
17
|
+
}
|
18
|
+
|
19
|
+
html.lt-ie9{
|
20
|
+
hr{ margin-bottom:.4em; }
|
21
|
+
}
|
22
|
+
|
23
|
+
|
24
|
+
// useful for using email addresses in text. type the text
|
25
|
+
// in reverse and apply this style.
|
26
|
+
span.rev, a.rev{
|
27
|
+
@include reverse-text;
|
28
|
+
}
|
29
|
+
|
30
|
+
address {
|
31
|
+
display: block;
|
32
|
+
margin-bottom: $line-height;
|
33
|
+
line-height: $line-height;
|
34
|
+
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: facades
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-10-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sass
|
@@ -140,11 +140,14 @@ files:
|
|
140
140
|
- README.md
|
141
141
|
- Rakefile
|
142
142
|
- app/assets/javascripts/facades/debug/grid.js
|
143
|
+
- app/controllers/facades_controller.rb
|
143
144
|
- app/helpers/facades_helper.rb
|
145
|
+
- app/views/facades/style_guide.html.erb
|
144
146
|
- config.ru
|
145
147
|
- facades.gemspec
|
146
148
|
- lib/facades.rb
|
147
149
|
- lib/facades/helpers.rb
|
150
|
+
- lib/facades/helpers/frontend.rb
|
148
151
|
- lib/facades/helpers/layout.rb
|
149
152
|
- lib/facades/helpers/navigation.rb
|
150
153
|
- lib/facades/helpers/notifications.rb
|
@@ -195,6 +198,7 @@ files:
|
|
195
198
|
- src/scss/facades/buttons/_gradient.scss
|
196
199
|
- src/scss/facades/buttons/_shared.scss
|
197
200
|
- src/scss/facades/buttons/_simple.scss
|
201
|
+
- src/scss/facades/debug/_susy.scss
|
198
202
|
- src/scss/facades/icons/_classes.scss
|
199
203
|
- src/scss/facades/icons/_legacy.scss
|
200
204
|
- src/scss/facades/layout/_lists.scss
|
@@ -217,6 +221,8 @@ files:
|
|
217
221
|
- src/scss/facades/patterns/_pills.scss
|
218
222
|
- src/scss/facades/patterns/_tabs.scss
|
219
223
|
- src/scss/facades/patterns/_twipsy.scss
|
224
|
+
- src/scss/facades/typography/_code.scss
|
225
|
+
- src/scss/facades/typography/_extra.scss
|
220
226
|
- src/scss/facades/typography/_tables.scss
|
221
227
|
homepage: https://github.com/kurbmedia/facades
|
222
228
|
licenses: []
|
@@ -232,7 +238,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
232
238
|
version: '0'
|
233
239
|
segments:
|
234
240
|
- 0
|
235
|
-
hash:
|
241
|
+
hash: 61707918782527994
|
236
242
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
237
243
|
none: false
|
238
244
|
requirements:
|
@@ -241,7 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
241
247
|
version: '0'
|
242
248
|
segments:
|
243
249
|
- 0
|
244
|
-
hash:
|
250
|
+
hash: 61707918782527994
|
245
251
|
requirements: []
|
246
252
|
rubyforge_project: facades
|
247
253
|
rubygems_version: 1.8.23
|