Used to provide structural templates.
Pattern
t-template-name
t-template-name--modifier-name
t-template-name__subcomponent-name--subcomponent-modifier-name
| // JS Module Pattern: | |
| // http://j.mp/module-pattern | |
| // Redefine: $, window, document, undefined. | |
| var APP = (function($, window, document, undefined) { | |
| // Automatically calls all functions in APP.init | |
| $(document).ready(function() { | |
| APP.go(); | |
| }); |
| /** | |
| * Scrolling shadows by @kizmarh and @leaverou | |
| * Only works in browsers supporting background-attachment: local; & CSS gradients | |
| * Degrades gracefully | |
| */ | |
| html { | |
| background: white; | |
| font: 120% sans-serif; | |
| } |
| /* Scrolling shadows by @kizmarh */ | |
| html { | |
| background: #FFF; | |
| } | |
| .scrollbox { | |
| position: relative; | |
| z-index: 1; |
| /* Butt. */ | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| -webkit-box-sizing: border-box; | |
| -moz-box-sizing: border-box; | |
| box-sizing: border-box; | |
| } | |
| /* Multi-directional hover by @kizmarh */ | |
| .b-block { | |
| position: relative; | |
| display: inline-block; | |
| overflow: hidden; | |
| width: 10em; | |
| height: 10em; |
| /** | |
| * Vertical centering with Flexbox + margin fallback | |
| * Lea Verou & David Storey | |
| */ | |
| html, body { height: 100%; } | |
| body { | |
| width: 100%; /* needed for FF */ | |
| margin: 0; |
| /* CSS States */ | |
| body { | |
| background: url(http://dabblet.com/img/noise.png); | |
| background-color: #F5F2F0; | |
| font-family: Georgia, serif; | |
| font-size: 18px; | |
| line-height: 1.6em; | |
| text-shadow: 0 2px 0 white; | |
| color: #222; | |
| } |
| <html> | |
| <head> | |
| <title>Scrolling along the Z-Axis</title> | |
| <!-- | |
| Example from http://eng.wealthfront.com/2012/03/scrolling-z-axis-with-css-3d-transforms.html | |
| Assumes browser window is sized at a height of 400px (the size of the black box). | |
| --> | |
| <style> | |
| body{height:600px;} | |
| #viewport { |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| } | |
| html { | |
| background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAVUlEQVQYGV2OgQ0AIQgDu4ZzMKBDMSBPeTEVEyQEri0AWESAlW9nLZm9F8alLFbOXlB9P6lK3krZH5JKRR6QSsNzZpJLJW+mDnk9ZyZaKEnPzaNzaB+YaWuR6GfrqQAAAABJRU5ErkJggg==), | |
| linear-gradient(#456,#123); | |
| min-height: 100%; |