compass-aurora 1.0.2 → 1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,6 +7,6 @@ extension_path = File.expand_path(File.join(File.dirname(__FILE__), ".."))
7
7
  Compass::Frameworks.register('aurora', :path => extension_path)
8
8
 
9
9
  module Aurora
10
- VERSION = "1.0.2"
11
- DATE = "2012-11-12"
10
+ VERSION = "1.1"
11
+ DATE = "2013-01-09"
12
12
  end
@@ -21,4 +21,3 @@
21
21
  @import 'variables';
22
22
  @import 'functions';
23
23
  @import 'mixins';
24
- @import 'extendables';
@@ -2,7 +2,4 @@
2
2
  * Defaults: For any general elements to apply to the whole page.
3
3
  */
4
4
 
5
- .clearfix {
6
- @include clearfix();
7
- }
8
5
 
@@ -5,6 +5,7 @@
5
5
  // We import normalize.css here, so that it inherits the variables already set.
6
6
  @import 'normalize';
7
7
 
8
+ @import 'extendables';
8
9
  @import 'defaults';
9
10
  @import 'type';
10
11
  @import 'forms';
@@ -0,0 +1,24 @@
1
+ /**
2
+ * A Sass partial to replace the Drupal 7 core css.
3
+ *
4
+ * Note: This is as of yet incomplete, and therefore we are not adding it
5
+ * by default within the css files.
6
+ */
7
+
8
+ .element-invisible {
9
+ position: absolute !important;
10
+ clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
11
+ clip: rect(1px, 1px, 1px, 1px);
12
+ overflow: hidden;
13
+ height: 1px;
14
+
15
+ &.element-focusable:active,
16
+ &.element-focusable:focus {
17
+ position: static !important;
18
+ clip: auto;
19
+ overflow: visible;
20
+ height: auto;
21
+ }
22
+ }
23
+
24
+
@@ -19,7 +19,7 @@ file '_base.scss', :like => :stylesheet, :to => 'partials/base/_base.scss'
19
19
  file '_variables.scss', :like => :stylesheet, :to => 'partials/base/_variables.scss'
20
20
  file '../shared/_functions.scss', :like => :stylesheet, :to => 'partials/base/_functions.scss'
21
21
  file '../shared/_mixins.scss', :like => :stylesheet, :to => 'partials/base/_mixins.scss'
22
- file '../shared/_extendables.scss', :like => :stylesheet, :to => 'partials/base/_extendables.scss'
22
+ file '../shared/_extendables.scss', :like => :stylesheet, :to => 'partials/global/_extendables.scss'
23
23
 
24
24
  # Global partials: Form elements, typeface, etc.
25
25
  file '_global.scss', :like => :stylesheet, :to => 'partials/global/_global.scss'
@@ -37,7 +37,6 @@ file '../shared/README-Partials.md', :like => :stylesheet, :to => 'partials/REA
37
37
  # JavaScript
38
38
  file '../shared/hammer.js', :like => :javascript, :to => 'hammer.js'
39
39
  file '../shared/loader.js', :like => :javascript, :to => 'loader.js'
40
- file '../shared/modernizr-2.5.3.js', :like => :javascript, :to => 'modernizr-2.5.3.js'
41
40
 
42
41
  # Git
43
42
  file '../shared/gitignore.txt', :to => ".gitignore", :erb => true
@@ -5,7 +5,10 @@ no_configuration_file!
5
5
  file '../shared/config.rb.erb', :to => "config.rb", :erb => true
6
6
 
7
7
  # Add in README
8
- file '../shared/README-Sass.md', :to => 'README-Sass.md'
8
+ file '../shared/README-Sass.md', :like => :stylesheet, :to => 'README.md'
9
+ file '../shared/README-Partials.md', :like => :stylesheet, :to => 'partials/README.md'
10
+ file '../shared/README-templates.md', :to => "templates/README.md", :erb => true
11
+
9
12
 
10
13
  # ERB ALL the Drupal files!
11
14
  file '../shared/aurora.info.erb', :to => "#{options[:project_name] || File.basename(Compass.configuration.project_path)}.info", :erb => true
@@ -35,7 +38,6 @@ file '../shared/_print.scss', :like => :stylesheet, :to => '_print.scss'
35
38
  # JavaScript
36
39
  file '../shared/hammer.js', :like => :javascript, :to => 'hammer.js'
37
40
  file '../shared/loader.js', :like => :javascript, :to => 'loader.js'
38
- file '../shared/modernizr-2.5.3.js', :like => :javascript, :to => 'modernizr-2.5.3.js'
39
41
 
40
42
  help %Q{
41
43
  Please contact Sam Richard with questions:
@@ -46,6 +48,6 @@ help %Q{
46
48
  welcome_message %Q{
47
49
 
48
50
  Aurora Base Theme with no grid.
49
-
51
+
50
52
  }
51
53
 
@@ -51,4 +51,4 @@ to delete all the generated CSS files.
51
51
  `#environment = :production`
52
52
  - Regenerate all the CSS files by running: `compass compile`
53
53
 
54
- And don't forget to turn on Drupal's CSS aggregation. :-)
54
+ And don't forget to turn on Drupal's CSS aggregation. :-)
@@ -6,4 +6,4 @@
6
6
  // into this file.
7
7
  //
8
8
  // All styling, non box model properties go here
9
- ////////////////////////
9
+ ////////////////////////
@@ -3,4 +3,20 @@
3
3
  //
4
4
  // All of your extendable classes, ids, and placeholder extendables
5
5
  // should go in this file.
6
- ////////////////////////
6
+ ////////////////////////
7
+
8
+ .clearfix {
9
+ @if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
10
+ *zoom: 1;
11
+ }
12
+
13
+ &:before,
14
+ &:after {
15
+ display: table;
16
+ content: "";
17
+ }
18
+
19
+ &:after {
20
+ clear: both;
21
+ }
22
+ }
@@ -2,4 +2,4 @@
2
2
  // Functions Partials
3
3
  //
4
4
  // All of your functions should go in this file.
5
- ////////////////////////
5
+ ////////////////////////
@@ -6,4 +6,4 @@
6
6
  // into this file.
7
7
  //
8
8
  // All box model properties go here
9
- ////////////////////////
9
+ ////////////////////////
@@ -2,4 +2,4 @@
2
2
  // Mixins Partials
3
3
  //
4
4
  // All of your mixins should go in this file.
5
- ////////////////////////
5
+ ////////////////////////
@@ -6,4 +6,4 @@
6
6
  // into this file. This is for Printed files.
7
7
  //
8
8
  // All styling, non box model properties go here
9
- ////////////////////////
9
+ ////////////////////////
@@ -6,4 +6,4 @@
6
6
  // into this file. This is for Print files.
7
7
  //
8
8
  // All box model properties go here
9
- ////////////////////////
9
+ ////////////////////////
@@ -7,4 +7,4 @@
7
7
  //
8
8
  // All Print Style Guide selectors should go in here, regardless of layout or design
9
9
  // (but separating the two in here is a good idea).
10
- ////////////////////////
10
+ ////////////////////////
@@ -25,4 +25,4 @@
25
25
  ////////////////////////
26
26
  // Import Design
27
27
  ////////////////////////
28
- @import 'partials/design/print-design';
28
+ @import 'partials/design/print-design';
@@ -7,4 +7,4 @@
7
7
  //
8
8
  // All Style Guide selectors should go in here, regardless of layout or design
9
9
  // (but separating the two in here is a good idea).
10
- ////////////////////////
10
+ ////////////////////////
@@ -2,4 +2,4 @@
2
2
  // Variables Partials
3
3
  //
4
4
  // All of your variables should go in this file.
5
- ////////////////////////
5
+ ////////////////////////
@@ -4,7 +4,7 @@ core = 7.x
4
4
  base theme = aurora
5
5
 
6
6
  ; Stylesheets
7
- stylesheets[all][] = css/style.css
7
+ stylesheets[all][] = <%= project_css %>/style.css
8
8
 
9
9
  ; Regions
10
10
  regions[header] = Header
@@ -26,12 +26,11 @@ settings[aurora_min_ie_support] = 10
26
26
  ; Miscelaneous Options
27
27
  settings[aurora_remove_core_css] = 0
28
28
  settings[aurora_html_tags] = 1
29
+ settings[aurora_typekit_id] = 0
29
30
 
30
31
  ; JavaScript Options
31
32
  settings[aurora_footer_js] = 1
32
33
  settings[aurora_libraries_head] = 0
33
- settings[aurora_jquery_cdn] = 0
34
- settings[aurora_jquery_version] = 1.4.4
35
34
 
36
35
  ; Toggle Display
37
36
  settings[toggle_logo] = 1
@@ -50,4 +49,4 @@ settings[aurora_viewport_width] = 1
50
49
  settings[aurora_modernizr_debug] = 1
51
50
 
52
51
  ; Experimental Options
53
- settings['aurora_custom_js_handling'] = 0
52
+ settings['aurora_custom_js_handling'] = 0
@@ -1,12 +1,12 @@
1
- <% project_name = File.basename(Compass.configuration.project_path) %># Require any additional compass plugins here.
1
+ <% project_name = File.basename(Compass.configuration.project_path) %><% project_js = Compass.configuration.javascripts_dir %><% project_css = Compass.configuration.css_dir %><% project_sass = Compass.configuration.sass_dir %><% project_img = Compass.configuration.images_dir %># Require any additional compass plugins here.
2
2
  require 'aurora'
3
3
 
4
4
  # Set this to the root of your project when deployed:
5
5
  http_path = "/sites/all/themes/<%= project_name %>"
6
- css_dir = "css"
7
- sass_dir = "sass"
8
- images_dir = "images"
9
- javascripts_dir = "js"
6
+ css_dir = "<%= project_css %>"
7
+ sass_dir = "<%= project_sass %>"
8
+ images_dir = "<%= project_img %>"
9
+ javascripts_dir = "<%= project_js %>"
10
10
  fonts_dir = "fonts"
11
11
 
12
12
  # To enable relative paths to assets via compass helper functions. Since Drupal
@@ -584,7 +584,7 @@ function Hammer(element, options, undefined)
584
584
 
585
585
  _mousedown = false;
586
586
  _event_end = event;
587
-
587
+
588
588
  var dragging = _gesture == 'drag';
589
589
 
590
590
  // swipe gesture
@@ -728,4 +728,4 @@ function Hammer(element, options, undefined)
728
728
  }
729
729
  }
730
730
  }
731
- }
731
+ }
@@ -1,4 +1,7 @@
1
- yepnope({
1
+ // For more information on how to use Modernizr.load, see the official docs
2
+ // http://modernizr.com/docs/#load
3
+
4
+ Modernizr.load({
2
5
  test: Modernizr.touch,
3
6
  yep: 'hammer.js'
4
7
  });
@@ -28,4 +28,4 @@
28
28
 
29
29
  @media print {
30
30
  @import "_print.scss";
31
- }
31
+ }
@@ -30,9 +30,6 @@ function <%= project_name %>_preprocess_maintenance_page(&$vars, $hook) {
30
30
  * The name of the template being rendered ("html" in this case.)
31
31
  */
32
32
  function <%= project_name %>_preprocess_html(&$vars) {
33
- // Be sure replace this with a custom Modernizr build!
34
- drupal_add_js(drupal_get_path('theme', '<%= project_name %>') . '/<%= project_js %>/modernizr-2.5.3.js', array('force header' => true));
35
-
36
33
  // yep/nope for conditional JS loading!
37
34
  drupal_add_js(drupal_get_path('theme', '<%= project_name %>') . '/<%= project_js %>/loader.js');
38
35
  }
@@ -5,7 +5,9 @@ no_configuration_file!
5
5
  file '../shared/config.rb.erb', :to => "config.rb", :erb => true
6
6
 
7
7
  # Add in README
8
- file '../shared/README-Sass.md', :to => 'README-Sass.md'
8
+ file '../shared/README-Sass.md', :like => :stylesheet, :to => 'README.md'
9
+ file '../shared/README-Partials.md', :like => :stylesheet, :to => 'partials/README.md'
10
+ file '../shared/README-templates.md', :to => "templates/README.md", :erb => true
9
11
 
10
12
  # ERB ALL the Drupal files!
11
13
  file '../shared/aurora.info.erb', :to => "#{options[:project_name] || File.basename(Compass.configuration.project_path)}.info", :erb => true
@@ -35,7 +37,6 @@ file '../shared/_print.scss', :like => :stylesheet, :to => '_print.scss'
35
37
  # JavaScript
36
38
  file '../shared/hammer.js', :like => :javascript, :to => 'hammer.js'
37
39
  file '../shared/loader.js', :like => :javascript, :to => 'loader.js'
38
- file '../shared/modernizr-2.5.3.js', :like => :javascript, :to => 'modernizr-2.5.3.js'
39
40
 
40
41
  # Behaviors
41
42
  file 'behaviors/box-sizing/boxsizing.htc'
@@ -50,5 +51,5 @@ help %Q{
50
51
  welcome_message %Q{
51
52
 
52
53
  Aurora Base Theme using Singularity.
53
-
54
+
54
55
  }
@@ -5,7 +5,9 @@ no_configuration_file!
5
5
  file '../shared/config.rb.erb', :to => "config.rb", :erb => true
6
6
 
7
7
  # Add in README
8
- file '../shared/README-Sass.md', :to => 'README-Sass.md'
8
+ file '../shared/README-Sass.md', :like => :stylesheet, :to => 'README.md'
9
+ file '../shared/README-Partials.md', :like => :stylesheet, :to => 'partials/README.md'
10
+ file '../shared/README-templates.md', :to => "templates/README.md", :erb => true
9
11
 
10
12
  # ERB ALL the Drupal files!
11
13
  file '../shared/aurora.info.erb', :to => "#{options[:project_name] || File.basename(Compass.configuration.project_path)}.info", :erb => true
@@ -35,7 +37,6 @@ file '../shared/_print.scss', :like => :stylesheet, :to => '_print.scss'
35
37
  # JavaScript
36
38
  file '../shared/hammer.js', :like => :javascript, :to => 'hammer.js'
37
39
  file '../shared/loader.js', :like => :javascript, :to => 'loader.js'
38
- file '../shared/modernizr-2.5.3.js', :like => :javascript, :to => 'modernizr-2.5.3.js'
39
40
 
40
41
  help %Q{
41
42
  Please contact Sam Richard with questions:
@@ -46,6 +47,6 @@ help %Q{
46
47
  welcome_message %Q{
47
48
 
48
49
  Aurora Base Theme using Susy.
49
-
50
+
50
51
  }
51
52
 
metadata CHANGED
@@ -4,9 +4,8 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 1
7
- - 0
8
- - 2
9
- version: 1.0.2
7
+ - 1
8
+ version: "1.1"
10
9
  platform: ruby
11
10
  authors:
12
11
  - Sam Richard
@@ -15,7 +14,7 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2012-11-12 00:00:00 -05:00
17
+ date: 2013-01-09 00:00:00 -05:00
19
18
  default_executable:
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
@@ -94,6 +93,7 @@ files:
94
93
  - templates/corona/_design.scss
95
94
  - templates/corona/_forms.scss
96
95
  - templates/corona/_global.scss
96
+ - templates/corona/_system.scss
97
97
  - templates/corona/_type.scss
98
98
  - templates/corona/_variables.scss
99
99
  - templates/corona/maintenance.scss
@@ -118,7 +118,6 @@ files:
118
118
  - templates/shared/gitignore.txt
119
119
  - templates/shared/hammer.js
120
120
  - templates/shared/loader.js
121
- - templates/shared/modernizr-2.5.3.js
122
121
  - templates/shared/README-Partials.md
123
122
  - templates/shared/README-Sass.md
124
123
  - templates/shared/README-templates.md
@@ -1,726 +0,0 @@
1
- /* Modernizr 2.5.3 (Custom Build) | MIT & BSD
2
- * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-flexbox_legacy-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-cssclasses-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load
3
- */
4
- ;
5
-
6
-
7
-
8
- window.Modernizr = (function( window, document, undefined ) {
9
-
10
- var version = '2.5.3',
11
-
12
- Modernizr = {},
13
-
14
- enableClasses = true,
15
-
16
- docElement = document.documentElement,
17
-
18
- mod = 'modernizr',
19
- modElem = document.createElement(mod),
20
- mStyle = modElem.style,
21
-
22
- inputElem = document.createElement('input') ,
23
-
24
- smile = ':)',
25
-
26
- toString = {}.toString,
27
-
28
- prefixes = ' -webkit- -moz- -o- -ms- '.split(' '),
29
-
30
-
31
-
32
- omPrefixes = 'Webkit Moz O ms',
33
-
34
- cssomPrefixes = omPrefixes.split(' '),
35
-
36
- domPrefixes = omPrefixes.toLowerCase().split(' '),
37
-
38
- ns = {'svg': 'http://www.w3.org/2000/svg'},
39
-
40
- tests = {},
41
- inputs = {},
42
- attrs = {},
43
-
44
- classes = [],
45
-
46
- slice = classes.slice,
47
-
48
- featureName,
49
-
50
-
51
- injectElementWithStyles = function( rule, callback, nodes, testnames ) {
52
-
53
- var style, ret, node,
54
- div = document.createElement('div'),
55
- body = document.body,
56
- fakeBody = body ? body : document.createElement('body');
57
-
58
- if ( parseInt(nodes, 10) ) {
59
- while ( nodes-- ) {
60
- node = document.createElement('div');
61
- node.id = testnames ? testnames[nodes] : mod + (nodes + 1);
62
- div.appendChild(node);
63
- }
64
- }
65
-
66
- style = ['&#173;','<style>', rule, '</style>'].join('');
67
- div.id = mod;
68
- (body ? div : fakeBody).innerHTML += style;
69
- fakeBody.appendChild(div);
70
- if(!body){
71
- fakeBody.style.background = "";
72
- docElement.appendChild(fakeBody);
73
- }
74
-
75
- ret = callback(div, rule);
76
- !body ? fakeBody.parentNode.removeChild(fakeBody) : div.parentNode.removeChild(div);
77
-
78
- return !!ret;
79
-
80
- },
81
-
82
-
83
-
84
- isEventSupported = (function() {
85
-
86
- var TAGNAMES = {
87
- 'select': 'input', 'change': 'input',
88
- 'submit': 'form', 'reset': 'form',
89
- 'error': 'img', 'load': 'img', 'abort': 'img'
90
- };
91
-
92
- function isEventSupported( eventName, element ) {
93
-
94
- element = element || document.createElement(TAGNAMES[eventName] || 'div');
95
- eventName = 'on' + eventName;
96
-
97
- var isSupported = eventName in element;
98
-
99
- if ( !isSupported ) {
100
- if ( !element.setAttribute ) {
101
- element = document.createElement('div');
102
- }
103
- if ( element.setAttribute && element.removeAttribute ) {
104
- element.setAttribute(eventName, '');
105
- isSupported = is(element[eventName], 'function');
106
-
107
- if ( !is(element[eventName], 'undefined') ) {
108
- element[eventName] = undefined;
109
- }
110
- element.removeAttribute(eventName);
111
- }
112
- }
113
-
114
- element = null;
115
- return isSupported;
116
- }
117
- return isEventSupported;
118
- })(),
119
-
120
-
121
- _hasOwnProperty = ({}).hasOwnProperty, hasOwnProperty;
122
-
123
- if ( !is(_hasOwnProperty, 'undefined') && !is(_hasOwnProperty.call, 'undefined') ) {
124
- hasOwnProperty = function (object, property) {
125
- return _hasOwnProperty.call(object, property);
126
- };
127
- }
128
- else {
129
- hasOwnProperty = function (object, property) {
130
- return ((property in object) && is(object.constructor.prototype[property], 'undefined'));
131
- };
132
- }
133
-
134
-
135
- if (!Function.prototype.bind) {
136
- Function.prototype.bind = function bind(that) {
137
-
138
- var target = this;
139
-
140
- if (typeof target != "function") {
141
- throw new TypeError();
142
- }
143
-
144
- var args = slice.call(arguments, 1),
145
- bound = function () {
146
-
147
- if (this instanceof bound) {
148
-
149
- var F = function(){};
150
- F.prototype = target.prototype;
151
- var self = new F;
152
-
153
- var result = target.apply(
154
- self,
155
- args.concat(slice.call(arguments))
156
- );
157
- if (Object(result) === result) {
158
- return result;
159
- }
160
- return self;
161
-
162
- } else {
163
-
164
- return target.apply(
165
- that,
166
- args.concat(slice.call(arguments))
167
- );
168
-
169
- }
170
-
171
- };
172
-
173
- return bound;
174
- };
175
- }
176
-
177
- function setCss( str ) {
178
- mStyle.cssText = str;
179
- }
180
-
181
- function setCssAll( str1, str2 ) {
182
- return setCss(prefixes.join(str1 + ';') + ( str2 || '' ));
183
- }
184
-
185
- function is( obj, type ) {
186
- return typeof obj === type;
187
- }
188
-
189
- function contains( str, substr ) {
190
- return !!~('' + str).indexOf(substr);
191
- }
192
-
193
- function testProps( props, prefixed ) {
194
- for ( var i in props ) {
195
- if ( mStyle[ props[i] ] !== undefined ) {
196
- return prefixed == 'pfx' ? props[i] : true;
197
- }
198
- }
199
- return false;
200
- }
201
-
202
- function testDOMProps( props, obj, elem ) {
203
- for ( var i in props ) {
204
- var item = obj[props[i]];
205
- if ( item !== undefined) {
206
-
207
- if (elem === false) return props[i];
208
-
209
- if (is(item, 'function')){
210
- return item.bind(elem || obj);
211
- }
212
-
213
- return item;
214
- }
215
- }
216
- return false;
217
- }
218
-
219
- function testPropsAll( prop, prefixed, elem ) {
220
-
221
- var ucProp = prop.charAt(0).toUpperCase() + prop.substr(1),
222
- props = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' ');
223
-
224
- if(is(prefixed, "string") || is(prefixed, "undefined")) {
225
- return testProps(props, prefixed);
226
-
227
- } else {
228
- props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' ');
229
- return testDOMProps(props, prefixed, elem);
230
- }
231
- }
232
-
233
- var testBundle = (function( styles, tests ) {
234
- var style = styles.join(''),
235
- len = tests.length;
236
-
237
- injectElementWithStyles(style, function( node, rule ) {
238
- var style = document.styleSheets[document.styleSheets.length - 1],
239
- cssText = style ? (style.cssRules && style.cssRules[0] ? style.cssRules[0].cssText : style.cssText || '') : '',
240
- children = node.childNodes, hash = {};
241
-
242
- while ( len-- ) {
243
- hash[children[len].id] = children[len];
244
- }
245
-
246
- Modernizr['touch'] = ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch || (hash['touch'] && hash['touch'].offsetTop) === 9;
247
- Modernizr['csstransforms3d'] = (hash['csstransforms3d'] && hash['csstransforms3d'].offsetLeft) === 9 && hash['csstransforms3d'].offsetHeight === 3; Modernizr['generatedcontent'] = (hash['generatedcontent'] && hash['generatedcontent'].offsetHeight) >= 1; Modernizr['fontface'] = /src/i.test(cssText) &&
248
- cssText.indexOf(rule.split(' ')[0]) === 0; }, len, tests);
249
-
250
- })([
251
- '@font-face {font-family:"font";src:url("https://")}' ,['@media (',prefixes.join('touch-enabled),('),mod,')',
252
- '{#touch{top:9px;position:absolute}}'].join('') ,['@media (',prefixes.join('transform-3d),('),mod,')',
253
- '{#csstransforms3d{left:9px;position:absolute;height:3px;}}'].join('')
254
-
255
- ,['#generatedcontent:after{content:"',smile,'";visibility:hidden}'].join('')
256
- ],
257
- [
258
- 'fontface' ,'touch' ,'csstransforms3d'
259
- ,'generatedcontent'
260
-
261
- ]); tests['flexbox'] = function() {
262
- return testPropsAll('flexOrder');
263
- };
264
-
265
-
266
- tests['flexbox-legacy'] = function() {
267
- return testPropsAll('boxDirection');
268
- };
269
-
270
-
271
- tests['canvas'] = function() {
272
- var elem = document.createElement('canvas');
273
- return !!(elem.getContext && elem.getContext('2d'));
274
- };
275
-
276
- tests['canvastext'] = function() {
277
- return !!(Modernizr['canvas'] && is(document.createElement('canvas').getContext('2d').fillText, 'function'));
278
- };
279
-
280
-
281
- tests['webgl'] = function() {
282
- try {
283
- var canvas = document.createElement('canvas'),
284
- ret;
285
- ret = !!(window.WebGLRenderingContext && (canvas.getContext('experimental-webgl') || canvas.getContext('webgl')));
286
- canvas = undefined;
287
- } catch (e){
288
- ret = false;
289
- }
290
- return ret;
291
- };
292
-
293
-
294
- tests['touch'] = function() {
295
- return Modernizr['touch'];
296
- };
297
-
298
- tests['geolocation'] = function() {
299
- return !!navigator.geolocation;
300
- };
301
-
302
- tests['postmessage'] = function() {
303
- return !!window.postMessage;
304
- };
305
-
306
-
307
- tests['websqldatabase'] = function() {
308
- return !!window.openDatabase;
309
- };
310
-
311
- tests['indexedDB'] = function() {
312
- return !!testPropsAll("indexedDB",window);
313
- };
314
-
315
- tests['hashchange'] = function() {
316
- return isEventSupported('hashchange', window) && (document.documentMode === undefined || document.documentMode > 7);
317
- };
318
-
319
- tests['history'] = function() {
320
- return !!(window.history && history.pushState);
321
- };
322
-
323
- tests['draganddrop'] = function() {
324
- var div = document.createElement('div');
325
- return ('draggable' in div) || ('ondragstart' in div && 'ondrop' in div);
326
- };
327
-
328
- tests['websockets'] = function() {
329
- for ( var i = -1, len = cssomPrefixes.length; ++i < len; ){
330
- if ( window[cssomPrefixes[i] + 'WebSocket'] ){
331
- return true;
332
- }
333
- }
334
- return 'WebSocket' in window;
335
- };
336
-
337
-
338
- tests['rgba'] = function() {
339
- setCss('background-color:rgba(150,255,150,.5)');
340
-
341
- return contains(mStyle.backgroundColor, 'rgba');
342
- };
343
-
344
- tests['hsla'] = function() {
345
- setCss('background-color:hsla(120,40%,100%,.5)');
346
-
347
- return contains(mStyle.backgroundColor, 'rgba') || contains(mStyle.backgroundColor, 'hsla');
348
- };
349
-
350
- tests['multiplebgs'] = function() {
351
- setCss('background:url(https://),url(https://),red url(https://)');
352
-
353
- return /(url\s*\(.*?){3}/.test(mStyle.background);
354
- };
355
- tests['backgroundsize'] = function() {
356
- return testPropsAll('backgroundSize');
357
- };
358
-
359
- tests['borderimage'] = function() {
360
- return testPropsAll('borderImage');
361
- };
362
-
363
-
364
-
365
- tests['borderradius'] = function() {
366
- return testPropsAll('borderRadius');
367
- };
368
-
369
- tests['boxshadow'] = function() {
370
- return testPropsAll('boxShadow');
371
- };
372
-
373
- tests['textshadow'] = function() {
374
- return document.createElement('div').style.textShadow === '';
375
- };
376
-
377
-
378
- tests['opacity'] = function() {
379
- setCssAll('opacity:.55');
380
-
381
- return /^0.55$/.test(mStyle.opacity);
382
- };
383
-
384
-
385
- tests['cssanimations'] = function() {
386
- return testPropsAll('animationName');
387
- };
388
-
389
-
390
- tests['csscolumns'] = function() {
391
- return testPropsAll('columnCount');
392
- };
393
-
394
-
395
- tests['cssgradients'] = function() {
396
- var str1 = 'background-image:',
397
- str2 = 'gradient(linear,left top,right bottom,from(#9f9),to(white));',
398
- str3 = 'linear-gradient(left top,#9f9, white);';
399
-
400
- setCss(
401
- (str1 + '-webkit- '.split(' ').join(str2 + str1)
402
- + prefixes.join(str3 + str1)).slice(0, -str1.length)
403
- );
404
-
405
- return contains(mStyle.backgroundImage, 'gradient');
406
- };
407
-
408
-
409
- tests['cssreflections'] = function() {
410
- return testPropsAll('boxReflect');
411
- };
412
-
413
-
414
- tests['csstransforms'] = function() {
415
- return !!testPropsAll('transform');
416
- };
417
-
418
-
419
- tests['csstransforms3d'] = function() {
420
-
421
- var ret = !!testPropsAll('perspective');
422
-
423
- if ( ret && 'webkitPerspective' in docElement.style ) {
424
-
425
- ret = Modernizr['csstransforms3d'];
426
- }
427
- return ret;
428
- };
429
-
430
-
431
- tests['csstransitions'] = function() {
432
- return testPropsAll('transition');
433
- };
434
-
435
-
436
-
437
- tests['fontface'] = function() {
438
- return Modernizr['fontface'];
439
- };
440
-
441
- tests['generatedcontent'] = function() {
442
- return Modernizr['generatedcontent'];
443
- };
444
- tests['video'] = function() {
445
- var elem = document.createElement('video'),
446
- bool = false;
447
-
448
- try {
449
- if ( bool = !!elem.canPlayType ) {
450
- bool = new Boolean(bool);
451
- bool.ogg = elem.canPlayType('video/ogg; codecs="theora"') .replace(/^no$/,'');
452
-
453
- bool.h264 = elem.canPlayType('video/mp4; codecs="avc1.42E01E"') .replace(/^no$/,'');
454
-
455
- bool.webm = elem.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,'');
456
- }
457
-
458
- } catch(e) { }
459
-
460
- return bool;
461
- };
462
-
463
- tests['audio'] = function() {
464
- var elem = document.createElement('audio'),
465
- bool = false;
466
-
467
- try {
468
- if ( bool = !!elem.canPlayType ) {
469
- bool = new Boolean(bool);
470
- bool.ogg = elem.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,'');
471
- bool.mp3 = elem.canPlayType('audio/mpeg;') .replace(/^no$/,'');
472
-
473
- bool.wav = elem.canPlayType('audio/wav; codecs="1"') .replace(/^no$/,'');
474
- bool.m4a = ( elem.canPlayType('audio/x-m4a;') ||
475
- elem.canPlayType('audio/aac;')) .replace(/^no$/,'');
476
- }
477
- } catch(e) { }
478
-
479
- return bool;
480
- };
481
-
482
-
483
- tests['localstorage'] = function() {
484
- try {
485
- localStorage.setItem(mod, mod);
486
- localStorage.removeItem(mod);
487
- return true;
488
- } catch(e) {
489
- return false;
490
- }
491
- };
492
-
493
- tests['sessionstorage'] = function() {
494
- try {
495
- sessionStorage.setItem(mod, mod);
496
- sessionStorage.removeItem(mod);
497
- return true;
498
- } catch(e) {
499
- return false;
500
- }
501
- };
502
-
503
-
504
- tests['webworkers'] = function() {
505
- return !!window.Worker;
506
- };
507
-
508
-
509
- tests['applicationcache'] = function() {
510
- return !!window.applicationCache;
511
- };
512
-
513
-
514
- tests['svg'] = function() {
515
- return !!document.createElementNS && !!document.createElementNS(ns.svg, 'svg').createSVGRect;
516
- };
517
-
518
- tests['inlinesvg'] = function() {
519
- var div = document.createElement('div');
520
- div.innerHTML = '<svg/>';
521
- return (div.firstChild && div.firstChild.namespaceURI) == ns.svg;
522
- };
523
-
524
- tests['smil'] = function() {
525
- return !!document.createElementNS && /SVGAnimate/.test(toString.call(document.createElementNS(ns.svg, 'animate')));
526
- };
527
-
528
-
529
- tests['svgclippaths'] = function() {
530
- return !!document.createElementNS && /SVGClipPath/.test(toString.call(document.createElementNS(ns.svg, 'clipPath')));
531
- };
532
-
533
- function webforms() {
534
- Modernizr['input'] = (function( props ) {
535
- for ( var i = 0, len = props.length; i < len; i++ ) {
536
- attrs[ props[i] ] = !!(props[i] in inputElem);
537
- }
538
- if (attrs.list){
539
- attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);
540
- }
541
- return attrs;
542
- })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));
543
- Modernizr['inputtypes'] = (function(props) {
544
-
545
- for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {
546
-
547
- inputElem.setAttribute('type', inputElemType = props[i]);
548
- bool = inputElem.type !== 'text';
549
-
550
- if ( bool ) {
551
-
552
- inputElem.value = smile;
553
- inputElem.style.cssText = 'position:absolute;visibility:hidden;';
554
-
555
- if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {
556
-
557
- docElement.appendChild(inputElem);
558
- defaultView = document.defaultView;
559
-
560
- bool = defaultView.getComputedStyle &&
561
- defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&
562
- (inputElem.offsetHeight !== 0);
563
-
564
- docElement.removeChild(inputElem);
565
-
566
- } else if ( /^(search|tel)$/.test(inputElemType) ){
567
- } else if ( /^(url|email)$/.test(inputElemType) ) {
568
- bool = inputElem.checkValidity && inputElem.checkValidity() === false;
569
-
570
- } else if ( /^color$/.test(inputElemType) ) {
571
- docElement.appendChild(inputElem);
572
- docElement.offsetWidth;
573
- bool = inputElem.value != smile;
574
- docElement.removeChild(inputElem);
575
-
576
- } else {
577
- bool = inputElem.value != smile;
578
- }
579
- }
580
-
581
- inputs[ props[i] ] = !!bool;
582
- }
583
- return inputs;
584
- })('search tel url email datetime date month week time datetime-local number range color'.split(' '));
585
- }
586
- for ( var feature in tests ) {
587
- if ( hasOwnProperty(tests, feature) ) {
588
- featureName = feature.toLowerCase();
589
- Modernizr[featureName] = tests[feature]();
590
-
591
- classes.push((Modernizr[featureName] ? '' : 'no-') + featureName);
592
- }
593
- }
594
-
595
- Modernizr.input || webforms(); setCss('');
596
- modElem = inputElem = null;
597
-
598
- ;(function(window, document) {
599
-
600
- var options = window.html5 || {};
601
-
602
- var reSkip = /^<|^(?:button|form|map|select|textarea)$/i;
603
-
604
- var supportsHtml5Styles;
605
-
606
- var supportsUnknownElements;
607
-
608
- (function() {
609
- var a = document.createElement('a');
610
-
611
- a.innerHTML = '<xyz></xyz>';
612
-
613
- supportsHtml5Styles = ('hidden' in a);
614
- supportsUnknownElements = a.childNodes.length == 1 || (function() {
615
- try {
616
- (document.createElement)('a');
617
- } catch(e) {
618
- return true;
619
- }
620
- var frag = document.createDocumentFragment();
621
- return (
622
- typeof frag.cloneNode == 'undefined' ||
623
- typeof frag.createDocumentFragment == 'undefined' ||
624
- typeof frag.createElement == 'undefined'
625
- );
626
- }());
627
-
628
- }()); function addStyleSheet(ownerDocument, cssText) {
629
- var p = ownerDocument.createElement('p'),
630
- parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
631
-
632
- p.innerHTML = 'x<style>' + cssText + '</style>';
633
- return parent.insertBefore(p.lastChild, parent.firstChild);
634
- }
635
-
636
- function getElements() {
637
- var elements = html5.elements;
638
- return typeof elements == 'string' ? elements.split(' ') : elements;
639
- }
640
-
641
- function shivMethods(ownerDocument) {
642
- var cache = {},
643
- docCreateElement = ownerDocument.createElement,
644
- docCreateFragment = ownerDocument.createDocumentFragment,
645
- frag = docCreateFragment();
646
-
647
-
648
- ownerDocument.createElement = function(nodeName) {
649
- var node = (cache[nodeName] || (cache[nodeName] = docCreateElement(nodeName))).cloneNode();
650
- return html5.shivMethods && node.canHaveChildren && !reSkip.test(nodeName) ? frag.appendChild(node) : node;
651
- };
652
-
653
- ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
654
- 'var n=f.cloneNode(),c=n.createElement;' +
655
- 'h.shivMethods&&(' +
656
- getElements().join().replace(/\w+/g, function(nodeName) {
657
- cache[nodeName] = docCreateElement(nodeName);
658
- frag.createElement(nodeName);
659
- return 'c("' + nodeName + '")';
660
- }) +
661
- ');return n}'
662
- )(html5, frag);
663
- } function shivDocument(ownerDocument) {
664
- var shived;
665
- if (ownerDocument.documentShived) {
666
- return ownerDocument;
667
- }
668
- if (html5.shivCSS && !supportsHtml5Styles) {
669
- shived = !!addStyleSheet(ownerDocument,
670
- 'article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}' +
671
- 'audio{display:none}' +
672
- 'canvas,video{display:inline-block;*display:inline;*zoom:1}' +
673
- '[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}' +
674
- 'mark{background:#FF0;color:#000}'
675
- );
676
- }
677
- if (!supportsUnknownElements) {
678
- shived = !shivMethods(ownerDocument);
679
- }
680
- if (shived) {
681
- ownerDocument.documentShived = shived;
682
- }
683
- return ownerDocument;
684
- } var html5 = {
685
-
686
- 'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video',
687
-
688
- 'shivCSS': !(options.shivCSS === false),
689
-
690
- 'shivMethods': !(options.shivMethods === false),
691
-
692
- 'type': 'default',
693
- 'shivDocument': shivDocument
694
- }; window.html5 = html5;
695
-
696
- shivDocument(document);
697
-
698
- }(this, document));
699
-
700
- Modernizr._version = version;
701
-
702
- Modernizr._prefixes = prefixes;
703
- Modernizr._domPrefixes = domPrefixes;
704
- Modernizr._cssomPrefixes = cssomPrefixes;
705
-
706
-
707
- Modernizr.hasEvent = isEventSupported;
708
-
709
- Modernizr.testProp = function(prop){
710
- return testProps([prop]);
711
- };
712
-
713
- Modernizr.testAllProps = testPropsAll;
714
-
715
-
716
- Modernizr.testStyles = injectElementWithStyles; docElement.className = docElement.className.replace(/(^|\s)no-js(\s|$)/, '$1$2') +
717
-
718
- (enableClasses ? ' js ' + classes.join(' ') : '');
719
-
720
- return Modernizr;
721
-
722
- })(this, this.document);
723
- /*yepnope1.5.3|WTFPL*/
724
- (function(a,b,c){function d(a){return o.call(a)=="[object Function]"}function e(a){return typeof a=="string"}function f(){}function g(a){return!a||a=="loaded"||a=="complete"||a=="uninitialized"}function h(){var a=p.shift();q=1,a?a.t?m(function(){(a.t=="c"?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){a!="img"&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l={},o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};y[c]===1&&(r=1,y[c]=[],l=b.createElement(a)),a=="object"?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),a!="img"&&(r||y[c]===2?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i(b=="c"?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),p.length==1&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&o.call(a.opera)=="[object Opera]",l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return o.call(a)=="[object Array]"},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,i){var j=b(a),l=j.autoCallback;j.url.split(".").pop().split("?").shift(),j.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]||h),j.instead?j.instead(a,e,f,g,i):(y[j.url]?j.noexec=!0:y[j.url]=1,f.load(j.url,j.forceCSS||!j.forceJS&&"css"==j.url.split(".").pop().split("?").shift()?"c":c,j.noexec,j.attrs,j.timeout),(d(e)||d(l))&&f.load(function(){k(),e&&e(j.origUrl,i,g),l&&l(j.origUrl,i,g),y[j.url]=2})))}function i(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var j,l,m=this.yepnope.loader;if(e(a))g(a,0,m,0);else if(w(a))for(j=0;j<a.length;j++)l=a[j],e(l)?g(l,0,m,0):w(l)?B(l):Object(l)===l&&i(l,m);else Object(a)===a&&i(a,m)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,b.readyState==null&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}})(this,document);
725
- Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0));};
726
- ;