├── bower.json ├── demos ├── common.js ├── scroll.html ├── all-events.html ├── enter-leave.html └── common.css ├── package.json ├── jquery.scrollex.min.js ├── README.md └── jquery.scrollex.js /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery.scrollex", 3 | "version": "0.2.1", 4 | "description": "Nifty scroll events for jQuery.", 5 | "keywords": [ "jquery", "scroll", "scrolling" ], 6 | "homepage": "http://n33.co", 7 | "license": "MIT", 8 | "ignore": [ ], 9 | "main": "./jquery.scrollex.js", 10 | "dependencies": { 11 | "jquery": ">=1.11" 12 | } 13 | } -------------------------------------------------------------------------------- /demos/common.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 3 | $(function() { 4 | 5 | var $window = $(window), 6 | $body = $('body'); 7 | 8 | // Disable animations/transitions until the page has loaded. 9 | $body.addClass('is-loading'); 10 | 11 | $window.on('load', function() { 12 | window.setTimeout(function() { 13 | $body.removeClass('is-loading'); 14 | }, 0); 15 | }); 16 | 17 | }); 18 | 19 | })(jQuery); -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery.scrollex", 3 | "description": "Nifty scroll events for jQuery.", 4 | "version": "0.2.1", 5 | "keywords": [ 6 | "jquery", 7 | "scroll", 8 | "scrolling" 9 | ], 10 | "homepage": "http://n33.co", 11 | "main": "jquery.scrollex.js", 12 | "repository": { 13 | "type": "git", 14 | "url": "https://github.com/ajlkn/jquery.scrollex.git" 15 | }, 16 | "bugs": { 17 | "url": "https://github.com/ajlkn/jquery.scrollex/issues" 18 | }, 19 | "license": "MIT", 20 | "engines": { 21 | "node": ">=4" 22 | }, 23 | "dependencies": { 24 | "jquery": ">=1.11" 25 | }, 26 | "files": [ 27 | "jquery.scrollex.js", 28 | "jquery.scrollex.min.js" 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /jquery.scrollex.min.js: -------------------------------------------------------------------------------- 1 | /* jquery.scrollex v0.2.1 | (c) n33 | n33.co @n33co | MIT */ 2 | !function(t){function e(t,e,n){return"string"==typeof t&&("%"==t.slice(-1)?t=parseInt(t.substring(0,t.length-1))/100*e:"vh"==t.slice(-2)?t=parseInt(t.substring(0,t.length-2))/100*n:"px"==t.slice(-2)&&(t=parseInt(t.substring(0,t.length-2)))),t}var n=t(window),i=1,o={};n.on("scroll",function(){var e=n.scrollTop();t.map(o,function(t){window.clearTimeout(t.timeoutId),t.timeoutId=window.setTimeout(function(){t.handler(e)},t.options.delay)})}).on("load",function(){n.trigger("scroll")}),jQuery.fn.scrollex=function(l){var s=t(this);if(0==this.length)return s;if(this.length>1){for(var r=0;r=i&&o>=t};break;case"bottom":h=function(t,e,n,i,o){return n>=i&&o>=n};break;case"middle":h=function(t,e,n,i,o){return e>=i&&o>=e};break;case"top-only":h=function(t,e,n,i,o){return i>=t&&n>=i};break;case"bottom-only":h=function(t,e,n,i,o){return n>=o&&o>=t};break;default:case"default":h=function(t,e,n,i,o){return n>=i&&o>=t}}return c=function(t){var i,o,l,s,r,a,u=this.state,h=!1,c=this.$element.offset();i=n.height(),o=t+i/2,l=t+i,s=this.$element.outerHeight(),r=c.top+e(this.options.top,s,i),a=c.top+s-e(this.options.bottom,s,i),h=this.test(t,o,l,r,a),h!=u&&(this.state=h,h?this.options.enter&&this.options.enter.apply(this.element):this.options.leave&&this.options.leave.apply(this.element)),this.options.scroll&&this.options.scroll.apply(this.element,[(o-r)/(a-r)])},p={id:a,options:u,test:h,handler:c,state:null,element:this,$element:s,timeoutId:null},o[a]=p,s.data("_scrollexId",p.id),p.options.initialize&&p.options.initialize.apply(this),s},jQuery.fn.unscrollex=function(){var e=t(this);if(0==this.length)return e;if(this.length>1){for(var n=0;n 11 | 12 | ``` 13 | 14 | Then call `scrollex()` on a selector with a **configuration object**, which is where you'll associate handlers with the events you want to use and set various Scrollex options (see **Configuration Reference** below). For example, this uses the `enter` and `leave` events to change the background color of `#foobar` to green when we scroll within its boundaries (its _contact area_), then back again when we scroll out of it: 15 | 16 | ```js 17 | $(function() { 18 | $('#foobar').scrollex({ 19 | enter: function() { 20 | 21 | // Set #foobar's background color to green when we scroll into it. 22 | $(this).css('background-color', 'green'); 23 | 24 | }, 25 | leave: function() { 26 | 27 | // Reset #foobar's background color when we scroll out of it. 28 | $(this).css('background-color', ''); 29 | 30 | } 31 | }); 32 | }); 33 | ``` 34 | 35 | ## Events 36 | 37 | Scrollex supports the following events: 38 | 39 | ### `enter` 40 | Triggered when the viewport enters an element's contact area. Behavior can be tweaked using the `mode`, `top`, and `bottom` options (see next section). 41 | 42 | ### `leave` 43 | Triggered when the viewport leaves an element's contact area. Behavior can be tweaked using the `mode`, `top`, and `bottom` options (see next section). 44 | 45 | ### `initialize` 46 | Triggered as soon as `scrollex()` is called on an element. 47 | 48 | ### `terminate` 49 | Triggered as soon as `unscrollex()` is called on an element, which is used to gracefully undo a previous `scrollex()` call. 50 | 51 | ### `scroll` 52 | Triggered as the viewport scrolls through an element. The handler associated with this event is called with a normalized value representing how far the viewport has scrolled through the element (between `0` and `1`, although values outside this range are possible if the viewport is above or below the element). For example: 53 | 54 | ```js 55 | $(function() { 56 | $('#foobar').scrollex({ 57 | scroll: function(progress) { 58 | 59 | // Progressively increase #foobar's opacity as we scroll through it. 60 | $(this).css('opacity', Math.max(0, Math.min(1, progress))); 61 | 62 | } 63 | }); 64 | }); 65 | ``` 66 | 67 | ## `mode`, `top`, and `bottom` 68 | 69 | Events that depend on the viewport's position relative to an element's contact area (currently just `enter` and `leave`) can be further tweaked using the `mode`, `top`, and `bottom` options. 70 | 71 | ### `mode` 72 | 73 | This determines the rules Scrollex uses to figure out when the viewport is considered "inside" or "outside" an element's contact area. Can be any of the following: 74 | 75 | Value | Behavior 76 | --------------|----------------------------------------------------------------- 77 | `default` | Element's contact area must fall within the viewport. 78 | `top` | Top viewport edge must fall within the element's contact area. 79 | `bottom` | Bottom viewport edge must fall within the element's contact area. 80 | `middle` | Midpoint between top/bottom viewport edges must fall within the element's contact area. 81 | 82 | ### `top` and `bottom` 83 | 84 | These let you "pad" the edges of an element's contact area using either a pixel value (`150`) a percentage of that element's height (`25%`), or a percentage of the viewport's height (`20vh`). Positive values work inward and shrink the contact area, while negative values work outward and expand the contact area. For example, this expands the contact area of `#foobar` by 20% of its height in both directions, resulting in `enter` triggering a bit earlier and `leave` a bit later: 85 | 86 | ```js 87 | $(function() { 88 | $('#foobar').scrollex({ 89 | top: '-20%', 90 | bottom: '-20%', 91 | enter: function() { 92 | $(this).css('background-color', 'green'); 93 | 94 | }, 95 | leave: function() { 96 | $(this).css('background-color', ''); 97 | } 98 | }); 99 | }); 100 | ``` 101 | 102 | ## Configuration Reference 103 | 104 | Name | Type | Default | Description 105 | -------------|---------------------|-----------|--------------------------- 106 | `enter` | `function` | `null` | **Enter** event. 107 | `leave` | `function` | `null` | **Leave** event. 108 | `initialize` | `function` | `null` | **Initialize** event. 109 | `terminate` | `function` | `null` | **Terminate** event. 110 | `scroll` | `function` | `null` | **Scroll** event. 111 | `mode` | `string` | `default` | Mode (`default`, `top`, `bottom`, or `middle`). 112 | `top` | `integer`, `string` | `0` | Top padding (in pixels, `%`, `vh`). 113 | `bottom` | `integer`, `string` | `0` | Bottom padding (in pixels, `%`, or `vh`). 114 | `delay` | `integer` | `0` | Delay (in ms) between position checks. 115 | 116 | ## License 117 | 118 | Scrollex is released under the MIT license, so go nuts. 119 | 120 | Copyright © n33 121 | 122 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 123 | 124 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 125 | 126 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 127 | -------------------------------------------------------------------------------- /demos/scroll.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Scrollex Demo: Scroll 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 125 | 205 | 206 | 207 |
208 | 209 | 210 | 217 | 218 | 219 |
220 |
221 |

Item One

222 |

Amet vis lobortis vis blandit adipiscing varius accumsan orci lorem. Metus pellentesque amet faucibus lobortis Arcu donec vitae. Eleifend aliquam lobortis interdum id accumsan metus arcu suscipit enim id varius phasellus.

223 |
224 | 225 |
226 | 227 |
228 |
229 |

Item Two

230 |

Amet vis lobortis vis blandit adipiscing varius accumsan orci lorem. Metus pellentesque amet faucibus lobortis Arcu donec vitae. Eleifend aliquam lobortis interdum id accumsan metus arcu suscipit enim id varius phasellus.

231 |
232 | 233 |
234 | 235 |
236 |
237 |

Item Three

238 |

Amet vis lobortis vis blandit adipiscing varius accumsan orci lorem. Metus pellentesque amet faucibus lobortis Arcu donec vitae. Eleifend aliquam lobortis interdum id accumsan metus arcu suscipit enim id varius phasellus.

239 |
240 | 241 |
242 | 243 |
244 |
245 |

Item Four

246 |

Amet vis lobortis vis blandit adipiscing varius accumsan orci lorem. Metus pellentesque amet faucibus lobortis Arcu donec vitae. Eleifend aliquam lobortis interdum id accumsan metus arcu suscipit enim id varius phasellus.

247 |
248 | 249 |
250 | 251 | 252 | 255 | 256 |
257 | 258 | -------------------------------------------------------------------------------- /jquery.scrollex.js: -------------------------------------------------------------------------------- 1 | /* jquery.scrollex v0.2.1 | (c) n33 | n33.co @n33co | MIT */ 2 | 3 | (function($) { 4 | 5 | var $window = $(window), 6 | ids = 1, 7 | queue = {}; 8 | 9 | /** 10 | * Resolves a top/bottom value, optionally relative to an element's height 11 | * or the window height. 12 | * 13 | * @param {integer} x Value. 14 | * @param {integer} eHeight Element height. 15 | * @param {integer} vHeight Viewport (window) height. 16 | * @return {integer} Resolved value. 17 | */ 18 | function resolve(x, eHeight, vHeight) { 19 | 20 | if (typeof x === 'string') { 21 | 22 | // Percentage? Relative to element height. 23 | if (x.slice(-1) == '%') 24 | x = (parseInt(x.substring(0, x.length - 1)) / 100.00) * eHeight; 25 | 26 | // vh? Relative to viewport height. 27 | else if (x.slice(-2) == 'vh') 28 | x = (parseInt(x.substring(0, x.length - 2)) / 100.00) * vHeight; 29 | 30 | // px? Redundant but okay! 31 | else if (x.slice(-2) == 'px') 32 | x = parseInt(x.substring(0, x.length - 2)); 33 | 34 | } 35 | 36 | return x; 37 | 38 | }; 39 | 40 | /** 41 | * Window events. 42 | */ 43 | $window 44 | .on('scroll', function() { 45 | 46 | // Get vTop. 47 | var vTop = $window.scrollTop(); 48 | 49 | // Step through handler queue. 50 | $.map(queue, function(o) { 51 | 52 | // Clear existing timeout. 53 | window.clearTimeout(o.timeoutId); 54 | 55 | // Call handler after timeout delay. 56 | o.timeoutId = window.setTimeout(function() { 57 | (o.handler)(vTop); 58 | }, o.options.delay); 59 | 60 | }); 61 | 62 | }) 63 | .on('load', function() { 64 | $window.trigger('scroll'); 65 | }); 66 | 67 | /** 68 | * Activates scrollex on an element. 69 | * 70 | * @param {object} userOptions Options. 71 | * @return {jQuery} jQuery object. 72 | */ 73 | jQuery.fn.scrollex = function(userOptions) { 74 | 75 | var $this = $(this); 76 | 77 | // No elements? 78 | if (this.length == 0) 79 | return $this; 80 | 81 | // Multiple elements? 82 | if (this.length > 1) { 83 | 84 | for (var i=0; i < this.length; i++) 85 | $(this[i]).scrollex(userOptions); 86 | 87 | return $this; 88 | 89 | } 90 | 91 | // Already scrollexed? 92 | if ($this.data('_scrollexId')) 93 | return $this; 94 | 95 | // Vars. 96 | var id, options, test, handler, o; 97 | 98 | // Build object. 99 | 100 | // ID. 101 | id = ids++; 102 | 103 | // Options. 104 | options = jQuery.extend({ 105 | 106 | // Top. 107 | top: 0, 108 | 109 | // Bottom. 110 | bottom: 0, 111 | 112 | // Delay. 113 | delay: 0, 114 | 115 | // Mode ('default', 'top', 'middle', 'bottom', 'top-only', 'bottom-only'). 116 | mode: 'default', 117 | 118 | // Enter function. 119 | enter: null, 120 | 121 | // Leave function. 122 | leave: null, 123 | 124 | // Initialize function. 125 | initialize: null, 126 | 127 | // Terminate function. 128 | terminate: null, 129 | 130 | // Scroll function. 131 | scroll: null 132 | 133 | }, userOptions); 134 | 135 | // Test. 136 | switch (options.mode) { 137 | 138 | // top: Top viewport edge must fall within element's contact area. 139 | case 'top': 140 | 141 | test = function(vTop, vMiddle, vBottom, eTop, eBottom) { 142 | return (vTop >= eTop && vTop <= eBottom); 143 | }; 144 | 145 | break; 146 | 147 | // bottom: Bottom viewport edge must fall within element's contact area. 148 | case 'bottom': 149 | 150 | test = function(vTop, vMiddle, vBottom, eTop, eBottom) { 151 | return (vBottom >= eTop && vBottom <= eBottom); 152 | }; 153 | 154 | break; 155 | 156 | // middle: Midpoint between top/bottom viewport edges must fall within element's contact area. 157 | case 'middle': 158 | 159 | test = function(vTop, vMiddle, vBottom, eTop, eBottom) { 160 | return (vMiddle >= eTop && vMiddle <= eBottom); 161 | }; 162 | 163 | break; 164 | 165 | // top-only: Top viewport edge must be visible 166 | case 'top-only': 167 | 168 | test = function(vTop, vMiddle, vBottom, eTop, eBottom) { 169 | return (vTop <= eTop && eTop <= vBottom); 170 | }; 171 | 172 | break; 173 | 174 | // bottom-only: Bottom viewport edge must be visible 175 | case 'bottom-only': 176 | 177 | test = function(vTop, vMiddle, vBottom, eTop, eBottom) { 178 | return (vBottom >= eBottom && eBottom >= vTop); 179 | }; 180 | 181 | break; 182 | 183 | // default: Element's contact area must fall within the viewport. 184 | default: 185 | case 'default': 186 | 187 | test = function(vTop, vMiddle, vBottom, eTop, eBottom) { 188 | return (vBottom >= eTop && vTop <= eBottom); 189 | }; 190 | 191 | break; 192 | 193 | } 194 | 195 | // Handler. 196 | handler = function(vTop) { 197 | 198 | var currentState = this.state, 199 | newState = false, 200 | offset = this.$element.offset(), 201 | vHeight, vMiddle, vBottom, 202 | eHeight, eTop, eBottom; 203 | 204 | // Viewport values. 205 | vHeight = $window.height(); 206 | vMiddle = vTop + (vHeight / 2); 207 | vBottom = vTop + vHeight; 208 | 209 | // Element values. 210 | eHeight = this.$element.outerHeight(); 211 | eTop = offset.top + resolve(this.options.top, eHeight, vHeight); 212 | eBottom = (offset.top + eHeight) - resolve(this.options.bottom, eHeight, vHeight); 213 | 214 | // Determine if there's been a state change. 215 | newState = this.test(vTop, vMiddle, vBottom, eTop, eBottom); 216 | 217 | if (newState != currentState) { 218 | 219 | // Update state. 220 | this.state = newState; 221 | 222 | // Call appropriate function. 223 | if (newState) { 224 | 225 | if (this.options.enter) 226 | (this.options.enter).apply(this.element); 227 | 228 | } 229 | else { 230 | 231 | if (this.options.leave) 232 | (this.options.leave).apply(this.element); 233 | 234 | } 235 | 236 | } 237 | 238 | // Call scroll function. 239 | if (this.options.scroll) 240 | (this.options.scroll).apply(this.element, [ 241 | (vMiddle - eTop) / (eBottom - eTop) 242 | ]); 243 | 244 | }; 245 | 246 | // Object. 247 | o = { 248 | id: id, 249 | options: options, 250 | test: test, 251 | handler: handler, 252 | state: null, 253 | element: this, 254 | $element: $this, 255 | timeoutId: null 256 | }; 257 | 258 | // Add object to queue. 259 | queue[id] = o; 260 | 261 | // Add scrollex ID to element. 262 | $this.data('_scrollexId', o.id); 263 | 264 | // Call initialize. 265 | if (o.options.initialize) 266 | (o.options.initialize).apply(this); 267 | 268 | return $this; 269 | 270 | }; 271 | 272 | /** 273 | * Deactivates scrollex on an element. 274 | * 275 | * @return {jQuery} jQuery object. 276 | */ 277 | jQuery.fn.unscrollex = function() { 278 | 279 | var $this = $(this); 280 | 281 | // No elements? 282 | if (this.length == 0) 283 | return $this; 284 | 285 | // Multiple elements? 286 | if (this.length > 1) { 287 | 288 | for (var i=0; i < this.length; i++) 289 | $(this[i]).unscrollex(); 290 | 291 | return $this; 292 | 293 | } 294 | 295 | // Vars. 296 | var id, o; 297 | 298 | // Not scrollexed? 299 | id = $this.data('_scrollexId'); 300 | 301 | if (!id) 302 | return $this; 303 | 304 | // Get object from queue. 305 | o = queue[id]; 306 | 307 | // Clear timeout. 308 | window.clearTimeout(o.timeoutId); 309 | 310 | // Remove object from queue. 311 | delete queue[id]; 312 | 313 | // Remove scrollex ID from element. 314 | $this.removeData('_scrollexId'); 315 | 316 | // Call terminate. 317 | if (o.options.terminate) 318 | (o.options.terminate).apply(this); 319 | 320 | return $this; 321 | 322 | }; 323 | 324 | })(jQuery); -------------------------------------------------------------------------------- /demos/all-events.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Scrollex Demo: All Events 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 134 | 232 | 233 | 234 |
235 | 236 | 237 | 244 | 245 | 246 |
247 |
248 |

Item One

249 |

Amet vis lobortis vis blandit adipiscing varius accumsan orci lorem. Metus pellentesque amet faucibus lobortis Arcu donec vitae. Eleifend aliquam lobortis interdum id accumsan metus arcu suscipit enim id varius phasellus.

250 |
251 | 252 |
253 | 254 |
255 |
256 |

Item Two

257 |

Amet vis lobortis vis blandit adipiscing varius accumsan orci lorem. Metus pellentesque amet faucibus lobortis Arcu donec vitae. Eleifend aliquam lobortis interdum id accumsan metus arcu suscipit enim id varius phasellus.

258 |
259 | 260 |
261 | 262 |
263 |
264 |

Item Three

265 |

Amet vis lobortis vis blandit adipiscing varius accumsan orci lorem. Metus pellentesque amet faucibus lobortis Arcu donec vitae. Eleifend aliquam lobortis interdum id accumsan metus arcu suscipit enim id varius phasellus.

266 |
267 | 268 |
269 | 270 |
271 |
272 |

Item Four

273 |

Amet vis lobortis vis blandit adipiscing varius accumsan orci lorem. Metus pellentesque amet faucibus lobortis Arcu donec vitae. Eleifend aliquam lobortis interdum id accumsan metus arcu suscipit enim id varius phasellus.

274 |
275 | 276 |
277 | 278 | 279 | 282 | 283 |
284 | 285 | -------------------------------------------------------------------------------- /demos/enter-leave.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Scrollex Demo: Enter/Leave 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 32 | 61 | 62 | 63 |
64 | 65 | 66 | 70 | 71 | 72 |
73 |

Item One

74 |

Amet vis lobortis vis. Accumsan adipiscing ac a. Blandit adipiscing varius accumsan orci lorem. Metus pellentesque amet faucibus lobortis adipiscing integer faucibus nisl adipiscing vestibulum ac mi lobortis vis morbi nisi adipiscing nascetur vis ante mi adipiscing tempus erat nunc. Arcu donec vitae. Eleifend aliquam ante odio accumsan ut lorem lobortis interdum id accumsan metus arcu suscipit enim id varius phasellus ac adipiscing praesent faucibus accumsan mi lobortis praesent praesent nibh orci.

75 |

Nunc lacinia ante nunc ac lobortis. Interdum adipiscing gravida odio porttitor sem non mi integer non faucibus ornare mi ut ante amet placerat aliquet. Volutpat commodo eu sed ante lacinia. Sapien a lorem in integer ornare praesent commodo adipiscing arcu in massa commodo lorem accumsan at odio massa ac ac. Semper adipiscing varius montes viverra nibh in adipiscing gravida odio porttitor sem non mi integer non faucibus ornare mi ut ante amet placerat aliquet. Volutpat commodo eu sed ante lacinia. Sapien a lorem in integer ornare praesent commodo adipiscing arcu in massa commodo lorem accumsan at odio massa ac ac. Semper adipiscing varius montes viverra nibh in adipiscing blandit tempus accumsan.

76 |

Enim accumsan morbi ante accumsan lorem placerat lacinia penatibus commodo ac accumsan enim adipiscing eu nibh vis augue. Aliquam adipiscing semper ut mi lobortis nunc ac praesent accumsan. Commodo placerat amet enim commodo. Amet accumsan accumsan. Risus placerat non ac adipiscing accumsan aliquet lobortis ante laoreet accumsan enim quam. Interdum condimentum aliquet lorem tempus accumsan. Accumsan blandit ut integer ante amet nunc ac ultricies ac ac adipiscing adipiscing non integer placerat justo. Semper faucibus faucibus nunc praesent. Blandit commodo in col. Iaculis aliquet ac. Ultricies orci cubilia neque massa aliquet. Faucibus ac commodo sapien massa orci enim vitae lacus accumsan commodo at. Neque a adipiscing commodo integer lobortis erat ac. Ac aliquam gravida commodo posuere adipiscing non ante non massa nascetur. Risus in ante accumsan eu. Non morbi.

77 |

Nunc lacinia ante nunc ac lobortis. Interdum adipiscing gravida odio porttitor sem non mi integer non faucibus ornare mi ut ante amet placerat aliquet. Volutpat commodo eu sed ante lacinia. Sapien a lorem in integer ornare praesent commodo adipiscing arcu in massa commodo lorem accumsan at odio massa ac ac. Semper adipiscing varius montes viverra nibh in adipiscing gravida odio porttitor sem non mi integer non faucibus ornare mi ut ante amet placerat aliquet. Volutpat commodo eu sed ante lacinia. Sapien a lorem in integer ornare praesent commodo adipiscing arcu in massa commodo lorem accumsan at odio massa ac ac. Semper adipiscing varius montes viverra nibh in adipiscing blandit tempus accumsan.

78 |
79 | 80 |
81 |

Item Two

82 |

Amet vis lobortis vis. Accumsan adipiscing ac a. Blandit adipiscing varius accumsan orci lorem. Metus pellentesque amet faucibus lobortis adipiscing integer faucibus nisl adipiscing vestibulum ac mi lobortis vis morbi nisi adipiscing nascetur vis ante mi adipiscing tempus erat nunc. Arcu donec vitae. Eleifend aliquam ante odio accumsan ut lorem lobortis interdum id accumsan metus arcu suscipit enim id varius phasellus ac adipiscing praesent faucibus accumsan mi lobortis praesent praesent nibh orci.

83 |

Nunc lacinia ante nunc ac lobortis. Interdum adipiscing gravida odio porttitor sem non mi integer non faucibus ornare mi ut ante amet placerat aliquet. Volutpat commodo eu sed ante lacinia. Sapien a lorem in integer ornare praesent commodo adipiscing arcu in massa commodo lorem accumsan at odio massa ac ac. Semper adipiscing varius montes viverra nibh in adipiscing gravida odio porttitor sem non mi integer non faucibus ornare mi ut ante amet placerat aliquet. Volutpat commodo eu sed ante lacinia. Sapien a lorem in integer ornare praesent commodo adipiscing arcu in massa commodo lorem accumsan at odio massa ac ac. Semper adipiscing varius montes viverra nibh in adipiscing blandit tempus accumsan.

84 |

Enim accumsan morbi ante accumsan lorem placerat lacinia penatibus commodo ac accumsan enim adipiscing eu nibh vis augue. Aliquam adipiscing semper ut mi lobortis nunc ac praesent accumsan. Commodo placerat amet enim commodo. Amet accumsan accumsan. Risus placerat non ac adipiscing accumsan aliquet lobortis ante laoreet accumsan enim quam. Interdum condimentum aliquet lorem tempus accumsan. Accumsan blandit ut integer ante amet nunc ac ultricies ac ac adipiscing adipiscing non integer placerat justo. Semper faucibus faucibus nunc praesent. Blandit commodo in col. Iaculis aliquet ac. Ultricies orci cubilia neque massa aliquet. Faucibus ac commodo sapien massa orci enim vitae lacus accumsan commodo at. Neque a adipiscing commodo integer lobortis erat ac. Ac aliquam gravida commodo posuere adipiscing non ante non massa nascetur. Risus in ante accumsan eu. Non morbi.

85 |

Nunc lacinia ante nunc ac lobortis. Interdum adipiscing gravida odio porttitor sem non mi integer non faucibus ornare mi ut ante amet placerat aliquet. Volutpat commodo eu sed ante lacinia. Sapien a lorem in integer ornare praesent commodo adipiscing arcu in massa commodo lorem accumsan at odio massa ac ac. Semper adipiscing varius montes viverra nibh in adipiscing gravida odio porttitor sem non mi integer non faucibus ornare mi ut ante amet placerat aliquet. Volutpat commodo eu sed ante lacinia. Sapien a lorem in integer ornare praesent commodo adipiscing arcu in massa commodo lorem accumsan at odio massa ac ac. Semper adipiscing varius montes viverra nibh in adipiscing blandit tempus accumsan.

86 |
87 | 88 |
89 |

Item Three

90 |

Amet vis lobortis vis. Accumsan adipiscing ac a. Blandit adipiscing varius accumsan orci lorem. Metus pellentesque amet faucibus lobortis adipiscing integer faucibus nisl adipiscing vestibulum ac mi lobortis vis morbi nisi adipiscing nascetur vis ante mi adipiscing tempus erat nunc. Arcu donec vitae. Eleifend aliquam ante odio accumsan ut lorem lobortis interdum id accumsan metus arcu suscipit enim id varius phasellus ac adipiscing praesent faucibus accumsan mi lobortis praesent praesent nibh orci.

91 |

Nunc lacinia ante nunc ac lobortis. Interdum adipiscing gravida odio porttitor sem non mi integer non faucibus ornare mi ut ante amet placerat aliquet. Volutpat commodo eu sed ante lacinia. Sapien a lorem in integer ornare praesent commodo adipiscing arcu in massa commodo lorem accumsan at odio massa ac ac. Semper adipiscing varius montes viverra nibh in adipiscing gravida odio porttitor sem non mi integer non faucibus ornare mi ut ante amet placerat aliquet. Volutpat commodo eu sed ante lacinia. Sapien a lorem in integer ornare praesent commodo adipiscing arcu in massa commodo lorem accumsan at odio massa ac ac. Semper adipiscing varius montes viverra nibh in adipiscing blandit tempus accumsan.

92 |

Enim accumsan morbi ante accumsan lorem placerat lacinia penatibus commodo ac accumsan enim adipiscing eu nibh vis augue. Aliquam adipiscing semper ut mi lobortis nunc ac praesent accumsan. Commodo placerat amet enim commodo. Amet accumsan accumsan. Risus placerat non ac adipiscing accumsan aliquet lobortis ante laoreet accumsan enim quam. Interdum condimentum aliquet lorem tempus accumsan. Accumsan blandit ut integer ante amet nunc ac ultricies ac ac adipiscing adipiscing non integer placerat justo. Semper faucibus faucibus nunc praesent. Blandit commodo in col. Iaculis aliquet ac. Ultricies orci cubilia neque massa aliquet. Faucibus ac commodo sapien massa orci enim vitae lacus accumsan commodo at. Neque a adipiscing commodo integer lobortis erat ac. Ac aliquam gravida commodo posuere adipiscing non ante non massa nascetur. Risus in ante accumsan eu. Non morbi.

93 |

Nunc lacinia ante nunc ac lobortis. Interdum adipiscing gravida odio porttitor sem non mi integer non faucibus ornare mi ut ante amet placerat aliquet. Volutpat commodo eu sed ante lacinia. Sapien a lorem in integer ornare praesent commodo adipiscing arcu in massa commodo lorem accumsan at odio massa ac ac. Semper adipiscing varius montes viverra nibh in adipiscing gravida odio porttitor sem non mi integer non faucibus ornare mi ut ante amet placerat aliquet. Volutpat commodo eu sed ante lacinia. Sapien a lorem in integer ornare praesent commodo adipiscing arcu in massa commodo lorem accumsan at odio massa ac ac. Semper adipiscing varius montes viverra nibh in adipiscing blandit tempus accumsan.

94 |
95 | 96 |
97 |

Item Four

98 |

Amet vis lobortis vis. Accumsan adipiscing ac a. Blandit adipiscing varius accumsan orci lorem. Metus pellentesque amet faucibus lobortis adipiscing integer faucibus nisl adipiscing vestibulum ac mi lobortis vis morbi nisi adipiscing nascetur vis ante mi adipiscing tempus erat nunc. Arcu donec vitae. Eleifend aliquam ante odio accumsan ut lorem lobortis interdum id accumsan metus arcu suscipit enim id varius phasellus ac adipiscing praesent faucibus accumsan mi lobortis praesent praesent nibh orci.

99 |

Nunc lacinia ante nunc ac lobortis. Interdum adipiscing gravida odio porttitor sem non mi integer non faucibus ornare mi ut ante amet placerat aliquet. Volutpat commodo eu sed ante lacinia. Sapien a lorem in integer ornare praesent commodo adipiscing arcu in massa commodo lorem accumsan at odio massa ac ac. Semper adipiscing varius montes viverra nibh in adipiscing gravida odio porttitor sem non mi integer non faucibus ornare mi ut ante amet placerat aliquet. Volutpat commodo eu sed ante lacinia. Sapien a lorem in integer ornare praesent commodo adipiscing arcu in massa commodo lorem accumsan at odio massa ac ac. Semper adipiscing varius montes viverra nibh in adipiscing blandit tempus accumsan.

100 |

Enim accumsan morbi ante accumsan lorem placerat lacinia penatibus commodo ac accumsan enim adipiscing eu nibh vis augue. Aliquam adipiscing semper ut mi lobortis nunc ac praesent accumsan. Commodo placerat amet enim commodo. Amet accumsan accumsan. Risus placerat non ac adipiscing accumsan aliquet lobortis ante laoreet accumsan enim quam. Interdum condimentum aliquet lorem tempus accumsan. Accumsan blandit ut integer ante amet nunc ac ultricies ac ac adipiscing adipiscing non integer placerat justo. Semper faucibus faucibus nunc praesent. Blandit commodo in col. Iaculis aliquet ac. Ultricies orci cubilia neque massa aliquet. Faucibus ac commodo sapien massa orci enim vitae lacus accumsan commodo at. Neque a adipiscing commodo integer lobortis erat ac. Ac aliquam gravida commodo posuere adipiscing non ante non massa nascetur. Risus in ante accumsan eu. Non morbi.

101 |

Nunc lacinia ante nunc ac lobortis. Interdum adipiscing gravida odio porttitor sem non mi integer non faucibus ornare mi ut ante amet placerat aliquet. Volutpat commodo eu sed ante lacinia. Sapien a lorem in integer ornare praesent commodo adipiscing arcu in massa commodo lorem accumsan at odio massa ac ac. Semper adipiscing varius montes viverra nibh in adipiscing gravida odio porttitor sem non mi integer non faucibus ornare mi ut ante amet placerat aliquet. Volutpat commodo eu sed ante lacinia. Sapien a lorem in integer ornare praesent commodo adipiscing arcu in massa commodo lorem accumsan at odio massa ac ac. Semper adipiscing varius montes viverra nibh in adipiscing blandit tempus accumsan.

102 |
103 | 104 | 105 | 108 | 109 |
110 | 111 | -------------------------------------------------------------------------------- /demos/common.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /* Resets (http://meyerweb.com/eric/tools/css/reset/ | v2.0 | 20110126 | License: none (public domain)) */ 4 | 5 | html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block;}body{line-height:1;}ol,ul{list-style:none;}blockquote,q{quotes:none;}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;}table{border-collapse:collapse;border-spacing:0;}body{-webkit-text-size-adjust:none} 6 | 7 | /* Box Model */ 8 | 9 | *, *:before, *:after { 10 | -moz-box-sizing: border-box; 11 | -webkit-box-sizing: border-box; 12 | box-sizing: border-box; 13 | } 14 | 15 | /* Container */ 16 | 17 | .container { 18 | margin-left: auto; 19 | margin-right: auto; 20 | width: 960px; 21 | } 22 | 23 | /* Basic */ 24 | 25 | body { 26 | background: #2A2D3C; 27 | } 28 | 29 | body.is-loading *, body.is-loading *:before, body.is-loading *:after { 30 | -moz-animation: none !important; 31 | -webkit-animation: none !important; 32 | -o-animation: none !important; 33 | -ms-animation: none !important; 34 | animation: none !important; 35 | -moz-transition: none !important; 36 | -webkit-transition: none !important; 37 | -o-transition: none !important; 38 | -ms-transition: none !important; 39 | transition: none !important; 40 | } 41 | 42 | body, input, select, textarea { 43 | color: #AAABB1; 44 | color: rgba(255,255,255,0.6); 45 | font-family: Arial, Helvetica, sans-serif; 46 | font-size: 13pt; 47 | font-weight: normal; 48 | line-height: 1.65em; 49 | } 50 | 51 | a { 52 | color: #49bf9d; 53 | text-decoration: underline; 54 | } 55 | 56 | a:hover { 57 | text-decoration: none; 58 | } 59 | 60 | strong, b { 61 | color: #ffffff; 62 | font-weight: bold; 63 | } 64 | 65 | em, i { 66 | font-style: italic; 67 | } 68 | 69 | p { 70 | margin: 0 0 2em 0; 71 | } 72 | 73 | h1, h2, h3, h4, h5, h6 { 74 | color: #ffffff; 75 | font-weight: bold; 76 | line-height: 1em; 77 | margin: 0 0 1em 0; 78 | } 79 | 80 | h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { 81 | color: inherit; 82 | text-decoration: none; 83 | } 84 | 85 | h1 { 86 | font-size: 2em; 87 | line-height: 1.25em; 88 | } 89 | 90 | h2 { 91 | font-size: 1.75em; 92 | line-height: 1.5em; 93 | } 94 | 95 | h3 { 96 | font-size: 1.35em; 97 | line-height: 1.5em; 98 | } 99 | 100 | h4 { 101 | font-size: 1.1em; 102 | line-height: 1.5em; 103 | } 104 | 105 | h5 { 106 | font-size: 0.9em; 107 | line-height: 1.5em; 108 | } 109 | 110 | h6 { 111 | font-size: 0.7em; 112 | line-height: 1.5em; 113 | } 114 | 115 | sub { 116 | font-size: 0.8em; 117 | position: relative; 118 | top: 0.5em; 119 | } 120 | 121 | sup { 122 | font-size: 0.8em; 123 | position: relative; 124 | top: -0.5em; 125 | } 126 | 127 | hr { 128 | border: 0; 129 | border-bottom: solid 1px rgba(144, 144, 144, 0.25); 130 | margin: 2em 0; 131 | } 132 | 133 | hr.major { 134 | margin: 3em 0; 135 | } 136 | 137 | blockquote { 138 | border-left: solid 4px rgba(144, 144, 144, 0.25); 139 | font-style: italic; 140 | margin: 0 0 2em 0; 141 | padding: 0.5em 0 0.5em 2em; 142 | } 143 | 144 | pre { 145 | -webkit-overflow-scrolling: touch; 146 | background: rgba(144, 144, 144, 0.075); 147 | border-radius: 4px; 148 | border: solid 1px rgba(144, 144, 144, 0.25); 149 | font-family: "Courier New", monospace; 150 | font-size: 0.9em; 151 | line-height: 1.75em; 152 | margin: 0 0 2em 0; 153 | overflow-x: auto; 154 | padding: 1em 1.5em; 155 | } 156 | 157 | code { 158 | background: rgba(144, 144, 144, 0.075); 159 | border-radius: 4px; 160 | border: solid 1px rgba(144, 144, 144, 0.25); 161 | font-family: "Courier New", monospace; 162 | font-size: 0.9em; 163 | margin: 0 0.25em; 164 | padding: 0.25em 0.65em; 165 | } 166 | 167 | .align-left { 168 | text-align: left; 169 | } 170 | 171 | .align-center { 172 | text-align: center; 173 | } 174 | 175 | .align-right { 176 | text-align: right; 177 | } 178 | 179 | /* Section/Article */ 180 | 181 | section.special, article.special { 182 | text-align: center; 183 | } 184 | 185 | header p { 186 | color: #bbb; 187 | position: relative; 188 | margin: 0 0 1.5em 0; 189 | } 190 | 191 | header h1 + p { 192 | font-size: 1.35em; 193 | margin-top: -1em; 194 | line-height: 1.5em; 195 | } 196 | 197 | header h2 + p { 198 | font-size: 1.25em; 199 | margin-top: -1em; 200 | line-height: 1.5em; 201 | } 202 | 203 | header h3 + p { 204 | font-size: 1.1em; 205 | margin-top: -0.85em; 206 | line-height: 1.5em; 207 | } 208 | 209 | header h4 + p, 210 | header h5 + p, 211 | header h6 + p { 212 | font-size: 0.9em; 213 | margin-top: -0.75em; 214 | line-height: 1.5em; 215 | } 216 | 217 | /* Form */ 218 | 219 | form { 220 | margin: 0 0 2em 0; 221 | } 222 | 223 | label { 224 | color: #666; 225 | display: block; 226 | font-size: 0.9em; 227 | font-weight: bold; 228 | margin: 0 0 1em 0; 229 | } 230 | 231 | input[type="text"], 232 | input[type="password"], 233 | input[type="email"], 234 | select, 235 | textarea { 236 | -moz-appearance: none; 237 | -webkit-appearance: none; 238 | -o-appearance: none; 239 | -ms-appearance: none; 240 | appearance: none; 241 | background: rgba(144, 144, 144, 0.075); 242 | border-radius: 4px; 243 | border: none; 244 | border: solid 1px rgba(144, 144, 144, 0.25); 245 | color: inherit; 246 | display: block; 247 | outline: 0; 248 | padding: 0 1em; 249 | text-decoration: none; 250 | width: 100%; 251 | } 252 | 253 | input[type="text"]:invalid, 254 | input[type="password"]:invalid, 255 | input[type="email"]:invalid, 256 | select:invalid, 257 | textarea:invalid { 258 | box-shadow: none; 259 | } 260 | 261 | input[type="text"]:focus, 262 | input[type="password"]:focus, 263 | input[type="email"]:focus, 264 | select:focus, 265 | textarea:focus { 266 | border-color: #49bf9d; 267 | box-shadow: 0 0 0 1px #49bf9d; 268 | } 269 | 270 | .select-wrapper { 271 | text-decoration: none; 272 | display: block; 273 | position: relative; 274 | } 275 | 276 | .select-wrapper:before { 277 | content: ""; 278 | -moz-osx-font-smoothing: grayscale; 279 | -webkit-font-smoothing: antialiased; 280 | font-family: FontAwesome; 281 | font-style: normal; 282 | font-weight: normal; 283 | text-transform: none !important; 284 | } 285 | 286 | .select-wrapper:before { 287 | color: rgba(144, 144, 144, 0.25); 288 | display: block; 289 | height: 2.75em; 290 | line-height: 2.75em; 291 | pointer-events: none; 292 | position: absolute; 293 | right: 0; 294 | text-align: center; 295 | top: 0; 296 | width: 2.75em; 297 | } 298 | 299 | .select-wrapper select::-ms-expand { 300 | display: none; 301 | } 302 | 303 | input[type="text"], 304 | input[type="password"], 305 | input[type="email"], 306 | select { 307 | height: 2.75em; 308 | } 309 | 310 | textarea { 311 | padding: 0.75em 1em; 312 | } 313 | 314 | input[type="checkbox"], 315 | input[type="radio"] { 316 | -moz-appearance: none; 317 | -webkit-appearance: none; 318 | -o-appearance: none; 319 | -ms-appearance: none; 320 | appearance: none; 321 | display: block; 322 | float: left; 323 | margin-right: -2em; 324 | opacity: 0; 325 | width: 1em; 326 | z-index: -1; 327 | } 328 | 329 | input[type="checkbox"] + label, 330 | input[type="radio"] + label { 331 | text-decoration: none; 332 | color: #444; 333 | cursor: pointer; 334 | display: inline-block; 335 | font-size: 1em; 336 | font-weight: normal; 337 | padding-left: 2.4em; 338 | padding-right: 0.75em; 339 | position: relative; 340 | } 341 | 342 | input[type="checkbox"] + label:before, 343 | input[type="radio"] + label:before { 344 | -moz-osx-font-smoothing: grayscale; 345 | -webkit-font-smoothing: antialiased; 346 | font-family: FontAwesome; 347 | font-style: normal; 348 | font-weight: normal; 349 | text-transform: none !important; 350 | } 351 | 352 | input[type="checkbox"] + label:before, 353 | input[type="radio"] + label:before { 354 | background: rgba(144, 144, 144, 0.075); 355 | border-radius: 4px; 356 | border: solid 1px rgba(144, 144, 144, 0.25); 357 | content: ''; 358 | display: inline-block; 359 | height: 1.65em; 360 | left: 0; 361 | line-height: 1.58125em; 362 | position: absolute; 363 | text-align: center; 364 | top: 0; 365 | width: 1.65em; 366 | } 367 | 368 | input[type="checkbox"]:checked + label:before, 369 | input[type="radio"]:checked + label:before { 370 | background: #666666; 371 | border-color: #666666; 372 | color: #ffffff; 373 | content: '\f00c'; 374 | } 375 | 376 | input[type="checkbox"]:focus + label:before, 377 | input[type="radio"]:focus + label:before { 378 | border-color: #49bf9d; 379 | box-shadow: 0 0 0 1px #49bf9d; 380 | } 381 | 382 | input[type="checkbox"] + label:before { 383 | border-radius: 4px; 384 | } 385 | 386 | input[type="radio"] + label:before { 387 | border-radius: 100%; 388 | } 389 | 390 | ::-webkit-input-placeholder { 391 | color: #bbb !important; 392 | opacity: 1.0; 393 | } 394 | 395 | :-moz-placeholder { 396 | color: #bbb !important; 397 | opacity: 1.0; 398 | } 399 | 400 | ::-moz-placeholder { 401 | color: #bbb !important; 402 | opacity: 1.0; 403 | } 404 | 405 | :-ms-input-placeholder { 406 | color: #bbb !important; 407 | opacity: 1.0; 408 | } 409 | 410 | .formerize-placeholder { 411 | color: #bbb !important; 412 | opacity: 1.0; 413 | } 414 | 415 | /* Box */ 416 | 417 | .box { 418 | border-radius: 4px; 419 | border: solid 1px rgba(144, 144, 144, 0.25); 420 | margin-bottom: 2em; 421 | padding: 1.5em; 422 | } 423 | 424 | .box > :last-child, 425 | .box > :last-child > :last-child, 426 | .box > :last-child > :last-child > :last-child { 427 | margin-bottom: 0; 428 | } 429 | 430 | .box.alt { 431 | border: 0; 432 | border-radius: 0; 433 | padding: 0; 434 | } 435 | 436 | /* Icon */ 437 | 438 | .icon { 439 | text-decoration: none; 440 | border-bottom: none; 441 | position: relative; 442 | } 443 | 444 | .icon:before { 445 | -moz-osx-font-smoothing: grayscale; 446 | -webkit-font-smoothing: antialiased; 447 | font-family: FontAwesome; 448 | font-style: normal; 449 | font-weight: normal; 450 | text-transform: none !important; 451 | } 452 | 453 | .icon > .label { 454 | display: none; 455 | } 456 | 457 | /* Image */ 458 | 459 | .image { 460 | border-radius: 4px; 461 | border: 0; 462 | display: inline-block; 463 | position: relative; 464 | } 465 | 466 | .image img { 467 | border-radius: 4px; 468 | display: block; 469 | } 470 | 471 | .image.left { 472 | float: left; 473 | padding: 0 1.5em 1em 0; 474 | top: 0.25em; 475 | } 476 | 477 | .image.right { 478 | float: right; 479 | padding: 0 0 1em 1.5em; 480 | top: 0.25em; 481 | } 482 | 483 | .image.fit { 484 | display: block; 485 | margin: 0 0 2em 0; 486 | width: 100%; 487 | } 488 | 489 | .image.fit img { 490 | display: block; 491 | width: 100%; 492 | } 493 | 494 | /* List */ 495 | 496 | ol { 497 | list-style: decimal; 498 | margin: 0 0 2em 0; 499 | padding-left: 1.25em; 500 | } 501 | 502 | ol li { 503 | padding-left: 0.25em; 504 | } 505 | 506 | ul { 507 | list-style: disc; 508 | margin: 0 0 2em 0; 509 | padding-left: 1em; 510 | } 511 | 512 | ul li { 513 | padding-left: 0.5em; 514 | } 515 | 516 | ul.alt { 517 | list-style: none; 518 | padding-left: 0; 519 | } 520 | 521 | ul.alt li { 522 | border-top: solid 1px rgba(144, 144, 144, 0.25); 523 | padding: 0.5em 0; 524 | } 525 | 526 | ul.alt li:first-child { 527 | border-top: 0; 528 | padding-top: 0; 529 | } 530 | 531 | ul.icons { 532 | cursor: default; 533 | list-style: none; 534 | padding-left: 0; 535 | } 536 | 537 | ul.icons li { 538 | display: inline-block; 539 | padding: 0 1em 0 0; 540 | } 541 | 542 | ul.icons li:last-child { 543 | padding-right: 0; 544 | } 545 | 546 | ul.icons li .icon:before { 547 | font-size: 2em; 548 | } 549 | 550 | ul.actions { 551 | cursor: default; 552 | list-style: none; 553 | padding-left: 0; 554 | } 555 | 556 | ul.actions li { 557 | display: inline-block; 558 | padding: 0 1em 0 0; 559 | vertical-align: middle; 560 | } 561 | 562 | ul.actions li:last-child { 563 | padding-right: 0; 564 | } 565 | 566 | ul.actions.small li { 567 | padding: 0 0.5em 0 0; 568 | } 569 | 570 | ul.actions.vertical li { 571 | display: block; 572 | padding: 1em 0 0 0; 573 | } 574 | 575 | ul.actions.vertical li:first-child { 576 | padding-top: 0; 577 | } 578 | 579 | ul.actions.vertical li > * { 580 | margin-bottom: 0; 581 | } 582 | 583 | ul.actions.vertical.small li { 584 | padding: 0.5em 0 0 0; 585 | } 586 | 587 | ul.actions.vertical.small li:first-child { 588 | padding-top: 0; 589 | } 590 | 591 | ul.actions.fit { 592 | display: table; 593 | margin-left: -1em; 594 | padding: 0; 595 | table-layout: fixed; 596 | width: calc(100% + 1em); 597 | } 598 | 599 | ul.actions.fit li { 600 | display: table-cell; 601 | padding: 0 0 0 1em; 602 | } 603 | 604 | ul.actions.fit li > * { 605 | margin-bottom: 0; 606 | } 607 | 608 | ul.actions.fit.small { 609 | margin-left: -0.5em; 610 | width: calc(100% + 0.5em); 611 | } 612 | 613 | ul.actions.fit.small li { 614 | padding: 0 0 0 0.5em; 615 | } 616 | 617 | dl { 618 | margin: 0 0 2em 0; 619 | } 620 | 621 | /* Table */ 622 | 623 | .table-wrapper { 624 | -webkit-overflow-scrolling: touch; 625 | overflow-x: auto; 626 | } 627 | 628 | table { 629 | margin: 0 0 2em 0; 630 | width: 100%; 631 | } 632 | 633 | table tbody tr { 634 | border: solid 1px rgba(144, 144, 144, 0.25); 635 | border-left: 0; 636 | border-right: 0; 637 | } 638 | 639 | table tbody tr:nth-child(2n + 1) { 640 | background-color: rgba(144, 144, 144, 0.075); 641 | } 642 | 643 | table td { 644 | padding: 0.75em 0.75em; 645 | } 646 | 647 | table th { 648 | color: #666; 649 | font-size: 0.9em; 650 | font-weight: bold; 651 | padding: 0 0.75em 0.75em 0.75em; 652 | text-align: left; 653 | } 654 | 655 | table thead { 656 | border-bottom: solid 2px rgba(144, 144, 144, 0.25); 657 | } 658 | 659 | table tfoot { 660 | border-top: solid 2px rgba(144, 144, 144, 0.25); 661 | } 662 | 663 | table.alt { 664 | border-collapse: separate; 665 | } 666 | 667 | table.alt tbody tr td { 668 | border: solid 1px rgba(144, 144, 144, 0.25); 669 | border-left-width: 0; 670 | border-top-width: 0; 671 | } 672 | 673 | table.alt tbody tr td:first-child { 674 | border-left-width: 1px; 675 | } 676 | 677 | table.alt tbody tr:first-child td { 678 | border-top-width: 1px; 679 | } 680 | 681 | table.alt thead { 682 | border-bottom: 0; 683 | } 684 | 685 | table.alt tfoot { 686 | border-top: 0; 687 | } 688 | 689 | /* Button */ 690 | 691 | input[type="submit"], 692 | input[type="reset"], 693 | input[type="button"], 694 | .button { 695 | -moz-appearance: none; 696 | -webkit-appearance: none; 697 | -o-appearance: none; 698 | -ms-appearance: none; 699 | appearance: none; 700 | -moz-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out; 701 | -webkit-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out; 702 | -o-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out; 703 | -ms-transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out; 704 | transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out; 705 | background-color: #666666; 706 | border-radius: 4px; 707 | border: 0; 708 | color: #ffffff !important; 709 | cursor: pointer; 710 | display: inline-block; 711 | font-weight: bold; 712 | height: 2.85em; 713 | line-height: 2.95em; 714 | padding: 0 1.5em; 715 | text-align: center; 716 | text-decoration: none; 717 | white-space: nowrap; 718 | } 719 | 720 | input[type="submit"]:hover, 721 | input[type="reset"]:hover, 722 | input[type="button"]:hover, 723 | .button:hover { 724 | background-color: #737373; 725 | } 726 | 727 | input[type="submit"]:active, 728 | input[type="reset"]:active, 729 | input[type="button"]:active, 730 | .button:active { 731 | background-color: #595959; 732 | } 733 | 734 | input[type="submit"].icon, 735 | input[type="reset"].icon, 736 | input[type="button"].icon, 737 | .button.icon { 738 | padding-left: 1.35em; 739 | } 740 | 741 | input[type="submit"].icon:before, 742 | input[type="reset"].icon:before, 743 | input[type="button"].icon:before, 744 | .button.icon:before { 745 | margin-right: 0.5em; 746 | } 747 | 748 | input[type="submit"].fit, 749 | input[type="reset"].fit, 750 | input[type="button"].fit, 751 | .button.fit { 752 | display: block; 753 | margin: 0 0 1em 0; 754 | width: 100%; 755 | } 756 | 757 | input[type="submit"].small, 758 | input[type="reset"].small, 759 | input[type="button"].small, 760 | .button.small { 761 | font-size: 0.8em; 762 | } 763 | 764 | input[type="submit"].big, 765 | input[type="reset"].big, 766 | input[type="button"].big, 767 | .button.big { 768 | font-size: 1.35em; 769 | } 770 | 771 | input[type="submit"].alt, 772 | input[type="reset"].alt, 773 | input[type="button"].alt, 774 | .button.alt { 775 | background-color: transparent; 776 | box-shadow: inset 0 0 0 2px rgba(144, 144, 144, 0.25); 777 | color: #666 !important; 778 | } 779 | 780 | input[type="submit"].alt:hover, 781 | input[type="reset"].alt:hover, 782 | input[type="button"].alt:hover, 783 | .button.alt:hover { 784 | background-color: rgba(144, 144, 144, 0.075); 785 | } 786 | 787 | input[type="submit"].alt:active, 788 | input[type="reset"].alt:active, 789 | input[type="button"].alt:active, 790 | .button.alt:active { 791 | background-color: rgba(144, 144, 144, 0.2); 792 | } 793 | 794 | input[type="submit"].alt.icon:before, 795 | input[type="reset"].alt.icon:before, 796 | input[type="button"].alt.icon:before, 797 | .button.alt.icon:before { 798 | color: #bbb; 799 | } 800 | 801 | input[type="submit"].special, 802 | input[type="reset"].special, 803 | input[type="button"].special, 804 | .button.special { 805 | background-color: #49bf9d; 806 | color: #ffffff !important; 807 | } 808 | 809 | input[type="submit"].special:hover, 810 | input[type="reset"].special:hover, 811 | input[type="button"].special:hover, 812 | .button.special:hover { 813 | background-color: #5cc6a7; 814 | } 815 | 816 | input[type="submit"].special:active, 817 | input[type="reset"].special:active, 818 | input[type="button"].special:active, 819 | .button.special:active { 820 | background-color: #3eb08f; 821 | } 822 | 823 | input[type="submit"].disabled, input[type="submit"]:disabled, 824 | input[type="reset"].disabled, 825 | input[type="reset"]:disabled, 826 | input[type="button"].disabled, 827 | input[type="button"]:disabled, 828 | .button.disabled, 829 | .button:disabled { 830 | background-color: #444 !important; 831 | box-shadow: inset 0 -0.15em 0 0 rgba(0, 0, 0, 0.15); 832 | color: #fff !important; 833 | cursor: default; 834 | opacity: 0.25; 835 | } 836 | 837 | /* Thumbnail */ 838 | 839 | .thumbnail { 840 | display: block; 841 | width: 100%; 842 | background: #eee; 843 | border-radius: 4px; 844 | text-align: center; 845 | color: #aaa; 846 | font-size: 1.25em; 847 | padding: 1.75em 0; 848 | white-space: nowrap; 849 | } 850 | 851 | /* Main */ 852 | 853 | #main { 854 | padding: 4em 0; 855 | } 856 | 857 | /* Header */ 858 | 859 | #header { 860 | text-align: center; 861 | } 862 | 863 | /* Footer */ 864 | 865 | #footer { 866 | margin: 3em 0 0 0; 867 | padding: 0 0 3em 0; 868 | text-align: center; 869 | } 870 | 871 | #footer a { 872 | color: inherit; 873 | } --------------------------------------------------------------------------------