facades 0.0.6 → 0.0.7

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.
@@ -15,7 +15,7 @@ module Facades
15
15
  # Use the resource class's table_headings method first, options hash next
16
16
  #
17
17
  def headings
18
- return resource_class.table_attributes if resource_class.respond_to?(:table_headings)
18
+ return resource_class.table_attributes if resource_class.respond_to?(:table_attributes)
19
19
  [options[:headings]].flatten.compact
20
20
  end
21
21
 
@@ -25,15 +25,25 @@ module Facades
25
25
  # @param [String] site_id The site ID provided by google analytics
26
26
  # @return [String] script tag
27
27
  #
28
- def google_analytics(site_id)
29
- content_tag(:script) do
30
- ["var _gaq=[['_setAccount','#{site_id}'],['_trackPageview'],['_trackPageLoadTime']];",
31
- "(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1;",
32
- "g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';",
33
- "s.parentNode.insertBefore(g,s)}(document,'script'));"].join("")
34
- end
28
+ def google_analytics(site_id, &block)
29
+ return "" if defined?(Rails) && Rails.env != "production"
30
+ additional = capture(&block) if block_given?
31
+ additional ||= ""
32
+ content_tag(:script) do
33
+ %Q{
34
+ var _gaq = _gaq || [];
35
+ _gaq.push(['_setAccount', #{site_id}]);
36
+ _gaq.push(['_trackPageview']);
37
+ #{additional}
38
+ (function() {
39
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
40
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
41
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
42
+ })();
43
+ }
44
+ end.html_safe
35
45
  end
36
-
46
+
37
47
  ##
38
48
  #
39
49
  # Creates a page id to be used for identifying a page for CSS/design purposes. If a variable
@@ -25,6 +25,14 @@ module Facades
25
25
  mix(color, black, Sass::Script::Number.new(100 - dilution.value))
26
26
  end
27
27
 
28
+ # Converts a rgba to hex string, via compass ie_hex_str
29
+ def rgba_to_hex(color)
30
+ assert_type color, :Color
31
+ alpha = (color.alpha * 255).round
32
+ alphastr = alpha.to_s(16).rjust(2, '0')
33
+ Sass::Script::String.new("##{alphastr}#{color.send(:hex_str)[1..-1]}".upcase)
34
+ end
35
+
28
36
  end
29
37
  end
30
38
  end
@@ -0,0 +1,33 @@
1
+ module Facades
2
+ module SassExt
3
+ module Funcs
4
+
5
+ ##
6
+ # Compact via compass
7
+ #
8
+ def compact(*args)
9
+ sep = :comma
10
+ if args.size == 1 && args.first.is_a?(Sass::Script::List)
11
+ list = args.first
12
+ args = list.value
13
+ sep = list.separator
14
+ end
15
+ Sass::Script::List.new(args.reject{|a| !a.to_bool}, sep)
16
+ end
17
+
18
+ ##
19
+ # Joins a list with spaces or returns a single element if the
20
+ # list only contains one item
21
+ #
22
+ def spacify(list)
23
+ if list.is_a?(Sass::Script::List)
24
+ Sass::Script::List.new(list.value.dup, :space)
25
+ else
26
+ Sass::Script::List.new([list], :space)
27
+ end
28
+ end
29
+
30
+
31
+ end # Funcs
32
+ end # SassExt
33
+ end # Facades
@@ -4,7 +4,7 @@ module Facades
4
4
  end
5
5
  end
6
6
 
7
- ['form_elements', 'color'].each do |req|
7
+ ['form_elements', 'color', 'funcs'].each do |req|
8
8
  require "facades/sass_ext/#{req}"
9
9
  Sass::Script::Functions.send(:include, Facades::SassExt.const_get(req.camelize))
10
10
  end
@@ -0,0 +1,93 @@
1
+ $_vendor-prefixes: compact(-moz -webkit -o -ms);
2
+ $_common-prefixes: compact(-moz -webkit -o);
3
+
4
+ // Outputs vendor prefixed property names
5
+ @mixin with-vendor-prefix($property, $values, $type: default){
6
+ $prefixes:if($type == default, $_vendor-prefixes, $_common-prefixes);
7
+ @each $prefix in $prefixes{
8
+ #{join(compact($prefix), compact($property), ",")}:$values;
9
+ }
10
+ }
11
+
12
+ @mixin background-size($size1: 100% auto, $size2: false, $size3: false, $size4: false, $size5: false){
13
+ $sizes: compact($size1, $size2, $size3, $size4, $size5);
14
+ @include with-vendor-prefix(background-size, $sizes, common);
15
+ background-size:$sizes;
16
+ }
17
+
18
+ @mixin border-radius($radius){
19
+ @include with-vendor-prefix(border-radius, $radius);
20
+ border-radius:$radius;
21
+ }
22
+
23
+ @mixin box-shadow($color, $horiz, $vert, $blur, $spread, $inner){
24
+ $props: compact();
25
+ @if( $inset == true or $inset == inset ){
26
+ $props: join($props, inset);
27
+ }
28
+
29
+ $props: join($props, compact($color $horiz $vert $blur $spread));
30
+ @include with-vendor-prefix(box-shadow, spacify($props));
31
+ box-shadow: spacify($props);
32
+ }
33
+
34
+
35
+ @mixin linear-gradient($pos, $g1, $g2:false, $g3:false, $g4:false, $g5:false, $g6:false, $g7:false, $g8:false, $g9:false, $g10:false){
36
+
37
+ $pos-type: type-of(nth($pos, 1));
38
+ @if ($pos-type == color) or (nth($pos, 1) == "transparent"){
39
+ $g10: $g9; $g9: $g8; $g8: $g7; $g7: $g6; $g6: $g5; $g5: $g4; $g4: $g3; $g3: $g2; $g2: $g1; $g1: $pos;
40
+ $pos: top; // Default position
41
+ }
42
+
43
+ $basic: ($g1);
44
+ $webkit: color-stop($g1);
45
+
46
+ @each $grad in $g2 $g3 $g4 $g5 $g6 $g7 $g8 $g9 $g10{
47
+ @if $grad != false{
48
+ $basic: $basic + ',' + $grad;
49
+ $webkit: $webkit + ',' + color-stop($grad);
50
+ }
51
+ }
52
+
53
+ $basic: unquote($basic);
54
+ $webkit: unquote($webkit);
55
+
56
+ background-color: nth($g1, 1);
57
+ background: deprecated-webkit-gradient(linear, $basic) no-repeat;
58
+ background: -webkit-gradient(linear, $pos, $webkit) no-repeat;
59
+ background: -webkit-linear-gradient($pos, $basic) no-repeat;
60
+ background: -moz-linear-gradient($pos, $basic) no-repeat;
61
+ background: -ms-linear-gradient($pos, $basic) no-repeat;
62
+ background: -o-linear-gradient($pos, $basic) no-repeat;
63
+ background: linear-gradient($pos, $basic) no-repeat;
64
+ }
65
+
66
+ @mixin transition($properties:all, $duration: 1s, $delay:false, $function: false){
67
+ @include transition-property($properties);
68
+ @include transition-duration($duration);
69
+ @include transition-timing-function($function);
70
+ @include transition-delay($delay);
71
+ }
72
+
73
+ @mixin transition-property($properties: all) {
74
+ @include with-vendor-prefix(transition-duration, unquote($properties));
75
+ transition-property:spacify($properties);
76
+ }
77
+
78
+
79
+ @mixin transition-duration($duration: 1s) {
80
+ @include with-vendor-prefix(transition-duration, if(type-of($duration) == string, unquote($duration), $duration));
81
+ transition-duration:$duration;
82
+ }
83
+
84
+ @mixin transition-timing-function($function: false) {
85
+ @include with-vendor-prefix(transition-timing-function, unquote($function));
86
+ transition-timing-function:$function;
87
+ }
88
+
89
+
90
+ @mixin transition-delay($delay: false) {
91
+ @include with-vendor-prefix(transition-delay, if(type-of($delay) == string, unquote($delay), $delay));
92
+ transition-delay:$delay;
93
+ }
@@ -2,5 +2,4 @@
2
2
 
3
3
  @import 'facades/layout/grid';
4
4
  @import 'facades/layout/forms';
5
- @import 'facades/layout/debug';
6
5
  @import 'facades/layout/dropdown-list';
@@ -17,12 +17,14 @@ $selection-color: #ffffff !default;
17
17
  // Default font color and family
18
18
  // -------------------------------------------------
19
19
  $font-color: #444 !default;
20
- $default-font-family: 'Helvetica Nueue', 'Helvetica', 'Arial', sans-serif !default;
20
+ $font-family: 'Helvetica Nueue', 'Helvetica', 'Arial', sans-serif !default;
21
+ $default-font-family: $font-family !default;
21
22
  $fixed-font-family:"andale mono", "lucida console", monospace !default;
22
23
 
23
24
  // Link colors
24
25
  // -------------------------------------------------
25
26
  $link-color: #00e !default;
27
+ $link-active-color: lighten($link-color, 5%) !default;
26
28
  $link-hover-color: lighten($link-color, 5%) !default;
27
29
  $link-visited-color: #551a8b !default;
28
30
 
@@ -37,6 +39,7 @@ $input-color: $font-color !default;
37
39
  $input-border-color: #bbbbbb !default;
38
40
  $input-background-color: white !default;
39
41
  $input-padding: 0.65em 0.35em !default;
42
+ $input-placeholder-color: #888888;
40
43
 
41
44
  // Disabled state
42
45
  $disabled-input-color: #777 !default;
@@ -87,5 +90,15 @@ $invalid-input-border-color: $error-border-color !default;
87
90
  $invalid-input-background-color: $error-background-color !default;
88
91
  $invalid-input-color: $error-color !default;
89
92
 
93
+ // Flash messages
94
+ $flash-success-class: 'success';
95
+ $flash-notice-class: 'notice';
96
+ $flash-error-class: 'error';
97
+
98
+ // Misc typography
99
+ //-------------------------------------------------
100
+
101
+ $horizontal-rule-color:#ccc !default;
102
+ $horizontal-rule-size:1px !default;
90
103
 
91
104
  @import 'facades/utilities';
@@ -23,10 +23,10 @@
23
23
 
24
24
  // Cross browser inline-block implementations
25
25
  @mixin inline-block {
26
- &{ *display: inline; } // IE7
27
- display: -moz-inline-box;
26
+ &{ *display: inline; } // IE7
27
+ display: -moz-inline-box;
28
28
  -moz-box-orient: vertical;
29
29
  display: inline-block;
30
30
  vertical-align: middle;
31
- *vertical-align: auto; // IE7..again
31
+ *vertical-align: auto; // IE7..again
32
32
  }
@@ -0,0 +1,164 @@
1
+ /* Arfully Masterminded by ZURB */
2
+
3
+ /* --------------------------------------------------
4
+ :: Grid
5
+
6
+ This is the mobile-friendly, responsive grid that
7
+ lets Foundation work much of its magic.
8
+
9
+ -------------------------------------------------- */
10
+
11
+ $grid-width: 980px !default;
12
+ $_grid-column-widths: 4.3% 13% 21.68% 30.37% 39.1% 47.8% 56.5% 65.2% 73.9% 82.6% 91.3% 100%;
13
+ $_grid-gutter-width: 4.4%;
14
+
15
+ @mixin row{
16
+ width:100%;
17
+ max-width: $grid-width;
18
+ min-width: 727px;
19
+ margin:0 auto;
20
+ zoom:1;
21
+
22
+ .row{
23
+ min-width:0;
24
+ }
25
+
26
+ &:before, &:after { content: ""; display: table; }
27
+ &:after { clear: both; }
28
+ zoom: 1;
29
+
30
+ @media only screen and (max-width: 767px) {
31
+ min-width:0px;
32
+ width: 99%;
33
+ min-width: 0;
34
+ margin-left: 0;
35
+ margin-right: 0;
36
+ }
37
+ }
38
+
39
+ @mixin container{
40
+ padding:0 20px;
41
+ margin:0 auto;
42
+ @media only screen and (max-width: 767px) {
43
+ padding:0;
44
+ }
45
+ }
46
+
47
+ @mixin column($num:1){
48
+ @if( $num < length($_grid-column-widths) ){
49
+ margin-left:$_grid-gutter-width;
50
+ }
51
+ float:left;
52
+ min-height:1px;
53
+ width:width($num);
54
+
55
+ &.first, &:first-child{
56
+ margin-left:0;
57
+ }
58
+
59
+ @media only screen and (max-width: 767px) {
60
+ width: width($num) / 3;
61
+ margin-left: $_grid-gutter-width / 6;
62
+ margin-right: $_grid-gutter-width / 6;
63
+ }
64
+ }
65
+
66
+ @mixin offset($num:1){
67
+ $widths: 13.1% 21.8% 30.5% 39.2% 47.9% 56.6% 65.3% 74.0% 82.7% 91.4%;
68
+ $childs: 8.7% 17.4% 26.1% 34.8% 43.5% 52.2% 60.9% 69.6% 78.3% 87% 95.7%;
69
+ margin-left:nth($widths, $num);
70
+ &:first-child{
71
+ margin-left:nth($childs, $num);
72
+ }
73
+
74
+ @media only screen and (max-width: 767px) {
75
+ margin-left:0px;
76
+ &:first-child{ margin-left:0px; }
77
+ }
78
+ }
79
+
80
+ @mixin push($num:1){
81
+ position:relative;
82
+ left: (width($num) + $_grid-gutter-width);
83
+ }
84
+
85
+ @mixin pull($num:1){
86
+ position:relative;
87
+ right: (width($num) + $_grid-gutter-width);
88
+ }
89
+
90
+ @function width($cols:1){
91
+ @return nth($_grid-column-widths, $cols);
92
+ }
93
+
94
+ // Convert classes to top-level mixin
95
+
96
+ @mixin responsive-grid-classes{
97
+ .container { padding: 0 20px; }
98
+
99
+ .row { width: 100%; max-width: 980px; min-width: 727px; margin: 0 auto; }
100
+ /* To fix the grid into a certain size, set max-width to width */
101
+ .row .row { min-width: 0; }
102
+
103
+ .column, .columns { margin-left: 4.4%; float: left; min-height: 1px; position: relative; }
104
+ .column:first-child, .columns:first-child { margin-left: 0; }
105
+
106
+ .row .one.columns { width: 4.3%; }
107
+ .row .two.columns { width: 13%; }
108
+ .row .three.columns { width: 21.68%; }
109
+ .row .four.columns { width: 30.37%; }
110
+ .row .five.columns { width: 39.1%; }
111
+ .row .six.columns { width: 47.8%; }
112
+ .row .seven.columns { width: 56.5%; }
113
+ .row .eight.columns { width: 65.2%; }
114
+ .row .nine.columns { width: 73.9%; }
115
+ .row .ten.columns { width: 82.6%; }
116
+ .row .eleven.columns { width: 91.3%; }
117
+ .row .twelve.columns { width: 100%; }
118
+
119
+ .row .offset-by-one { margin-left: 13.1%; }
120
+ .row .offset-by-two { margin-left: 21.8%; }
121
+ .row .offset-by-three { margin-left: 30.5%; }
122
+ .row .offset-by-four { margin-left: 39.2%; }
123
+ .row .offset-by-five { margin-left: 47.9%; }
124
+ .row .offset-by-six { margin-left: 56.6%; }
125
+ .row .offset-by-seven { margin-left: 65.3%; }
126
+ .row .offset-by-eight { margin-left: 74.0%; }
127
+ .row .offset-by-nine { margin-left: 82.7%; }
128
+ .row .offset-by-ten { margin-left: 91.4%; }
129
+
130
+ .row .centered { float: none; margin: 0 auto; }
131
+
132
+ .row .offset-by-one:first-child { margin-left: 8.7%; }
133
+ .row .offset-by-two:first-child { margin-left: 17.4%; }
134
+ .row .offset-by-three:first-child { margin-left: 26.1%; }
135
+ .row .offset-by-four:first-child { margin-left: 34.8%; }
136
+ .row .offset-by-five:first-child { margin-left: 43.5%; }
137
+ .row .offset-by-six:first-child { margin-left: 52.2%; }
138
+ .row .offset-by-seven:first-child { margin-left: 60.9%; }
139
+ .row .offset-by-eight:first-child { margin-left: 69.6%; }
140
+ .row .offset-by-nine:first-child { margin-left: 78.3%; }
141
+ .row .offset-by-ten:first-child { margin-left: 87%; }
142
+ .row .offset-by-eleven:first-child { margin-left: 95.7%; }
143
+
144
+ /* Source Ordering */
145
+ .push-two { left: 17.4% }
146
+ .push-three { left: 26.1%; }
147
+ .push-four { left: 34.8%; }
148
+ .push-five { left: 43.5%; }
149
+ .push-six { left: 52.2%; }
150
+ .push-seven { left: 60.9%; }
151
+ .push-eight { left: 69.6%; }
152
+ .push-nine { left: 78.3%; }
153
+ .push-ten { left: 87%; }
154
+
155
+ .pull-two { right: 17.4% }
156
+ .pull-three { right: 26.1%; }
157
+ .pull-four { right: 34.8%; }
158
+ .pull-five { right: 43.5%; }
159
+ .pull-six { right: 52.2%; }
160
+ .pull-seven { right: 60.9%; }
161
+ .pull-eight { right: 69.6%; }
162
+ .pull-nine { right: 78.3%; }
163
+ .pull-ten { right: 87%; }
164
+ }
@@ -84,17 +84,24 @@ button, input[type="reset"], input[type="submit"], input[type="button"] {
84
84
  -moz-background-clip: border-box;
85
85
  -webkit-background-clip: border-box;
86
86
  background-clip: border-box;
87
- -webkit-border-radius: $button-border-radius;
88
- -moz-border-radius: $button-border-radius;
89
- border-radius: $button-border-radius;
90
- border: 1px solid;
91
- border-color: $button-border-color;
87
+
88
+ @if $button-border-radius not 0px{
89
+ -webkit-border-radius: $button-border-radius;
90
+ -moz-border-radius: $button-border-radius;
91
+ border-radius: $button-border-radius;
92
+ }
93
+
94
+ @if $button-border-color not none{
95
+ border: 1px solid;
96
+ border-color: $button-border-color;
97
+ }
98
+
92
99
  cursor: pointer;
93
100
  color: $button-color;
94
101
  font: bold 12px / 1.3 "Helvetica Neue", Arial, "Liberation Sans", FreeSans, sans-serif;
95
102
  outline: 0;
96
103
  overflow: visible;
97
- padding:$button-padding;
104
+ padding: $button-padding;
98
105
  width: auto;
99
106
  user-select:none;
100
107
  // IE7
@@ -120,11 +127,18 @@ input[type="time"], input[type="url"], input[type="week"] {
120
127
  -webkit-background-clip: padding;
121
128
  background-clip: padding-box;
122
129
  background-color: white;
123
- border: 1px solid;
124
- -webkit-border-radius: $input-border-radius;
125
- -moz-border-radius: $input-border-radius;
126
- border-radius: $input-border-radius;
127
- border-color: $input-border-color;
130
+
131
+ @if $input-border-color not none{
132
+ border: 1px solid;
133
+ border-color: $input-border-color;
134
+ }
135
+
136
+ @if $input-border-radius not none and $input-border-radius not 0px{
137
+ -webkit-border-radius: $input-border-radius;
138
+ -moz-border-radius: $input-border-radius;
139
+ border-radius: $input-border-radius;
140
+ }
141
+
128
142
  color: $input-color;
129
143
  outline: 0;
130
144
  height:auto;
@@ -156,21 +170,21 @@ input[type="time"], input[type="url"], input[type="week"] {
156
170
  // Separate rule for IE, too.
157
171
  // Cannot stack with WebKit's.
158
172
  ::-webkit-input-placeholder {
159
- color: #888888;
173
+ color: $input-placeholder-color;
160
174
  }
161
175
 
162
176
  input:-moz-placeholder, textarea:-moz-placeholder{
163
- color: #888888;
177
+ color: $input-placeholder-color;
164
178
  }
165
179
 
166
180
  input.placeholder-text, textarea.placeholder-text{
167
- color: #888888;
181
+ color: $input-placeholder-color;
168
182
  }
169
183
 
170
184
  :invalid {
171
- // Suppress red glow that Firefox
172
- // adds to form fields by default,
173
- // even when user is still typing.
185
+ // Suppress red glow that Firefox
186
+ // adds to form fields by default,
187
+ // even when user is still typing.
174
188
  -moz-box-shadow: none;
175
189
  -webkit-box-shadow: none;
176
190
  box-shadow: none;
@@ -203,9 +217,13 @@ select[size]{ padding:0.35em; }
203
217
  // Tweaks for Safari + Chrome.
204
218
  @media (-webkit-min-device-pixel-ratio: 0) {
205
219
  select {
206
- background-image:url($select-arrow-image);
207
- background-repeat: no-repeat;
208
- background-position: right center;
220
+
221
+ @if($select-arrow-image not false and $select-arrow-image not "" ){
222
+ background-image:url($select-arrow-image);
223
+ background-repeat: no-repeat;
224
+ background-position: 98% 50%;
225
+ }
226
+
209
227
  padding-right: 20px;
210
228
  }
211
229
 
@@ -1,25 +1,32 @@
1
1
  article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; }
2
- audio[controls], canvas, video {
3
- display: inline-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%;
4
9
  }
5
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; }
6
13
 
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
+ 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; }
14
20
  }
15
21
 
16
- body { margin: 0; font-size: 13px; line-height: 1.231; }
17
- body, button, input, select, textarea { font-family: sans-serif; color: #222; }
22
+
23
+ /* =============================================================================
24
+ Selection
25
+ ========================================================================== */
18
26
 
19
27
  /*
20
28
  * These selection declarations have to be separate
21
29
  * No text-shadow: twitter.com/miketaylr/status/12228805301
22
- * Also: hot pink!
23
30
  */
24
31
 
25
32
  ::-moz-selection { background: $selection-background-color; color: $selection-color; text-shadow: none; }
@@ -27,50 +34,85 @@ body, button, input, select, textarea { font-family: sans-serif; color: #222; }
27
34
 
28
35
 
29
36
  /* =============================================================================
30
- Links
37
+ Typography
31
38
  ========================================================================== */
32
39
 
33
- a { color: $link-color; }
34
- a:visited { color: $link-visited-color; }
35
- a:focus { outline: thin dotted; }
40
+ /*
41
+ * Corrects styling not present in IE6/7/8/9 S5 C10
42
+ */
36
43
 
37
- /* Improve readability when focused and hovered in all browsers: people.opera.com/patrickl/experiments/keyboard/test */
38
- a:hover, a:active { outline:none; outline: 0; color:$link-hover-color; }
44
+ abbr { _border-bottom: expression(this.title ? '1px dotted' : 'none'); }
45
+ abbr[title] { border-bottom: 1px dotted; }
39
46
 
47
+ /*
48
+ * Corrects style set incorrectly as 'bolder' in FF3/4 S4/5 C10
49
+ */
40
50
 
41
- /* =============================================================================
42
- Typography
43
- ========================================================================== */
51
+ b, strong{ font-weight: bold; }
44
52
 
45
- abbr[title] { border-bottom: 1px dotted; }
53
+ /*
54
+ * Corrects styling not present in S5 C10
55
+ */
46
56
 
47
- b, strong { font-weight: bold; }
57
+ dfn{ font-style: italic; }
48
58
 
49
- blockquote { margin: 1em 40px; }
59
+ /*
60
+ * Corrects styling not present in IE6/7/8/9
61
+ */
50
62
 
51
- dfn { font-style: italic; }
63
+ mark{ background: #FF0; color: #000; }
52
64
 
53
- hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; }
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
+ }
54
73
 
55
- ins { background: #ff9; color: #000; text-decoration: none; }
56
74
 
57
- mark { background: #ff0; color: #000; font-style: italic; font-weight: bold; }
75
+ /*
76
+ * Corrects font family displayed oddly in IE6 S5 C10
77
+ * en.wikipedia.org/wiki/User:Davidgothberg/Test59
78
+ */
58
79
 
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; }
80
+ pre, code, kbd, samp{ font-family: $fixed-font-family; _font-family: 'courier new', monospace; font-size: 1em; }
61
81
 
62
- /* Improve readability of pre-formatted text in all browsers */
63
- pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; }
82
+ /*
83
+ * Improves readability of pre-formatted text in all browsers
84
+ */
64
85
 
65
- q { quotes: none; }
66
- q:before, q:after { content: ""; content: none; }
86
+ pre{ white-space: pre; white-space: pre-wrap; word-wrap: break-word; }
67
87
 
68
- small { font-size: 85%; }
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; }
69
99
 
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; }
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%; }
74
116
 
75
117
 
76
118
  /* =============================================================================
@@ -87,20 +129,43 @@ nav ul, nav ol { list-style: none; margin: 0; padding: 0; }
87
129
  ========================================================================== */
88
130
 
89
131
  /*
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/
132
+ * Corrects display not defined in IE6/7/8/9 & FF3
92
133
  */
93
134
 
94
- img { border: 0; }
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
+ }
95
148
 
96
149
  /*
97
- * Correct overflow displayed oddly in IE9
150
+ * Corrects overflow displayed oddly in IE9
98
151
  */
99
152
 
100
153
  svg:not(:root) {
101
154
  overflow: hidden;
102
155
  }
103
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
+ }
104
169
 
105
170
  /* =============================================================================
106
171
  Figures
@@ -169,14 +234,6 @@ button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; }
169
234
  /* Remove default vertical scrollbar in IE6/7/8/9 */
170
235
  textarea { overflow: auto; vertical-align: top; }
171
236
 
172
-
173
- /* =============================================================================
174
- Tables
175
- ========================================================================== */
176
-
177
- table { border-collapse: collapse; border-spacing: 0; }
178
- td { vertical-align: top; }
179
-
180
237
  /* =======================================================
181
238
  Print styles.
182
239
  Inlined to avoid required HTTP connection: h5bp.com/r
@@ -48,6 +48,8 @@ $font-scale: 0 2 4 6 8;
48
48
  @return $lines;
49
49
  }
50
50
 
51
+ body{ font:#{$font-size}/#{rhythm(1)} $default-font-family; }
52
+
51
53
  h1, h2, h3, h4, h5, h6, p, ol, ul{
52
54
  -webkit-margin-before:0;
53
55
  -webkit-margin-after:0;
@@ -1,9 +1,8 @@
1
- @import 'compass/css3';
2
1
  @mixin inset-text($offset-color, $lum:false, $down: false){
3
2
  $lum: if($lum, $lum, luminance($offset-color));
4
3
  $down: if($down, $down, -1px);
5
4
 
6
5
  $c: if($lum == dark, shade($offset-color, 40%), tint($offset-color, 70%));
7
6
  $o: if($lum == dark, $down, 1px);
8
- @include single-text-shadow($c, $o, $o, 0px);
7
+ text-shadow:#{$c}, $o, $o, 0px;
9
8
  }
@@ -1,10 +1,9 @@
1
1
  @import 'facades/utilities';
2
- @import 'compass/css3';
3
2
 
4
3
  @mixin button-base($radius: $button-border-radius){
5
4
  @include inline-block;
6
5
  text-align:center;
7
- @if $radius not false{
6
+ @if $radius not false and $radius not none{
8
7
  -webkit-border-radius:$radius;
9
8
  -moz-border-radius:$radius;
10
9
  border-radius:$radius;
@@ -12,7 +11,7 @@
12
11
  }
13
12
 
14
13
  @mixin simple-button($bg-color, $text-color:white, $radius: $button-border-radius){
15
- @include button-base;
14
+ @include button-base;
16
15
  color:$text-color;
17
16
  background-color:$bg-color;
18
17
  border-top:1px solid lighten($bg-color, 4%);
@@ -0,0 +1,5 @@
1
+ @import 'facades/typography/lists';
2
+
3
+ @mixin tabbed{
4
+ ul.tab-nav{ @include inline-list; }
5
+ }
@@ -1,7 +1,11 @@
1
1
  // Cross browser clearfixing
2
2
  @mixin clearfix{
3
- &:before, &:after { content: ""; display: table; }
4
- &:after { clear: both; }
3
+ &:before, &:after{
4
+ content: ""; display: table;
5
+ }
6
+ &:after{
7
+ clear: both;
8
+ }
5
9
  zoom: 1;
6
10
  }
7
11
 
@@ -1,3 +1,4 @@
1
1
  @mixin hand-cursor{
2
- cursor:pointer; cursor:hand;
2
+ cursor: pointer;
3
+ cursor: hand;
3
4
  }
@@ -6,7 +6,10 @@ module Facades
6
6
 
7
7
  require 'facades/helpers'
8
8
  require 'facades/builders/sprite'
9
+ require 'sass'
10
+ require 'sass/rails'
9
11
 
12
+ config.sass.load_paths << File.expand_path("../../stylesheets", __FILE__)
10
13
  Facades::Builders::Sprite
11
14
 
12
15
  initializer 'facades assets' do |app|
@@ -1,3 +1,3 @@
1
1
  module Facades
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
data/lib/facades.rb CHANGED
@@ -42,9 +42,16 @@ module Facades
42
42
  end
43
43
 
44
44
  require 'facades/sass_ext'
45
- require 'compass'
46
- Compass::Frameworks.register('facades',
47
- :stylesheets_directory => File.join(File.dirname(__FILE__), 'facades/stylesheets'),
48
- :templates_directory => File.join(File.dirname(__FILE__), 'facades/templates'))
45
+
46
+ begin
47
+ require 'compass'
48
+ rescue LoadError
49
+ end
50
+
51
+ if defined?(Compass)
52
+ Compass::Frameworks.register('facades',
53
+ :stylesheets_directory => File.join(File.dirname(__FILE__), 'facades/stylesheets'),
54
+ :templates_directory => File.join(File.dirname(__FILE__), 'facades/templates'))
55
+ end
49
56
 
50
57
  require 'facades/support/rails' if defined?(Rails)
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: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-11-01 00:00:00.000000000Z
12
+ date: 2012-01-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sass
16
- requirement: &70268111367460 !ruby/object:Gem::Requirement
16
+ requirement: &70286004139240 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '3.1'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70268111367460
24
+ version_requirements: *70286004139240
25
25
  description: ! 'Facades is a front-end development framework which takes '
26
26
  email:
27
27
  - brent@kurbmedia.com
@@ -55,28 +55,28 @@ files:
55
55
  - lib/facades/sass_ext.rb
56
56
  - lib/facades/sass_ext/color.rb
57
57
  - lib/facades/sass_ext/form_elements.rb
58
+ - lib/facades/sass_ext/funcs.rb
58
59
  - lib/facades/stylesheets/facades/_common.scss
60
+ - lib/facades/stylesheets/facades/_css3.scss
59
61
  - lib/facades/stylesheets/facades/_layout.scss
60
62
  - lib/facades/stylesheets/facades/_normalize.scss
61
63
  - lib/facades/stylesheets/facades/_setup.scss
62
64
  - lib/facades/stylesheets/facades/_typography.scss
63
65
  - lib/facades/stylesheets/facades/_ui.scss
64
66
  - lib/facades/stylesheets/facades/_utilities.scss
65
- - lib/facades/stylesheets/facades/layout/_debug.scss
66
67
  - lib/facades/stylesheets/facades/layout/_dropdown-list.scss
67
68
  - lib/facades/stylesheets/facades/layout/_forms.scss
68
69
  - lib/facades/stylesheets/facades/layout/_grid.scss
69
- - lib/facades/stylesheets/facades/legacy/_forms.scss
70
- - lib/facades/stylesheets/facades/legacy/_reset.scss
70
+ - lib/facades/stylesheets/facades/layout/_responsive_grid.scss
71
71
  - lib/facades/stylesheets/facades/setup/_forms.scss
72
72
  - lib/facades/stylesheets/facades/setup/_ie.scss
73
73
  - lib/facades/stylesheets/facades/setup/_reset.scss
74
74
  - lib/facades/stylesheets/facades/typography/_baseline.scss
75
75
  - lib/facades/stylesheets/facades/typography/_lists.scss
76
- - lib/facades/stylesheets/facades/typography/_rhythm.scss
77
76
  - lib/facades/stylesheets/facades/typography/_shadow.scss
78
77
  - lib/facades/stylesheets/facades/ui/_buttons.scss
79
78
  - lib/facades/stylesheets/facades/ui/_flash-messages.scss
79
+ - lib/facades/stylesheets/facades/ui/_tabbed.scss
80
80
  - lib/facades/stylesheets/facades/ui/_tool-tip.scss
81
81
  - lib/facades/stylesheets/facades/utilities/_clearfix.scss
82
82
  - lib/facades/stylesheets/facades/utilities/_color.scss
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  version: '0'
110
110
  requirements: []
111
111
  rubyforge_project: facades
112
- rubygems_version: 1.8.7
112
+ rubygems_version: 1.8.10
113
113
  signing_key:
114
114
  specification_version: 3
115
115
  summary: Front-end development awesome-ness
@@ -1,18 +0,0 @@
1
- $line-height:24px !default;
2
- $font-size:12px !default;
3
-
4
- $grid-background-column-color: #eef2f9 !default;
5
- $grid-background-offset: ceil($grid-gutter-width / 2) !default;
6
- $grid-background-baseline-color: rgba(0,0,0,0.15) !default;
7
- $grid-background-gutter-color: rgba(255,255,255,0) !default;
8
- $grid-background-total-columns: $grid-columns !default;
9
- $grid-background-column-width: $grid-column-width !default;
10
- $grid-background-gutter-width: $grid-gutter-width !default;
11
- $grid-background-baseline-height: #{($line-height / $font-size)}em !default;
12
-
13
- @import 'compass/layout/grid-background';
14
-
15
- @mixin debug-grid{
16
- background-color:transparent;
17
- @include grid-background;
18
- }
@@ -1,130 +0,0 @@
1
- @import 'facades/utilities';
2
-
3
- // Mixin for styling select boxes
4
- @mixin form-select( $font-size: $input-font-size, $normal-border: $unfocused-border-color, $focus-border: $focus-border-color, $border-radius: $input-border-radius ){
5
- @include form-field($font-size, $normal-border, $focus-border, $border-radius);
6
- border-style:solid;
7
- border-width:1px;
8
- font-size:$font-size;
9
- &:focus{ outline:none; }
10
- &[multiple=multiple]{ border-color:$unfocused-border-color; }
11
- }
12
-
13
- // Mixin for styling textareas
14
- @mixin form-textarea( $font-size: $input-font-size, $normal-border: $unfocused-border-color, $focus-border: $focus-border-color, $border-radius: $input-border-radius ){
15
- @include form-field($font-size, $normal-border, $focus-border, $border-radius);
16
- margin:0.5em; padding:5px;
17
- border-style:solid;
18
- border-width:1px;
19
- }
20
-
21
- @mixin form-button($font-size: $input-font-size, $radius: $input-border-radius){
22
- -webkit-appearance: none;
23
- -moz-border-radius: $radius;
24
- -webkit-border-radius: $radius;
25
- border-radius: $radius;
26
- -moz-background-clip: padding;
27
- -webkit-background-clip: padding;
28
- background-clip: padding-box;
29
- cursor:pointer; outline:0; overflow:visible; width:auto;
30
- //IE7
31
- *padding-top: 2px;
32
- *padding-bottom: 0px;
33
- }
34
-
35
- // Default input styling
36
- @mixin form-input( $font-size: $input-font-size, $normal-border: $unfocused-border-color, $focus-border: $focus-border-color, $border-radius: $input-border-radius ){
37
- &.text,
38
- &[type=text],
39
- &[type=password],
40
- &[type=email],
41
- &[type=url]{
42
- @include form-field($font-size, $normal-border, $focus-border, $border-radius); padding:.5em;
43
- border-style:solid;
44
- border-width:1px;
45
- }
46
-
47
- &[type=checkbox],
48
- &[type=radio]{
49
- position: relative; vertical-align:top; top:3px;
50
- // IE8, IE9, IE10
51
- top:0\0; *top: -3px; // IE7
52
- @include inline-block; margin-right:1em; vertical-align:baseline; width:auto;
53
- }
54
- }
55
-
56
- // Global base styles for all input types
57
- @mixin form-field( $font-size: $input-font-size, $normal-border: $unfocused-border-color, $focus-border: $focus-border-color, $border-radius: $input-border-radius ){
58
- @include border-radius($border-radius);
59
- font-size:$font-size;
60
- border-color:$normal-border;
61
- margin:0;
62
- vertical-align:middle;
63
- ::-moz-focus-inner{ border:0; padding:0; }
64
- &:focus{ outline:none; border-color:$focus-border; }
65
- }
66
-
67
- // Mixin for displaying errors and error messages on fields.
68
- @mixin form-errors( $color:$error-color, $border-color:$error-border-color, $bg-color:$error-bg-color ){
69
- &.#{$form-error-class}{
70
- input[type=text],
71
- input[type=password],
72
- input[type=email],
73
- textarea{
74
- border:1px solid $border-color;
75
- background:$bg-color;
76
- }
77
- label{ color:$color; }
78
- #{$form-hint-selector}{ display:none; }
79
- }
80
- }
81
-
82
- // Mixin for displaying form hints
83
- @mixin form-field-hint( $color: $form-hint-color ){
84
- font-size:.95em; line-height:.95em; font-weight:normal; color:$color; display:block;
85
- }
86
-
87
- // Mixin for styling field error messages
88
- @mixin form-error-message($color: $error-color){
89
- font-size:.95em; line-height:.95em; color:$error-color; display:block;
90
- }
91
-
92
- // Creates a column based list of fields within a form. Forms elements should be marked up using ordered lists for semantic value.
93
- @mixin form-split-field-list{
94
- display:block; clear:both; margin:-.5em 0px; @include pie-clearfix;
95
- li{ float:left; margin:0 1em 0 0; vertical-align:middle;
96
- label,
97
- input{
98
- &[type=text],
99
- &[type=password],
100
- &[type=email]{ display:block; }
101
- }
102
- select{ margin:.75em 0px; }
103
- }
104
- }
105
-
106
- @mixin form-field-hints{
107
- #{$form-hint-selector}{ @include form-field-hint; }
108
- }
109
-
110
- // Creates a single column list of fields within a form. Form elements should be marked up using ordered lists for semantic value.
111
- @mixin form-field-list{
112
- list-style-type:none;
113
- margin:0px;
114
- padding:0px;
115
- padding-right:10px;
116
-
117
- li{ padding:.5em 0px;
118
- &.clear{ clear:both; }
119
- &.buttons{ clear:both; padding:.25em 0px 0px 0px; }
120
- &.inline label{ @include inline-block; }
121
- &.multifield{
122
- input, select{ @include inline-block; }
123
- }
124
- ol{ @include form-split-field-list; }
125
- #{$form-error-message-selector}{ @include form-error-message( $error-color ); }
126
- }
127
-
128
- label abbr{ outline:none; border:none; color:red; }
129
- fieldset{ border:none; }
130
- }
@@ -1,115 +0,0 @@
1
- @warn "facades/reset is depreciated. Please use facades/setup (with facades/setup/ie in your ie stylesheet) to support normalization over resetting.";
2
-
3
- $font-size:12px !default;
4
- $line-height:24px !default;
5
- $font-family:'Helvetica Nueue', Helvetica, Arial, sans-serif !default;
6
- $font-color:#333 !default;
7
- $fixed-font-family:"andale mono", "lucida console", monospace !default;
8
-
9
- // Link colors
10
- $link-color:#06c !default;
11
- $link-hover-color:#09f !default;
12
- $link-focus-color:$link-hover-color !default;
13
- $link-active-color:lighten(adjust-hue($link-color, 75deg), 10%) !default;
14
- $link-visited-color:darken($link-color, 10%) !default;
15
-
16
- // Lists
17
- $ordered-list-type:decimal !default;
18
- $unordered-list-type:disc !default;
19
-
20
- // Table striping
21
- $table-header-color:#bbb !default;
22
- $table-stripe-color:lighten($table-header-color, 20%) !default;
23
-
24
- @import 'facades/typography/rhythm';
25
- @import "compass/typography/lists/inline-block-list";
26
- //
27
- // Establishes a default baseline for vertical rhythm
28
- // CSS Reset from html5doctor.com
29
- //
30
- html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp,
31
- small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td,
32
- article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video {
33
- margin:0; padding:0; border:0; outline:0; vertical-align:baseline; background:transparent;
34
- }
35
- body { line-height:1; }
36
- article,aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary{ display:block; }
37
- nav ul { list-style:none; }
38
- blockquote, q {
39
- quotes:none;
40
- &:before, &:after{
41
- content:'';
42
- content:none;
43
- }
44
- }
45
-
46
- a{ margin:0; padding:0; font-size:100%; vertical-align:baseline; background:transparent; }
47
- ins { background-color:#ff9; color:#000; text-decoration:none; }
48
- mark { background-color:#ff9; color:#000; font-style:italic; font-weight:bold; }
49
- del { text-decoration: line-through; }
50
- abbr[title], dfn[title] { border-bottom:1px dotted #000; cursor:help; }
51
- table { border-collapse:collapse; border-spacing:0; }
52
- hr { display:block; height:1px; border:0; border-top:1px solid #cccccc; margin:1em 0; padding:0; }
53
- input, select { vertical-align:middle; }
54
-
55
- $base-font-size: $font-size;
56
- $base-line-height: $line-height;
57
-
58
- // Establish a baseline by default.
59
- body{
60
- font-size-adjust:100%;
61
- -ms-text-size-adjust: none;
62
- -webkit-text-size-adjust: 100%;
63
- -webkit-font-smoothing: antialiased; /* Fix for webkit rendering */
64
- @include normal-text;
65
- font-size:($font-size / 16px) * 1em;
66
- line-height:($line-height / 16px) * 1em;
67
- }
68
- img{ margin:0; }
69
-
70
- // Establish reasonable heading and font sizes, with line-heights based on vertical rhythm.
71
-
72
- h1,h2,h3,h4,h5,h6{ font-weight:normal;}
73
- @include font-scaling;
74
-
75
- a{ text-decoration:underline; color:$link-color;
76
- &:hover{ color:$link-hover-color; }
77
- &:focus{ color:$link-focus-color; }
78
- &:active{ color:$link-active-color; }
79
- &:visited{ color:$link-visited-color; }
80
- }
81
-
82
- blockquote{ font-style:italic; }
83
- strong, dfn{ font-weight: bold; }
84
- em, dfn{ font-style: italic; }
85
- sup, sub{ line-height: 0; }
86
- abbr, acronym{ border-bottom: 1px dotted lighten($font-color, 10%); }
87
- address{ margin: 0 0 1.5em; font-style: italic; }
88
- pre{ margin: 1.5em 0; white-space:pre; }
89
- pre, code, tt{ @include fixed-width-text; }
90
- ul, ol{ margin:0 1.5em rhythm(1, $font-size) 0; padding-left: 1.5em;
91
- li{ @include adjust-font-size-to($font-size);
92
- ol, ul{ margin:0; }
93
- }
94
- }
95
- ul{ list-style-type: $unordered-list-type; }
96
- ol{ list-style-type: $ordered-list-type; }
97
- dl{ margin: 0 0 rhythm(1, $font-size) 0;
98
- dt{ font-weight: bold; }
99
- }
100
- dd{ margin:0 1.5em rhythm(1, $font-size) 1.5em; }
101
- table{ margin-bottom: 1.4em; width: 100%;
102
- th{ font-weight: bold; }
103
- thead th{ background: $table-header-color; text-align:left; }
104
- th,td,caption{ padding: 4px 10px 4px 5px; }
105
- }
106
- table.striped tr:nth-child(even) td, tr.even td{ background:$table-stripe-color; }
107
- nav{
108
- ol, ul{ @include inline-block-list(1em); @include margin-trailer(1, $font-size); }
109
- }
110
-
111
- button, input, select, textarea { font-size: 100%; margin: 0; vertical-align: baseline; }
112
- button, input { line-height: normal; }
113
- button, input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; -webkit-appearance: button; }
114
- input[type="checkbox"], input[type="radio"] { box-sizing: border-box; }
115
- input[type="search"] { -moz-box-sizing: content-box; -webkit-box-sizing: content-box; box-sizing: content-box; }
@@ -1,29 +0,0 @@
1
- @import "compass/typography/vertical_rhythm";
2
- @import "compass/utilities/general/clearfix";
3
-
4
- @warn "Use facades/typography/baseline. This module will be depreciated.";
5
-
6
- @mixin normal-text { font-family: $font-family; color: $font-color; }
7
- @mixin fixed-width-text { font: 1em $fixed-font-family; line-height: 1.5; }
8
-
9
- // Shorthand overrides for Compass' adjust-font-size/leading-to
10
- // because well.. they are freakin long.
11
- //
12
- @mixin font-size($size, $lines: lines-for-font-size($size)){
13
- @include adjust-font-size-to($size, $lines);
14
- }
15
- @mixin leading($size, $lines: lines-for-font-size($size)){
16
- @include adjust-leading-to($size, $lines);
17
- }
18
-
19
- // Basic font scaling based on a typography scale. Its not perfect, but hey its nice lookin.
20
- // Scales h1-h6 and sets paragraphs.
21
- @mixin font-scaling($base: $font-size, $scale: 24px 22px 20px 18px 16px 14px){
22
- $offset:1.618;
23
- $scale: compact($scale);
24
- @for $i from 1 through 6 {
25
- $sizing: floor((nth($scale, $i) * $offset) - ($base / $offset));
26
- #{$i}{ @include adjust-font-size-to($sizing, 1); @include margin-trailer(1, $sizing); }
27
- }
28
- p{ @include adjust-font-size-to($font-size); @include margin-trailer(1, $font-size); }
29
- }