├── .editorconfig ├── .eslintrc ├── .gitattributes ├── .gitignore ├── .scss-lint.yml ├── README.md ├── assets └── img │ ├── github.png │ └── title.jpg ├── bower.json ├── bower_components └── normalize-scss │ ├── .bower.json │ ├── LICENSE.md │ ├── README.md │ ├── _normalize.scss │ └── bower.json ├── css ├── custom.css ├── custom.css.map └── fonts │ ├── robotoslab-bold-webfont.eot │ ├── robotoslab-bold-webfont.svg │ ├── robotoslab-bold-webfont.ttf │ ├── robotoslab-bold-webfont.woff │ ├── robotoslab-regular-webfont.eot │ ├── robotoslab-regular-webfont.svg │ ├── robotoslab-regular-webfont.ttf │ ├── robotoslab-regular-webfont.woff │ ├── titilliumweb-bold-webfont.eot │ ├── titilliumweb-bold-webfont.svg │ ├── titilliumweb-bold-webfont.ttf │ ├── titilliumweb-bold-webfont.woff │ ├── titilliumweb-regular-webfont.eot │ ├── titilliumweb-regular-webfont.svg │ ├── titilliumweb-regular-webfont.ttf │ └── titilliumweb-regular-webfont.woff ├── favicon.gif ├── favicon.ico ├── index.html ├── js ├── jquery.min.js ├── main.js └── modernizr.custom.20463.js ├── package.json ├── sass-update.bat ├── sass-update.sh ├── sass-watch.bat ├── sass-watch.sh └── sass ├── base ├── __base.scss ├── _config.scss ├── project │ ├── __project.scss │ ├── _fonts.scss │ ├── _globals.scss │ ├── _mixins.scss │ └── _variables.scss └── utils │ ├── __utils.scss │ ├── _mixins.scss │ └── _system.scss ├── components ├── __components.scss ├── example │ ├── _example.scss │ └── _skins │ │ └── _alt.scss ├── responsiveTabs │ └── _responsiveTabs.scss └── tabs │ └── _tabs.scss ├── custom.scss ├── specifics ├── __specifics.scss ├── _buttons.scss ├── _footer.scss ├── _main.scss ├── _nav.scss └── _sample.scss └── vendor ├── __vendor.scss └── _normalize.scss /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | 8 | [*] 9 | 10 | # Change these settings to your own preference 11 | indent_style = space 12 | indent_size = 2 13 | 14 | # We recommend you to keep these unchanged 15 | charset = utf-8 16 | trim_trailing_whitespace = true 17 | insert_final_newline = true 18 | 19 | [*.md] 20 | trim_trailing_whitespace = false 21 | 22 | [*.html] 23 | indent_size = 4 24 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | 4 | //EcmaScript rules 5 | "strict": [2, "global"], //IMPORTANT controls location of Use Strict Directives. But not mandatory because it's managed by browserify 6 | "no-console":2, //IMPORTANT disallow use of console 7 | "no-unused-vars":0,//WARNING disallow declaration of variables that are not used in the code 8 | "no-reserved-keys": 2,//IMPORTANT - disallow reserved words being used as object literal keys (off by default) 9 | "no-undef":2,//WARNING disallow use of undeclared variables unless mentioned in a /*global */ block 10 | "camelcase":1,//WARNING when you do not put camelcase on your code 11 | "no-multi-spaces":1,//WARNING disallow use of multiple spaces 12 | "valid-jsdoc":1,//WARNING Ensure JSDoc comments are valid 13 | "no-underscore-dangle": 0, //WARNING disallow dangling underscores in identifiers 14 | "no-extra-parens": 0,//WARNING disallow unnecessary parentheses 15 | "quotes":0,//NOT specify whether double or single quotes should be used 16 | "comma-spacing":0, //NOT enforce spacing before and after comma 17 | "space-infix-ops":0, //NOT require spaces around operators 18 | "key-spacing":0, //NOT enforces spacing between keys and values in object literal properties 19 | "eol-last":0, //NOT enforce newline at the end of file, with no multiple empty lines 20 | "no-use-before-define": 0, 21 | "consistent-return": 0, 22 | "no-shadow": 1, 23 | "no-unreachable": 1 24 | 25 | }, 26 | "globals": { 27 | "jasmine": true, 28 | "describe": true, 29 | "xdescribe": true, 30 | "it": true, 31 | "xit": true, 32 | "inject": true, 33 | "expect": true, 34 | "beforeEach": true, 35 | "afterEach": true, 36 | "spyOn": true 37 | }, 38 | "env":{ 39 | "node": true, //node environment to authorize module and require 40 | "browser": true //browser environment to authorize document and window keywords 41 | }, 42 | "plugins": [ 43 | 44 | ], 45 | "ecmaFeatures": { 46 | "arrowFunctions": true, // enable arrow functions 47 | "binaryLiterals": true, // enable binary literals 48 | "blockBindings": true, // enable let and const (aka block bindings) 49 | "classes": true, // enable classes 50 | "defaultParams": true, // enable default function parameters 51 | "destructuring": true, // enable destructuring 52 | "forOf": true, // enable for-of loops 53 | "generators": true, // enable generators 54 | "modules": false, // enable modules and global strict mode 55 | "objectLiteralComputedProperties": true, // enable computed object literal property names 56 | "objectLiteralDuplicateProperties": false, // enable duplicate object literal properties in strict mode 57 | "objectLiteralShorthandMethods": true, // enable object literal shorthand methods 58 | "objectLiteralShorthandProperties": true, // enable object literal shorthand properties 59 | "octalLiterals": true, // enable octal literals 60 | "regexUFlag": false, // enable the regular expression u flag 61 | "regexYFlag": false, // enable the regular expression y flag 62 | "spread": true, // enable the spread operator 63 | "superInFunctions": false, // enable super references inside of functions 64 | "templateStrings": true, // enable template strings 65 | "unicodeCodePointEscapes": true, // enable code point escapes 66 | "globalReturn": false // allow return statements in the global scope 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Set the default behavior, in case people don't have core.autocrlf set. 2 | * text=auto 3 | 4 | # Explicitly declare text files you want to always be normalized and converted 5 | # to native line endings on checkout. 6 | *.js text 7 | *.html text 8 | *.md text 9 | *.json text 10 | *.scss text 11 | *.css text 12 | *.cmd text 13 | *.sh text 14 | 15 | # Declare files that will always have CRLF line endings on checkout. 16 | *.sln text eol=crlf 17 | 18 | # Denote all files that are truly binary and should not be modified. 19 | 20 | *.png binary -delta 21 | *.jpg binary -delta 22 | *.jpeg binary -delta 23 | *.gif binary -delta 24 | 25 | *.eot binary -delta 26 | *.svg binary -delta 27 | *.ttf binary -delta 28 | *.woff binary -delta 29 | *.woff2 binary -delta 30 | 31 | *.mp4 binary -delta 32 | *.mp3 binary -delta 33 | *.zip binary -delta -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .DS_Store 3 | .sass-cache 4 | node_modules 5 | libs 6 | dist 7 | temp 8 | build 9 | custom.css 10 | css/components 11 | -------------------------------------------------------------------------------- /.scss-lint.yml: -------------------------------------------------------------------------------- 1 | # Default application configuration that all configurations inherit from. 2 | 3 | scss_files: "**/*.scss" 4 | 5 | linters: 6 | BangFormat: 7 | enabled: true 8 | space_before_bang: true 9 | space_after_bang: false 10 | severity: error 11 | 12 | BorderZero: 13 | enabled: true 14 | convention: zero # or `none` 15 | severity: error 16 | 17 | ColorKeyword: 18 | enabled: true 19 | severity: warning 20 | 21 | ColorVariable: 22 | enabled: true 23 | severity: warning 24 | 25 | Comment: 26 | enabled: false 27 | severity: warning 28 | 29 | DebugStatement: 30 | enabled: true 31 | severity: error 32 | 33 | DeclarationOrder: 34 | enabled: true 35 | severity: warning 36 | 37 | DuplicateProperty: 38 | enabled: true 39 | severity: error 40 | 41 | ElsePlacement: 42 | enabled: true 43 | style: same_line # or 'new_line' 44 | severity: error 45 | 46 | EmptyLineBetweenBlocks: 47 | enabled: true 48 | ignore_single_line_blocks: true 49 | severity: error 50 | 51 | EmptyRule: 52 | enabled: true 53 | severity: warning 54 | 55 | FinalNewline: 56 | enabled: true 57 | present: true 58 | severity: error 59 | 60 | HexLength: 61 | enabled: false 62 | style: short # or 'long' 63 | severity: warning 64 | 65 | HexNotation: 66 | enabled: true 67 | style: lowercase # or 'uppercase' 68 | severity: error 69 | 70 | HexValidation: 71 | enabled: true 72 | severity: error 73 | 74 | IdSelector: 75 | enabled: true 76 | severity: error 77 | 78 | ImportantRule: 79 | enabled: true 80 | severity: warning 81 | 82 | ImportPath: 83 | enabled: false 84 | leading_underscore: true 85 | filename_extension: false 86 | severity: warning 87 | 88 | Indentation: 89 | enabled: true 90 | allow_non_nested_indentation: false 91 | character: space # or 'tab' 92 | width: 2 93 | severity: error 94 | 95 | LeadingZero: 96 | enabled: true 97 | style: exclude_zero # or 'include_zero' 98 | severity: error 99 | 100 | MergeableSelector: 101 | enabled: true 102 | force_nesting: false 103 | severity: warning 104 | 105 | NameFormat: 106 | enabled: false 107 | allow_leading_underscore: true 108 | convention: hyphenated_lowercase # or 'BEM', or a regex pattern 109 | severity: error 110 | 111 | NestingDepth: 112 | enabled: true 113 | max_depth: 3 114 | severity: error 115 | 116 | PlaceholderInExtend: 117 | enabled: true 118 | severity: warning 119 | 120 | PropertyCount: 121 | enabled: false 122 | include_nested: false 123 | max_properties: 10 124 | severity: warning 125 | 126 | PropertySortOrder: 127 | enabled: true 128 | order: concentric 129 | ignore_unspecified: false 130 | separate_groups: false 131 | severity: warning 132 | 133 | PropertySpelling: 134 | enabled: true 135 | extra_properties: [] 136 | severity: error 137 | 138 | QualifyingElement: 139 | enabled: true 140 | allow_element_with_attribute: false 141 | allow_element_with_class: false 142 | allow_element_with_id: false 143 | severity: warning 144 | 145 | SelectorDepth: 146 | enabled: true 147 | max_depth: 3 148 | severity: error 149 | 150 | SelectorFormat: 151 | enabled: true 152 | convention: ^([a-zA-Z]([a-zA-Z0-9])+(_[a-zA-Z]+)*(--[a-zA-Z])*)|(_is_([a-zA-Z0-9]){2,})$ #hyphenated_lowercase # or 'BEM', or 'hyphenated_BEM', or 'snake_case', or 'camel_case', or a regex pattern 153 | severity: warning 154 | 155 | Shorthand: 156 | enabled: true 157 | severity: warning 158 | 159 | SingleLinePerProperty: 160 | enabled: true 161 | allow_single_line_rule_sets: true 162 | severity: warning 163 | 164 | SingleLinePerSelector: 165 | enabled: true 166 | severity: error 167 | 168 | SpaceAfterComma: 169 | enabled: true 170 | severity: error 171 | 172 | SpaceAfterPropertyColon: 173 | enabled: true 174 | style: one_space # or 'no_space', or 'at_least_one_space', or 'aligned' 175 | severity: error 176 | 177 | SpaceAfterPropertyName: 178 | enabled: true 179 | severity: error 180 | 181 | SpaceBeforeBrace: 182 | enabled: true 183 | style: space # or 'new_line' 184 | allow_single_line_padding: false 185 | severity: error 186 | 187 | SpaceBetweenParens: 188 | enabled: true 189 | spaces: 0 190 | severity: error 191 | 192 | StringQuotes: 193 | enabled: true 194 | style: single_quotes # or double_quotes 195 | severity: warning 196 | 197 | TrailingSemicolon: 198 | enabled: true 199 | severity: error 200 | 201 | TrailingZero: 202 | enabled: false 203 | severity: warning 204 | 205 | UnnecessaryMantissa: 206 | enabled: true 207 | severity: warning 208 | 209 | UnnecessaryParentReference: 210 | enabled: true 211 | severity: warning 212 | 213 | UrlFormat: 214 | enabled: true 215 | severity: warning 216 | 217 | UrlQuotes: 218 | enabled: true 219 | severity: warning 220 | 221 | VariableForProperty: 222 | enabled: true 223 | properties: [] 224 | severity: warning 225 | 226 | VendorPrefixes: 227 | enabled: false 228 | severity: warning 229 | 230 | VendorPrefix: 231 | enabled: false 232 | identifier_list: base 233 | additional_identifiers: [] 234 | excluded_identifiers: [] 235 | severity: warning 236 | 237 | ZeroUnit: 238 | enabled: true 239 | severity: warning 240 | 241 | Compass::*: 242 | enabled: false 243 | severity: warning 244 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | DoCSSa {dok~sa} 2 | =============== 3 | 4 | DoCSSa - Sass based CSS architecture and methodology 5 | 6 | See it live at [mlarcher.github.io/docssa](http://mlarcher.github.io/docssa/) 7 | 8 | Note: even though DoCSSa's principles can be used with any version of Sass, some parts of the provided implementation 9 | rely on the 3.3 version (i.e. the crossmedia placeholders feature). DoCSSa is all about guidelines though, so feel free 10 | to adapt it as needed. 11 | 12 | ## Creators 13 | 14 | **Matthieu Larcher** 15 | 16 | - 17 | - 18 | 19 | **Fabien Zibi** 20 | 21 | - 22 | - 23 | -------------------------------------------------------------------------------- /assets/img/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlarcher/docssa/b87ec75ac28fc55c0946ba73100a85ca3964d213/assets/img/github.png -------------------------------------------------------------------------------- /assets/img/title.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlarcher/docssa/b87ec75ac28fc55c0946ba73100a85ca3964d213/assets/img/title.jpg -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "DoCSSa", 3 | "version": "2.0.0-rc1", 4 | "authors": [ 5 | "Matthieu Larcher " 6 | ], 7 | "license": "MIT", 8 | "dependencies": { 9 | "normalize-scss": "^3.0.2" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /bower_components/normalize-scss/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "normalize-scss", 3 | "version": "3.0.3", 4 | "main": "_normalize.scss", 5 | "author": [ 6 | "Nicolas Gallagher", 7 | "Bo-Yi Wu" 8 | ], 9 | "ignore": [ 10 | "CHANGELOG.md", 11 | "CONTRIBUTING.md", 12 | "component.json", 13 | "package.json", 14 | "test.html" 15 | ], 16 | "homepage": "https://github.com/appleboy/normalize.scss", 17 | "_release": "3.0.3", 18 | "_resolution": { 19 | "type": "version", 20 | "tag": "3.0.3", 21 | "commit": "4ee72d3f188dfce71a99d4214d7f873acd74cf56" 22 | }, 23 | "_source": "git://github.com/appleboy/normalize.scss.git", 24 | "_target": "^3.0.2", 25 | "_originalSource": "normalize-scss" 26 | } -------------------------------------------------------------------------------- /bower_components/normalize-scss/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) Nicolas Gallagher and Jonathan Neal 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /bower_components/normalize-scss/README.md: -------------------------------------------------------------------------------- 1 | # normalize.css v3 2 | 3 | Normalize.css is a customisable CSS file that makes browsers render all 4 | elements more consistently and in line with modern standards. 5 | 6 | The project relies on researching the differences between default browser 7 | styles in order to precisely target only the styles that need or benefit from 8 | normalizing. 9 | 10 | [View the test file](http://necolas.github.io/normalize.css/latest/test.html) 11 | 12 | ## Install 13 | 14 | Download from the [project page](https://github.com/appleboy/normalize.scss). 15 | 16 | Install with [Component(1)](https://github.com/component/component/): `component install appleboy/normalize.scss` 17 | 18 | Install with [Bower](http://bower.io/): `bower install --save normalize-scss` 19 | 20 | ## What does it do? 21 | 22 | * Preserves useful defaults, unlike many CSS resets. 23 | * Normalizes styles for a wide range of elements. 24 | * Corrects bugs and common browser inconsistencies. 25 | * Improves usability with subtle improvements. 26 | * Explains what code does using detailed comments. 27 | 28 | ## How to use it 29 | 30 | No other styles should come before Normalize.css. 31 | 32 | It is recommended that you include the `normalize.css` file as untouched 33 | library code. 34 | 35 | ## Browser support 36 | 37 | * Google Chrome (latest) 38 | * Mozilla Firefox (latest) 39 | * Mozilla Firefox 4 40 | * Opera (latest) 41 | * Apple Safari 6+ 42 | * Internet Explorer 8+ 43 | 44 | [Normalize.css v1 provides legacy browser 45 | support](https://github.com/necolas/normalize.css/tree/v1) (IE 6+, Safari 4+), 46 | but is no longer actively developed. 47 | 48 | ## Contributing 49 | 50 | Please read the CONTRIBUTING.md 51 | 52 | ## Acknowledgements 53 | 54 | Normalize.css is a project by [Nicolas Gallagher](https://github.com/necolas), 55 | co-created with [Jonathan Neal](https://github.com/jonathantneal). 56 | -------------------------------------------------------------------------------- /bower_components/normalize-scss/_normalize.scss: -------------------------------------------------------------------------------- 1 | /* ========================================================================== 2 | Normalize.scss settings 3 | ========================================================================== */ 4 | /** 5 | * Includes legacy browser support IE6/7 6 | * 7 | * Set to false if you want to drop support for IE6 and IE7 8 | */ 9 | 10 | $legacy_browser_support: false !default; 11 | 12 | /* Base 13 | ========================================================================== */ 14 | 15 | /** 16 | * 1. Set default font family to sans-serif. 17 | * 2. Prevent iOS and IE text size adjust after device orientation change, 18 | * without disabling user zoom. 19 | * 3. Corrects text resizing oddly in IE 6/7 when body `font-size` is set using 20 | * `em` units. 21 | */ 22 | 23 | html { 24 | font-family: sans-serif; /* 1 */ 25 | -ms-text-size-adjust: 100%; /* 2 */ 26 | -webkit-text-size-adjust: 100%; /* 2 */ 27 | @if $legacy_browser_support { 28 | *font-size: 100%; /* 3 */ 29 | } 30 | } 31 | 32 | /** 33 | * Remove default margin. 34 | */ 35 | 36 | body { 37 | margin: 0; 38 | } 39 | 40 | /* HTML5 display definitions 41 | ========================================================================== */ 42 | 43 | /** 44 | * Correct `block` display not defined for any HTML5 element in IE 8/9. 45 | * Correct `block` display not defined for `details` or `summary` in IE 10/11 46 | * and Firefox. 47 | * Correct `block` display not defined for `main` in IE 11. 48 | */ 49 | 50 | article, 51 | aside, 52 | details, 53 | figcaption, 54 | figure, 55 | footer, 56 | header, 57 | hgroup, 58 | main, 59 | menu, 60 | nav, 61 | section, 62 | summary { 63 | display: block; 64 | } 65 | 66 | /** 67 | * 1. Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3. 68 | * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. 69 | */ 70 | 71 | audio, 72 | canvas, 73 | progress, 74 | video { 75 | display: inline-block; /* 1 */ 76 | vertical-align: baseline; /* 2 */ 77 | @if $legacy_browser_support { 78 | *display: inline; 79 | *zoom: 1; 80 | } 81 | } 82 | 83 | /** 84 | * Prevents modern browsers from displaying `audio` without controls. 85 | * Remove excess height in iOS 5 devices. 86 | */ 87 | 88 | audio:not([controls]) { 89 | display: none; 90 | height: 0; 91 | } 92 | 93 | /** 94 | * Address `[hidden]` styling not present in IE 8/9/10. 95 | * Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22. 96 | */ 97 | 98 | [hidden], 99 | template { 100 | display: none; 101 | } 102 | 103 | /* Links 104 | ========================================================================== */ 105 | 106 | /** 107 | * Remove the gray background color from active links in IE 10. 108 | */ 109 | 110 | a { 111 | background-color: transparent; 112 | } 113 | 114 | /** 115 | * Improve readability of focused elements when they are also in an 116 | * active/hover state. 117 | */ 118 | 119 | a { 120 | &:active, &:hover { 121 | outline: 0; 122 | }; 123 | } 124 | 125 | /* Text-level semantics 126 | ========================================================================== */ 127 | 128 | /** 129 | * Address styling not present in IE 8/9/10/11, Safari, and Chrome. 130 | */ 131 | 132 | abbr[title] { 133 | border-bottom: 1px dotted; 134 | } 135 | 136 | /** 137 | * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. 138 | */ 139 | 140 | b, 141 | strong { 142 | font-weight: bold; 143 | } 144 | 145 | @if $legacy_browser_support { 146 | blockquote { 147 | margin: 1em 40px; 148 | } 149 | } 150 | 151 | /** 152 | * Address styling not present in Safari and Chrome. 153 | */ 154 | 155 | dfn { 156 | font-style: italic; 157 | } 158 | 159 | /** 160 | * Address variable `h1` font-size and margin within `section` and `article` 161 | * contexts in Firefox 4+, Safari, and Chrome. 162 | */ 163 | 164 | h1 { 165 | font-size: 2em; 166 | margin: 0.67em 0; 167 | } 168 | 169 | @if $legacy_browser_support { 170 | h2 { 171 | font-size: 1.5em; 172 | margin: 0.83em 0; 173 | } 174 | 175 | h3 { 176 | font-size: 1.17em; 177 | margin: 1em 0; 178 | } 179 | 180 | h4 { 181 | font-size: 1em; 182 | margin: 1.33em 0; 183 | } 184 | 185 | h5 { 186 | font-size: 0.83em; 187 | margin: 1.67em 0; 188 | } 189 | 190 | h6 { 191 | font-size: 0.67em; 192 | margin: 2.33em 0; 193 | } 194 | } 195 | 196 | /** 197 | * Addresses styling not present in IE 8/9. 198 | */ 199 | 200 | mark { 201 | background: #ff0; 202 | color: #000; 203 | } 204 | 205 | @if $legacy_browser_support { 206 | 207 | /** 208 | * Addresses margins set differently in IE 6/7. 209 | */ 210 | 211 | p, 212 | pre { 213 | *margin: 1em 0; 214 | } 215 | 216 | /* 217 | * Addresses CSS quotes not supported in IE 6/7. 218 | */ 219 | 220 | q { 221 | *quotes: none; 222 | } 223 | 224 | /* 225 | * Addresses `quotes` property not supported in Safari 4. 226 | */ 227 | 228 | q:before, 229 | q:after { 230 | content: ''; 231 | content: none; 232 | } 233 | } 234 | 235 | /** 236 | * Address inconsistent and variable font size in all browsers. 237 | */ 238 | 239 | small { 240 | font-size: 80%; 241 | } 242 | 243 | /** 244 | * Prevent `sub` and `sup` affecting `line-height` in all browsers. 245 | */ 246 | 247 | sub, 248 | sup { 249 | font-size: 75%; 250 | line-height: 0; 251 | position: relative; 252 | vertical-align: baseline; 253 | } 254 | 255 | sup { 256 | top: -0.5em; 257 | } 258 | 259 | sub { 260 | bottom: -0.25em; 261 | } 262 | 263 | @if $legacy_browser_support { 264 | 265 | /* ========================================================================== 266 | Lists 267 | ========================================================================== */ 268 | 269 | /* 270 | * Addresses margins set differently in IE 6/7. 271 | */ 272 | 273 | dl, 274 | menu, 275 | ol, 276 | ul { 277 | *margin: 1em 0; 278 | } 279 | 280 | dd { 281 | *margin: 0 0 0 40px; 282 | } 283 | 284 | /* 285 | * Addresses paddings set differently in IE 6/7. 286 | */ 287 | 288 | menu, 289 | ol, 290 | ul { 291 | *padding: 0 0 0 40px; 292 | } 293 | 294 | /* 295 | * Corrects list images handled incorrectly in IE 7. 296 | */ 297 | 298 | nav ul, 299 | nav ol { 300 | *list-style: none; 301 | *list-style-image: none; 302 | } 303 | 304 | } 305 | 306 | /* Embedded content 307 | ========================================================================== */ 308 | 309 | /** 310 | * 1. Remove border when inside `a` element in IE 8/9/10. 311 | * 2. Improves image quality when scaled in IE 7. 312 | */ 313 | 314 | img { 315 | border: 0; 316 | @if $legacy_browser_support { 317 | *-ms-interpolation-mode: bicubic; /* 2 */ 318 | } 319 | } 320 | 321 | /** 322 | * Correct overflow not hidden in IE 9/10/11. 323 | */ 324 | 325 | svg:not(:root) { 326 | overflow: hidden; 327 | } 328 | 329 | /* Grouping content 330 | ========================================================================== */ 331 | 332 | /** 333 | * Address margin not present in IE 8/9 and Safari. 334 | */ 335 | 336 | figure { 337 | margin: 1em 40px; 338 | } 339 | 340 | /** 341 | * Address differences between Firefox and other browsers. 342 | */ 343 | 344 | hr { 345 | box-sizing: content-box; 346 | height: 0; 347 | } 348 | 349 | /** 350 | * Contain overflow in all browsers. 351 | */ 352 | 353 | pre { 354 | overflow: auto; 355 | } 356 | 357 | /** 358 | * Address odd `em`-unit font size rendering in all browsers. 359 | * Correct font family set oddly in IE 6, Safari 4/5, and Chrome. 360 | */ 361 | 362 | code, 363 | kbd, 364 | pre, 365 | samp { 366 | font-family: monospace, monospace; 367 | @if $legacy_browser_support { 368 | _font-family: 'courier new', monospace; 369 | } 370 | font-size: 1em; 371 | } 372 | 373 | /* Forms 374 | ========================================================================== */ 375 | 376 | /** 377 | * Known limitation: by default, Chrome and Safari on OS X allow very limited 378 | * styling of `select`, unless a `border` property is set. 379 | */ 380 | 381 | /** 382 | * 1. Correct color not being inherited. 383 | * Known issue: affects color of disabled elements. 384 | * 2. Correct font properties not being inherited. 385 | * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. 386 | * 4. Improves appearance and consistency in all browsers. 387 | */ 388 | 389 | button, 390 | input, 391 | optgroup, 392 | select, 393 | textarea { 394 | color: inherit; /* 1 */ 395 | font: inherit; /* 2 */ 396 | margin: 0; /* 3 */ 397 | @if $legacy_browser_support { 398 | vertical-align: baseline; /* 3 */ 399 | *vertical-align: middle; /* 3 */ 400 | } 401 | } 402 | 403 | /** 404 | * Address `overflow` set to `hidden` in IE 8/9/10/11. 405 | */ 406 | 407 | button { 408 | overflow: visible; 409 | } 410 | 411 | /** 412 | * Address inconsistent `text-transform` inheritance for `button` and `select`. 413 | * All other form control elements do not inherit `text-transform` values. 414 | * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. 415 | * Correct `select` style inheritance in Firefox. 416 | */ 417 | 418 | button, 419 | select { 420 | text-transform: none; 421 | } 422 | 423 | /** 424 | * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` 425 | * and `video` controls. 426 | * 2. Correct inability to style clickable `input` types in iOS. 427 | * 3. Improve usability and consistency of cursor style between image-type 428 | * `input` and others. 429 | * 4. Removes inner spacing in IE 7 without affecting normal text inputs. 430 | * Known issue: inner spacing remains in IE 6. 431 | */ 432 | 433 | button, 434 | html input[type="button"], /* 1 */ 435 | input[type="reset"], 436 | input[type="submit"] { 437 | -webkit-appearance: button; /* 2 */ 438 | cursor: pointer; /* 3 */ 439 | @if $legacy_browser_support { 440 | *overflow: visible; /* 4 */ 441 | } 442 | } 443 | 444 | /** 445 | * Re-set default cursor for disabled elements. 446 | */ 447 | 448 | button[disabled], 449 | html input[disabled] { 450 | cursor: default; 451 | } 452 | 453 | /** 454 | * Remove inner padding and border in Firefox 4+. 455 | */ 456 | 457 | button::-moz-focus-inner, 458 | input::-moz-focus-inner { 459 | border: 0; 460 | padding: 0; 461 | } 462 | 463 | /** 464 | * Address Firefox 4+ setting `line-height` on `input` using `!important` in 465 | * the UA stylesheet. 466 | */ 467 | 468 | input { 469 | line-height: normal; 470 | } 471 | 472 | /** 473 | * 1. Address box sizing set to `content-box` in IE 8/9/10. 474 | * 2. Remove excess padding in IE 8/9/10. 475 | * Known issue: excess padding remains in IE 6. 476 | */ 477 | 478 | input[type="checkbox"], 479 | input[type="radio"] { 480 | box-sizing: border-box; /* 1 */ 481 | padding: 0; /* 2 */ 482 | @if $legacy_browser_support { 483 | *height: 13px; /* 3 */ 484 | *width: 13px; /* 3 */ 485 | } 486 | } 487 | 488 | /** 489 | * Fix the cursor style for Chrome's increment/decrement buttons. For certain 490 | * `font-size` values of the `input`, it causes the cursor style of the 491 | * decrement button to change from `default` to `text`. 492 | */ 493 | 494 | input[type="number"]::-webkit-inner-spin-button, 495 | input[type="number"]::-webkit-outer-spin-button { 496 | height: auto; 497 | } 498 | 499 | /** 500 | * 1. Address `appearance` set to `searchfield` in Safari and Chrome. 501 | * 2. Address `box-sizing` set to `border-box` in Safari and Chrome. 502 | */ 503 | 504 | input[type="search"] { 505 | -webkit-appearance: textfield; /* 1 */ 506 | box-sizing: content-box; /* 2 */ 507 | } 508 | 509 | /** 510 | * Remove inner padding and search cancel button in Safari and Chrome on OS X. 511 | * Safari (but not Chrome) clips the cancel button when the search input has 512 | * padding (and `textfield` appearance). 513 | */ 514 | 515 | input[type="search"]::-webkit-search-cancel-button, 516 | input[type="search"]::-webkit-search-decoration { 517 | -webkit-appearance: none; 518 | } 519 | 520 | /** 521 | * Define consistent border, margin, and padding. 522 | */ 523 | 524 | fieldset { 525 | border: 1px solid #c0c0c0; 526 | margin: 0 2px; 527 | padding: 0.35em 0.625em 0.75em; 528 | } 529 | 530 | /** 531 | * 1. Correct `color` not being inherited in IE 8/9/10/11. 532 | * 2. Remove padding so people aren't caught out if they zero out fieldsets. 533 | * 3. Corrects text not wrapping in Firefox 3. 534 | * 4. Corrects alignment displayed oddly in IE 6/7. 535 | */ 536 | 537 | legend { 538 | border: 0; /* 1 */ 539 | padding: 0; /* 2 */ 540 | @if $legacy_browser_support { 541 | white-space: normal; /* 3 */ 542 | *margin-left: -7px; /* 4 */ 543 | } 544 | } 545 | 546 | /** 547 | * Remove default vertical scrollbar in IE 8/9/10/11. 548 | */ 549 | 550 | textarea { 551 | overflow: auto; 552 | } 553 | 554 | /** 555 | * Don't inherit the `font-weight` (applied by a rule above). 556 | * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. 557 | */ 558 | 559 | optgroup { 560 | font-weight: bold; 561 | } 562 | 563 | /* Tables 564 | ========================================================================== */ 565 | 566 | /** 567 | * Remove most spacing between table cells. 568 | */ 569 | 570 | table { 571 | border-collapse: collapse; 572 | border-spacing: 0; 573 | } 574 | 575 | td, 576 | th { 577 | padding: 0; 578 | } -------------------------------------------------------------------------------- /bower_components/normalize-scss/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "normalize-scss", 3 | "version": "3.0.3", 4 | "main": "_normalize.scss", 5 | "author": ["Nicolas Gallagher", "Bo-Yi Wu"], 6 | "ignore": [ 7 | "CHANGELOG.md", 8 | "CONTRIBUTING.md", 9 | "component.json", 10 | "package.json", 11 | "test.html" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /css/custom.css: -------------------------------------------------------------------------------- 1 | /*! 2 | ========== INIT 3 | */ 4 | /*! normalize.css v3.0.1 | MIT License | git.io/normalize */ 5 | /** 6 | * 1. Set default font family to sans-serif. 7 | * 2. Prevent iOS text size adjust after orientation change, without disabling 8 | * user zoom. 9 | */ 10 | html { 11 | font-family: sans-serif; 12 | /* 1 */ 13 | -ms-text-size-adjust: 100%; 14 | /* 2 */ 15 | -webkit-text-size-adjust: 100%; 16 | /* 2 */ } 17 | 18 | /** 19 | * Remove default margin. 20 | */ 21 | body { 22 | margin: 0; } 23 | 24 | /* HTML5 display definitions 25 | ========================================================================== */ 26 | /** 27 | * Correct `block` display not defined for any HTML5 element in IE 8/9. 28 | * Correct `block` display not defined for `details` or `summary` in IE 10/11 and Firefox. 29 | * Correct `block` display not defined for `main` in IE 11. 30 | */ 31 | article, 32 | aside, 33 | details, 34 | figcaption, 35 | figure, 36 | footer, 37 | header, 38 | hgroup, 39 | main, 40 | nav, 41 | section, 42 | summary { 43 | display: block; } 44 | 45 | /** 46 | * 1. Correct `inline-block` display not defined in IE 8/9. 47 | * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. 48 | */ 49 | audio, 50 | canvas, 51 | progress, 52 | video { 53 | display: inline-block; 54 | /* 1 */ 55 | vertical-align: baseline; 56 | /* 2 */ } 57 | 58 | /** 59 | * Prevent modern browsers from displaying `audio` without controls. 60 | * Remove excess height in iOS 5 devices. 61 | */ 62 | audio:not([controls]) { 63 | display: none; 64 | height: 0; } 65 | 66 | /** 67 | * Address `[hidden]` styling not present in IE 8/9/10. 68 | * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. 69 | */ 70 | [hidden], 71 | template { 72 | display: none; } 73 | 74 | /* Links 75 | ========================================================================== */ 76 | /** 77 | * Remove the gray background color from active links in IE 10. 78 | */ 79 | a { 80 | background: transparent; } 81 | 82 | /** 83 | * Improve readability when focused and also mouse hovered in all browsers. 84 | */ 85 | a:active, 86 | a:hover { 87 | outline: 0; } 88 | 89 | /* Text-level semantics 90 | ========================================================================== */ 91 | /** 92 | * Address styling not present in IE 8/9/10/11, Safari, and Chrome. 93 | */ 94 | abbr[title] { 95 | border-bottom: 1px dotted; } 96 | 97 | /** 98 | * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. 99 | */ 100 | b, 101 | strong { 102 | font-weight: bold; } 103 | 104 | /** 105 | * Address styling not present in Safari and Chrome. 106 | */ 107 | dfn { 108 | font-style: italic; } 109 | 110 | /** 111 | * Address variable `h1` font-size and margin within `section` and `article` 112 | * contexts in Firefox 4+, Safari, and Chrome. 113 | */ 114 | h1 { 115 | font-size: 2em; 116 | margin: 0.67em 0; } 117 | 118 | /** 119 | * Address styling not present in IE 8/9. 120 | */ 121 | mark { 122 | background: #ff0; 123 | color: #000; } 124 | 125 | /** 126 | * Address inconsistent and variable font size in all browsers. 127 | */ 128 | small { 129 | font-size: 80%; } 130 | 131 | /** 132 | * Prevent `sub` and `sup` affecting `line-height` in all browsers. 133 | */ 134 | sub, 135 | sup { 136 | font-size: 75%; 137 | line-height: 0; 138 | position: relative; 139 | vertical-align: baseline; } 140 | 141 | sup { 142 | top: -0.5em; } 143 | 144 | sub { 145 | bottom: -0.25em; } 146 | 147 | /* Embedded content 148 | ========================================================================== */ 149 | /** 150 | * Remove border when inside `a` element in IE 8/9/10. 151 | */ 152 | img { 153 | border: 0; } 154 | 155 | /** 156 | * Correct overflow not hidden in IE 9/10/11. 157 | */ 158 | svg:not(:root) { 159 | overflow: hidden; } 160 | 161 | /* Grouping content 162 | ========================================================================== */ 163 | /** 164 | * Address margin not present in IE 8/9 and Safari. 165 | */ 166 | figure { 167 | margin: 1em 40px; } 168 | 169 | /** 170 | * Address differences between Firefox and other browsers. 171 | */ 172 | hr { 173 | -moz-box-sizing: content-box; 174 | box-sizing: content-box; 175 | height: 0; } 176 | 177 | /** 178 | * Contain overflow in all browsers. 179 | */ 180 | pre { 181 | overflow: auto; } 182 | 183 | /** 184 | * Address odd `em`-unit font size rendering in all browsers. 185 | */ 186 | code, 187 | kbd, 188 | pre, 189 | samp { 190 | font-family: monospace, monospace; 191 | font-size: 1em; } 192 | 193 | /* Forms 194 | ========================================================================== */ 195 | /** 196 | * Known limitation: by default, Chrome and Safari on OS X allow very limited 197 | * styling of `select`, unless a `border` property is set. 198 | */ 199 | /** 200 | * 1. Correct color not being inherited. 201 | * Known issue: affects color of disabled elements. 202 | * 2. Correct font properties not being inherited. 203 | * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. 204 | */ 205 | button, 206 | input, 207 | optgroup, 208 | select, 209 | textarea { 210 | color: inherit; 211 | /* 1 */ 212 | font: inherit; 213 | /* 2 */ 214 | margin: 0; 215 | /* 3 */ } 216 | 217 | /** 218 | * Address `overflow` set to `hidden` in IE 8/9/10/11. 219 | */ 220 | button { 221 | overflow: visible; } 222 | 223 | /** 224 | * Address inconsistent `text-transform` inheritance for `button` and `select`. 225 | * All other form control elements do not inherit `text-transform` values. 226 | * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. 227 | * Correct `select` style inheritance in Firefox. 228 | */ 229 | button, 230 | select { 231 | text-transform: none; } 232 | 233 | /** 234 | * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` 235 | * and `video` controls. 236 | * 2. Correct inability to style clickable `input` types in iOS. 237 | * 3. Improve usability and consistency of cursor style between image-type 238 | * `input` and others. 239 | */ 240 | button, 241 | html input[type="button"], 242 | input[type="reset"], 243 | input[type="submit"] { 244 | -webkit-appearance: button; 245 | /* 2 */ 246 | cursor: pointer; 247 | /* 3 */ } 248 | 249 | /** 250 | * Re-set default cursor for disabled elements. 251 | */ 252 | button[disabled], 253 | html input[disabled] { 254 | cursor: default; } 255 | 256 | /** 257 | * Remove inner padding and border in Firefox 4+. 258 | */ 259 | button::-moz-focus-inner, 260 | input::-moz-focus-inner { 261 | border: 0; 262 | padding: 0; } 263 | 264 | /** 265 | * Address Firefox 4+ setting `line-height` on `input` using `!important` in 266 | * the UA stylesheet. 267 | */ 268 | input { 269 | line-height: normal; } 270 | 271 | /** 272 | * It's recommended that you don't attempt to style these elements. 273 | * Firefox's implementation doesn't respect box-sizing, padding, or width. 274 | * 275 | * 1. Address box sizing set to `content-box` in IE 8/9/10. 276 | * 2. Remove excess padding in IE 8/9/10. 277 | */ 278 | input[type="checkbox"], 279 | input[type="radio"] { 280 | box-sizing: border-box; 281 | /* 1 */ 282 | padding: 0; 283 | /* 2 */ } 284 | 285 | /** 286 | * Fix the cursor style for Chrome's increment/decrement buttons. For certain 287 | * `font-size` values of the `input`, it causes the cursor style of the 288 | * decrement button to change from `default` to `text`. 289 | */ 290 | input[type="number"]::-webkit-inner-spin-button, 291 | input[type="number"]::-webkit-outer-spin-button { 292 | height: auto; } 293 | 294 | /** 295 | * 1. Address `appearance` set to `searchfield` in Safari and Chrome. 296 | * 2. Address `box-sizing` set to `border-box` in Safari and Chrome 297 | * (include `-moz` to future-proof). 298 | */ 299 | input[type="search"] { 300 | -webkit-appearance: textfield; 301 | /* 1 */ 302 | -moz-box-sizing: content-box; 303 | -webkit-box-sizing: content-box; 304 | /* 2 */ 305 | box-sizing: content-box; } 306 | 307 | /** 308 | * Remove inner padding and search cancel button in Safari and Chrome on OS X. 309 | * Safari (but not Chrome) clips the cancel button when the search input has 310 | * padding (and `textfield` appearance). 311 | */ 312 | input[type="search"]::-webkit-search-cancel-button, 313 | input[type="search"]::-webkit-search-decoration { 314 | -webkit-appearance: none; } 315 | 316 | /** 317 | * Define consistent border, margin, and padding. 318 | */ 319 | fieldset { 320 | border: 1px solid #c0c0c0; 321 | margin: 0 2px; 322 | padding: 0.35em 0.625em 0.75em; } 323 | 324 | /** 325 | * 1. Correct `color` not being inherited in IE 8/9/10/11. 326 | * 2. Remove padding so people aren't caught out if they zero out fieldsets. 327 | */ 328 | legend { 329 | border: 0; 330 | /* 1 */ 331 | padding: 0; 332 | /* 2 */ } 333 | 334 | /** 335 | * Remove default vertical scrollbar in IE 8/9/10/11. 336 | */ 337 | textarea { 338 | overflow: auto; } 339 | 340 | /** 341 | * Don't inherit the `font-weight` (applied by a rule above). 342 | * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. 343 | */ 344 | optgroup { 345 | font-weight: bold; } 346 | 347 | /* Tables 348 | ========================================================================== */ 349 | /** 350 | * Remove most spacing between table cells. 351 | */ 352 | table { 353 | border-collapse: collapse; 354 | border-spacing: 0; } 355 | 356 | td, 357 | th { 358 | padding: 0; } 359 | 360 | /*! 361 | ========== BASE 362 | */ 363 | /* ===== UTILS ===== */ 364 | /* _____ SYSTEM TOOLS _____ */ 365 | /* _____ MIXINS _____ */ 366 | /* _____ UNIVERSAL HELPERS _____ */ 367 | /* ===== PROJECT ===== */ 368 | /* _____ VARIABLES _____ */ 369 | /* _____ FONTS _____ */ 370 | @font-face { 371 | font-family: "titillium"; 372 | src: url("fonts/titilliumweb-regular-webfont.eot"); 373 | src: url("fonts/titilliumweb-regular-webfont.eot?#iefix") format("embedded-opentype"), url("fonts/titilliumweb-regular-webfont.woff") format("woff"), url("fonts/titilliumweb-regular-webfont.ttf") format("truetype"), url("fonts/titilliumweb-regular-webfont.svg#titillium_webregular") format("svg"); 374 | font-weight: normal; 375 | font-style: normal; } 376 | @font-face { 377 | font-family: "titillium"; 378 | src: url("fonts/titilliumweb-bold-webfont.eot"); 379 | src: url("fonts/titilliumweb-bold-webfont.eot?#iefix") format("embedded-opentype"), url("fonts/titilliumweb-bold-webfont.woff") format("woff"), url("fonts/titilliumweb-bold-webfont.ttf") format("truetype"), url("fonts/titilliumweb-bold-webfont.svg#titillium_webbold") format("svg"); 380 | font-weight: bold; 381 | font-style: normal; } 382 | @font-face { 383 | font-family: "robotoSlab"; 384 | src: url("fonts/robotoslab-regular-webfont.eot"); 385 | src: url("fonts/robotoslab-regular-webfont.eot?#iefix") format("embedded-opentype"), url("fonts/robotoslab-regular-webfont.woff") format("woff"), url("fonts/robotoslab-regular-webfont.ttf") format("truetype"), url("fonts/robotoslab-regular-webfont.svg#roboto_slabregular") format("svg"); 386 | font-weight: normal; 387 | font-style: normal; } 388 | @font-face { 389 | font-family: "robotoSlab"; 390 | src: url("fonts/robotoslab-bold-webfont.eot"); 391 | src: url("fonts/robotoslab-bold-webfont.eot?#iefix") format("embedded-opentype"), url("fonts/robotoslab-bold-webfont.woff") format("woff"), url("fonts/robotoslab-bold-webfont.ttf") format("truetype"), url("fonts/robotoslab-bold-webfont.svg#roboto_slabbold") format("svg"); 392 | font-weight: bold; 393 | font-style: normal; } 394 | /* _____ GLOBAL DEFAULTS _____ */ 395 | *, 396 | :before, 397 | :after { 398 | -moz-box-sizing: border-box; 399 | -webkit-box-sizing: border-box; 400 | box-sizing: border-box; } 401 | 402 | html { 403 | width: 100%; 404 | height: 100%; 405 | font-size: 100%; } 406 | 407 | body { 408 | font-size: 16px; 409 | background: #fff; 410 | width: 100%; 411 | min-height: 100%; 412 | line-height: 1.4; 413 | color: #000; 414 | font-family: Arial, "sans-serif"; } 415 | .cssremunit body { 416 | font-size: 1rem; } 417 | .no-cssgradients body { 418 | background-color: #ff8e67; } 419 | .cssgradients body { 420 | background: -moz-radial-gradient(center, ellipse cover, #ff9e7e 0%, #ff7f50 100%) fixed; 421 | /* FF3.6+ */ 422 | background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, #ff9e7e), color-stop(100%, #ff7f50)) fixed; 423 | /* Chrome,Safari4+ */ 424 | background: -webkit-radial-gradient(center, ellipse cover, #ff9e7e 0%, #ff7f50 100%) fixed; 425 | /* Chrome10+,Safari5.1+ */ 426 | background: -o-radial-gradient(center, ellipse cover, #ff9e7e 0%, #ff7f50 100%) fixed; 427 | /* Opera 12+ */ 428 | background: -ms-radial-gradient(center, ellipse cover, #ff9e7e 0%, #ff7f50 100%) fixed; 429 | /* IE10+ */ 430 | background: radial-gradient(ellipse at center, #ff9e7e 0%, #ff7f50 100%) fixed; 431 | /* W3C */ } 432 | 433 | ul { 434 | list-style: square; } 435 | 436 | pre { 437 | background: #fff; 438 | padding: 10px; } 439 | 440 | p { 441 | margin: 0 0 20px; } 442 | 443 | h1, 444 | h2, 445 | h3, 446 | h4, 447 | h5, 448 | h6 { 449 | font-family: 'titillium', Arial, 'sans-serif'; } 450 | 451 | pre { 452 | font-family: consolas, monospace; } 453 | 454 | /* _____ LAYOUT _____ */ 455 | .mainContainer { 456 | margin: 0 auto; 457 | width: 100%; 458 | max-width: 760px; } 459 | .mainContainer:before, .mainContainer:after { 460 | display: table; 461 | content: ' '; } 462 | .mainContainer:after { 463 | clear: both; } 464 | 465 | /*! 466 | ========== COMPONENTS 467 | */ 468 | /* 469 | usage examples: 470 | @include example('.example'); 471 | 472 | @include example('.example2', $defaultSkin: false); 473 | @include example-skin-alt('.example2'); 474 | */ 475 | /* **** EXAMPLE COMPONENT **** */ 476 | /* **** EXAMPLE COMPONENT SKIN **** */ 477 | /* **** EXAMPLE COMPONENT SKIN ALT **** */ 478 | /*! 479 | ========== SPECIFICS 480 | */ 481 | /* _____ SPECIFICS _____ */ 482 | .goTop { 483 | display: block; 484 | position: fixed; 485 | right: 10px; 486 | bottom: 10px; 487 | z-index: 0; 488 | border: 20px solid transparent; 489 | border-bottom-color: #fff; 490 | background: transparent; 491 | padding: 0; 492 | width: 0; 493 | height: 0; 494 | text-align: center; 495 | font-size: 0; } 496 | 497 | .mainFooter { 498 | position: fixed; 499 | right: 0; 500 | bottom: 0; 501 | left: 0; 502 | z-index: 10; 503 | background: #ff7f50; 504 | padding: 5px; 505 | text-align: center; } 506 | 507 | .mainFooter_link { 508 | text-decoration: none; 509 | color: #333; } 510 | .mainFooter_link:hover { 511 | text-decoration: underline; 512 | color: #fff; } 513 | 514 | .mainFooter_iconLink { 515 | display: block; 516 | float: right; 517 | margin: 2px 5px; 518 | width: 22px; 519 | height: 22px; } 520 | 521 | .repoWrapper { 522 | margin: 10px auto; 523 | width: 362px; 524 | list-style: none; } 525 | .repoWrapper:before, .repoWrapper:after { 526 | display: table; 527 | content: ' '; } 528 | .repoWrapper:after { 529 | clear: both; } 530 | 531 | .repoWrapper_item { 532 | float: left; } 533 | 534 | .repoWrapper_element { 535 | margin-bottom: -6px; } 536 | 537 | .repoWrapper_link { 538 | display: block; 539 | float: right; 540 | margin: 2px 5px; 541 | background: url("../assets/img/github.png") center no-repeat; 542 | width: 22px; 543 | height: 22px; 544 | font-size: 0; } 545 | 546 | @media (min-width: 600px) { 547 | .repoWrapper { 548 | position: absolute; 549 | top: 3px; 550 | right: 10px; 551 | margin: 0; 552 | width: auto; } } 553 | .mainHeader { 554 | position: fixed; 555 | top: 50%; 556 | left: 50%; 557 | z-index: 10; 558 | text-align: center; 559 | color: #fff; } 560 | .csstransforms .mainHeader { 561 | -webkit-transform: translate(-50%, -50%); 562 | -moz-transform: translate(-50%, -50%); 563 | -ms-transform: translate(-50%, -50%); 564 | -o-transform: translate(-50%, -50%); 565 | transform: translate(-50%, -50%); } 566 | 567 | .mainTitle { 568 | font-size: 70px; 569 | line-height: 75px; 570 | margin: 0 0 10px; 571 | font-family: 'robotoSlab', georgia, serif; 572 | font-weight: normal; } 573 | .cssremunit .mainTitle { 574 | font-size: 4.375rem; } 575 | .cssremunit .mainTitle { 576 | line-height: 4.6875rem; } 577 | .textshadow .mainTitle { 578 | text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3); } 579 | 580 | .mainSubtitle { 581 | margin: 0; 582 | font-weight: normal; } 583 | .textshadow .mainSubtitle { 584 | text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3); } 585 | 586 | .mainContent { 587 | margin: 65px 0 50px; } 588 | 589 | .js .mainSection { 590 | display: none; } 591 | 592 | .js .mainSection._is_current { 593 | display: block; } 594 | 595 | .mainSection_body { 596 | background: #fff; 597 | padding: 10px 40px; } 598 | 599 | .mainSection_header { 600 | background: #ffdec7; 601 | padding: 10px 40px; } 602 | 603 | .mainSection_title { 604 | font-size: 26px; 605 | line-height: 30px; 606 | color: #ff7f50; 607 | font-weight: normal; } 608 | .cssremunit .mainSection_title { 609 | font-size: 1.625rem; } 610 | .cssremunit .mainSection_title { 611 | line-height: 1.875rem; } 612 | 613 | .mainSection_subtitle { 614 | margin-top: 30px; 615 | margin-bottom: 20px; } 616 | 617 | .mainSection_smallTitle { 618 | margin-top: 80px; } 619 | 620 | @media (max-width: 899px) { 621 | .mainMenu { 622 | padding: 0; } 623 | 624 | .mainMenu_link { 625 | display: block; 626 | padding: 20px; } } 627 | @media (min-width: 900px) { 628 | .mainMenu { 629 | display: inline-block; 630 | margin: 0; 631 | padding: 0; 632 | font-size: 0; } 633 | 634 | .mainMenu_item { 635 | font-size: 18px; 636 | display: inline-block; 637 | vertical-align: bottom; 638 | line-height: 2.5; } 639 | .cssremunit .mainMenu_item { 640 | font-size: 1.125rem; } 641 | 642 | .mainMenu_link { 643 | padding: 0 10px; } } 644 | .mainMenu { 645 | list-style: none; } 646 | 647 | .mainMenu_item { 648 | border-bottom: 1px solid #ffdec7; } 649 | 650 | .mainMenu_item--highlighted { 651 | background: #f8f5ec; } 652 | 653 | .mainMenu_link { 654 | background: none; 655 | border: 0; 656 | cursor: pointer; 657 | text-decoration: none; 658 | color: #333; 659 | font-family: 'titillium', Arial, 'sans-serif'; } 660 | .mainMenu_item._is_current .mainMenu_link { 661 | color: #ff9e7e; } 662 | .mainMenu_link:hover { 663 | background: #f1ede4; } 664 | 665 | @media (min-width: 900px) { 666 | .mainMenu_item._is_current { 667 | border-bottom: 3px solid #ff9e7e; } 668 | 669 | .mainMenu_link { 670 | border-left: 1px solid #ff7f50; } 671 | .mainMenu_item:first-child .mainMenu_link { 672 | border-left: 0; } } 673 | @media (max-width: 899px) { 674 | .mainNav { 675 | position: fixed; 676 | top: 0; 677 | bottom: 0; 678 | left: -200px; 679 | z-index: 999; 680 | background: #fff; 681 | width: 200px; } 682 | .csstransitions .mainNav { 683 | -webkit-transition: left .2s linear; 684 | -moz-transition: left .2s linear; 685 | -o-transition: left .2s linear; 686 | transition: left .2s linear; } 687 | .boxshadow .mainNav { 688 | -webkit-box-shadow: 0 3px 3px 3px rgba(0, 0, 0, 0.3); 689 | box-shadow: 0 3px 3px 3px rgba(0, 0, 0, 0.3); } 690 | .mainNav._is_open { 691 | left: 0; } 692 | 693 | .mainNav_opener { 694 | display: block; 695 | position: absolute; 696 | top: 20px; 697 | left: 220px; 698 | z-index: 998; 699 | border: 1px solid #fff; 700 | background: #ff7f50; 701 | padding: 0; 702 | width: 30px; 703 | height: 30px; 704 | overflow: hidden; 705 | text-indent: -999px; 706 | color: #fff; } 707 | .mainNav_opener:before { 708 | display: block; 709 | width: 28px; 710 | height: 30px; 711 | text-align: center; 712 | text-indent: 0; 713 | line-height: 1.8; 714 | content: '\2630'; } 715 | .mainNav._is_open .mainNav_opener:before { 716 | content: '\2613'; } } 717 | @media (min-width: 900px) { 718 | .mainNav { 719 | opacity: 0.95; 720 | filter: alpha(opacity=95); 721 | position: fixed; 722 | top: 0; 723 | right: 0; 724 | bottom: auto; 725 | left: 0; 726 | background: #fff; 727 | text-align: right; } 728 | .boxshadow .mainNav { 729 | -webkit-box-shadow: 0 3px 5px rgba(0,0,0,.3); 730 | box-shadow: 0 3px 5px rgba(0,0,0,.3); } 731 | 732 | .mainNav_opener { 733 | display: none; } } 734 | .sampleHeader { 735 | margin: 0; 736 | padding: 0; 737 | list-style: none; } 738 | .sampleHeader:before, .sampleHeader:after { 739 | display: table; 740 | content: ' '; } 741 | .sampleHeader:after { 742 | clear: both; } 743 | 744 | .sampleHeader_item { 745 | float: left; 746 | background: #f1ede4; } 747 | .sampleHeader_item._is_current { 748 | background: #f8f5ec; } 749 | 750 | .sampleHeader_link { 751 | background: none; 752 | border: 0; 753 | padding: 0; 754 | cursor: pointer; 755 | text-decoration: none; 756 | display: block; 757 | border: 0; 758 | background: transparent; 759 | padding: 10px; 760 | color: #ccc; } 761 | 762 | .sampleHeader_item._is_current .sampleHeader_link { 763 | color: #000; } 764 | 765 | .sampleTitle { 766 | display: inline-block; 767 | background: #f1ede4; 768 | padding: 5px 20px; } 769 | 770 | .codeSample { 771 | font-size: 14px; 772 | margin-top: 0; 773 | border: solid 1px #f1ede4; 774 | background: #f8f5ec; 775 | padding: 20px; 776 | line-height: 1.3; 777 | color: #637c84; } 778 | .cssremunit .codeSample { 779 | font-size: 0.875rem; } 780 | .codeSample._is_hidden { 781 | display: none; } 782 | 783 | .navLink { 784 | background: none; 785 | border: 0; 786 | padding: 0; 787 | cursor: pointer; 788 | text-decoration: none; } 789 | 790 | .externalLink { 791 | background: none; 792 | border: 0; 793 | padding: 0; 794 | cursor: pointer; 795 | text-decoration: none; } 796 | 797 | .firstOrderList_item { 798 | color: #5cbcaa; 799 | list-style-type: square; } 800 | 801 | .firstOrderList_item_content { 802 | color: #000; } 803 | 804 | .secondaryList_item { 805 | color: #5cbcaa; 806 | list-style-type: square; } 807 | 808 | .secondaryList_item_content { 809 | color: #000; } 810 | 811 | .articleSeparator { 812 | display: none !important; 813 | visibility: hidden; } 814 | 815 | .note { 816 | border: solid 1px rgba(255, 222, 199, 0.3); 817 | background: rgba(255, 222, 199, 0.2); 818 | padding: 15px; } 819 | 820 | .exampleNote { 821 | margin-bottom: 15px; 822 | border: dotted 1px #5cbcaa; 823 | padding: 15px; } 824 | 825 | .sampleTitle { 826 | display: inline-block; 827 | background: #f1ede4; 828 | padding: 5px 20px; } 829 | 830 | .codeSample { 831 | font-size: 14px; 832 | margin-top: 0; 833 | border: solid 1px #f1ede4; 834 | background: #f8f5ec; 835 | padding: 20px; 836 | line-height: 1.3; 837 | color: #637c84; } 838 | .cssremunit .codeSample { 839 | font-size: 0.875rem; } 840 | 841 | .example { 842 | padding: 10px; } 843 | 844 | .example_inner { 845 | padding: 20px; } 846 | 847 | .example:hover { 848 | padding: 30px; } 849 | 850 | .example { 851 | background: #eee; 852 | color: blue; } 853 | 854 | .example_inner { 855 | color: red; } 856 | 857 | .example:hover { 858 | border: solid 1px red; } 859 | 860 | .example2 { 861 | padding: 10px; } 862 | 863 | .example2_inner { 864 | padding: 20px; } 865 | 866 | .example2:hover { 867 | padding: 30px; } 868 | 869 | .example2 { 870 | background: #fff; 871 | color: green; } 872 | 873 | .example2_inner { 874 | background: #eee; 875 | color: orange; } 876 | 877 | .example2:hover { 878 | border: solid 1px purple; 879 | background: blue; } 880 | 881 | /*# sourceMappingURL=custom.css.map */ 882 | -------------------------------------------------------------------------------- /css/custom.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "mappings": "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", 4 | "sources": ["../sass/vendor/_normalize.scss","../sass/base/utils/_mixins.scss","../sass/base/project/_fonts.scss","../sass/base/project/_globals.scss","../sass/specifics/_buttons.scss","../sass/base/project/_variables.scss","../sass/specifics/_footer.scss","../sass/specifics/_main.scss","../sass/components/responsiveTabs/_responsiveTabs.scss","../sass/specifics/_nav.scss","../sass/specifics/_sample.scss","../sass/specifics/__specifics.scss","../sass/components/example/_example.scss","../sass/components/example/_skins/_alt.scss"], 5 | "names": [], 6 | "file": "custom.css" 7 | } -------------------------------------------------------------------------------- /css/fonts/robotoslab-bold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlarcher/docssa/b87ec75ac28fc55c0946ba73100a85ca3964d213/css/fonts/robotoslab-bold-webfont.eot -------------------------------------------------------------------------------- /css/fonts/robotoslab-bold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlarcher/docssa/b87ec75ac28fc55c0946ba73100a85ca3964d213/css/fonts/robotoslab-bold-webfont.ttf -------------------------------------------------------------------------------- /css/fonts/robotoslab-bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlarcher/docssa/b87ec75ac28fc55c0946ba73100a85ca3964d213/css/fonts/robotoslab-bold-webfont.woff -------------------------------------------------------------------------------- /css/fonts/robotoslab-regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlarcher/docssa/b87ec75ac28fc55c0946ba73100a85ca3964d213/css/fonts/robotoslab-regular-webfont.eot -------------------------------------------------------------------------------- /css/fonts/robotoslab-regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlarcher/docssa/b87ec75ac28fc55c0946ba73100a85ca3964d213/css/fonts/robotoslab-regular-webfont.ttf -------------------------------------------------------------------------------- /css/fonts/robotoslab-regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlarcher/docssa/b87ec75ac28fc55c0946ba73100a85ca3964d213/css/fonts/robotoslab-regular-webfont.woff -------------------------------------------------------------------------------- /css/fonts/titilliumweb-bold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlarcher/docssa/b87ec75ac28fc55c0946ba73100a85ca3964d213/css/fonts/titilliumweb-bold-webfont.eot -------------------------------------------------------------------------------- /css/fonts/titilliumweb-bold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlarcher/docssa/b87ec75ac28fc55c0946ba73100a85ca3964d213/css/fonts/titilliumweb-bold-webfont.ttf -------------------------------------------------------------------------------- /css/fonts/titilliumweb-bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlarcher/docssa/b87ec75ac28fc55c0946ba73100a85ca3964d213/css/fonts/titilliumweb-bold-webfont.woff -------------------------------------------------------------------------------- /css/fonts/titilliumweb-regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlarcher/docssa/b87ec75ac28fc55c0946ba73100a85ca3964d213/css/fonts/titilliumweb-regular-webfont.eot -------------------------------------------------------------------------------- /css/fonts/titilliumweb-regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlarcher/docssa/b87ec75ac28fc55c0946ba73100a85ca3964d213/css/fonts/titilliumweb-regular-webfont.ttf -------------------------------------------------------------------------------- /css/fonts/titilliumweb-regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlarcher/docssa/b87ec75ac28fc55c0946ba73100a85ca3964d213/css/fonts/titilliumweb-regular-webfont.woff -------------------------------------------------------------------------------- /favicon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlarcher/docssa/b87ec75ac28fc55c0946ba73100a85ca3964d213/favicon.gif -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mlarcher/docssa/b87ec75ac28fc55c0946ba73100a85ca3964d213/favicon.ico -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | DoCSSa – Sass based CSS architecture and methodology 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 24 | 26 | 27 | 28 | 29 | 30 |
31 | 32 |
33 |

34 | DoCSSa 2.0 {dok~sa} 35 |

36 | 37 |

Sass based CSS architecture and methodology

38 |
39 | 40 | 69 | 70 | 71 |
72 | 73 |
74 | 75 |
76 | 77 |
78 |

About

79 |
80 | 81 |
82 | 83 |

What is DoCSSa ?

84 | 85 |

DoCSSa is a CSS architecture and methodology to help structure rapid and maintainable 86 | stylesheets development.
87 | It is intended for use in large, long lived sites, on which many frontend developers may be working 88 | over time.
89 | The name stands for Deferred Object CSS Architecture.

90 | 91 |

What are the key features of DoCSSa ?

92 | 93 |
    94 |
  • 95 | 96 | Clear and proven folder structure 97 | 98 |
  • 99 |
  • 100 | 101 | Separation of concerns between HTML and CSS 102 | 103 |
  • 104 |
  • 105 | 106 | Scalable and maintainable stylesheets 107 | 108 |
  • 109 |
  • 110 | 111 | Easy to setup and flexible 112 | 113 |
  • 114 |
115 | 116 |

Why does DoCSSa exist ?

117 | 118 |

As frontend web developers, we are living in a world of evergrowing complexity. What once was a 119 | relatively easy thing to do (putting aside browsers inconsistencies) has grown into a very complex, 120 | dynamic, everchanging reality.

121 | 122 |

So, we need flexible structures in order to be more efficient and less 123 | under pressure when the rough times come. The more work we 124 | can avoid by having defined the right tools and the right architecture ahead of time, the better.

125 | 126 |

DoCSSa is our attempt at an organization that aims toward a fast workflow that will keep the 127 | flexibility required for the long run.

128 | 129 |

How does DoCSSa bring its benefits ?

130 | 131 |

DoCSSa is based on Sass, and leverages some of its key features to achieve its goal. 132 | Most notably, DoCSSa takes advantage of imports and mixins. 133 | It also suggests a file system organisation and a BEM based naming convention, and integrates 134 | the core ideas found in OOCSS and SmaCSS.

135 | 136 |
137 | 138 |
139 | 140 |
141 | 142 |
143 | 144 |
145 |

File Structure

146 |
147 | 148 |
149 | 150 |

Basics

151 | 152 |

In DoCSSa, the file system is divided in four main directories in the sass folder :

153 | 154 |
    155 |
  • 156 |
    157 | base 158 |
    159 |
  • 160 |
  • 161 |
    162 | components 163 |
    164 |
  • 165 |
  • 166 |
    167 | specifics 168 |
    169 |
  • 170 |
  • 171 |
    172 | vendor 173 |
    174 |
  • 175 |
176 | 177 |

Each base folder has a specific role, and CSS rules for a particular set of elements will end up in one of 178 | these directories, according to their nature.
179 | The structure has a single point of entry, which we'll call custom.scss. 180 | This file is located at the root of the sass folder.

181 | 182 |

In most cases, it will be the only file with no 183 | underscore(_) prefix: as you may know, the .scss to .css convertion process in Sass only converts 184 | files that don't have an underscore in front of them. Most of the files in our structure being imported 185 | by other files, they don't need to be rendered directly.
186 | Only components may be rendered separately, in order to be able to dynamically load them if needed, 187 | but we'll get back to it. 188 |

189 | 190 |

The main .scss file will look something like this :

191 | 192 |
193 |
    194 |
  • 195 | // custom.scss 196 |
  • 197 |
198 | 199 |
 200 | @charset "UTF-8";
 201 | 
 202 | /*!
 203 | ========== INIT
 204 | */
 205 | // styles reset (normalize) and third party scss entry point
 206 | @import 'vendor/__vendor';
 207 | 
 208 | 
 209 | /*!
 210 | ========== BASE
 211 | */
 212 | // variables, fonts, mixins, helpers... common styles used across the entire site
 213 | @import 'base/__base';
 214 | 
 215 | 
 216 | /*!
 217 | ========== COMPONENTS
 218 | */
 219 | // reusable components
 220 | @import 'components/__components';
 221 | 
 222 | 
 223 | /*!
 224 | ========== SPECIFICS
 225 | */
 226 | // declarations specific to the project, organized according to the items/sections represented
 227 | @import 'specifics/__specifics';
 228 | 
229 |
230 | 231 |

As you can see, it mostly acts as an aggregator for other files, which themselves import some 232 | other scss files, and so on. With a well thought organization, this simple construct can prove very powerful!

233 | 234 |

On a sidenote, remember that Sass is only a CSS precompiler, so you'll end up with only one .css file 235 | with all the goodies, not a bunch of HTTP requests.

236 | 237 |

Here is an overview of what a basic file system might look like :

238 | 239 | // file system 240 |
 241 | sass
 242 | ¦   custom.scss
 243 | ¦
 244 | +---base
 245 | ¦   ¦   __base.scss
 246 | ¦   ¦   _config.scss
 247 | ¦   ¦
 248 | ¦   +---project
 249 | ¦   ¦       __project.scss
 250 | ¦   ¦       _fonts.scss
 251 | ¦   ¦       _globals.scss
 252 | ¦   ¦       _mixins.scss
 253 | ¦   ¦       _variables.scss
 254 | ¦   ¦
 255 | ¦   +---utils
 256 | ¦           __utils.scss
 257 | ¦           _mixins.scss
 258 | ¦           _system.scss
 259 | ¦
 260 | +---components
 261 | ¦   ¦   __components.scss
 262 | ¦   ¦
 263 | ¦   +---button
 264 | ¦   ¦       _button.scss
 265 | ¦   ¦
 266 | ¦   +---tabs
 267 | ¦           _tabs.scss
 268 | ¦
 269 | ¦
 270 | +---specifics
 271 | ¦   ¦   __specifics.scss
 272 | ¦   ¦   _main.scss
 273 | |   |   _inbox.scss
 274 | ¦   ¦
 275 | ¦   +---popins
 276 | ¦           __popins.scss
 277 | ¦           _popin-congratulations.scss
 278 | ¦           _popin-loginForm.scss
 279 | ¦
 280 | +---vendor
 281 |     __vendor.scss
 282 | 
283 | 284 | 285 |

Base folder

286 | 287 |

The "base" folder contains rules that are global to the site. It is divided in two parts :

288 |
    289 |
  • 290 |
    291 | utils 292 |
    293 |
  • 294 |
  • 295 |
    296 | project 297 |
    298 |
  • 299 |
300 |

Note that the base/_config.scss file is located directly in the base 301 | folder. It contains variables that are required by both the utils and the project. So far 302 | only the $baseFontSize fell in that category, but we still dedicated a file to it in 303 | order to be consistent.

304 |

305 | Utils contains only things that don't need to change 306 | from a project to another. As of today, it consists of _system and _mixins. 307 |

308 |
    309 |
  • 310 |
    311 |

    _system is a special file that contains tools used by DoCSSa.
    312 | Most notably, it contains a mixin that helps requiring content 313 | from several places without generating duplicate content, and one that helps 314 | the provided components to make use of Modernizr classes. 315 |

    316 | 317 |
    318 |
  • 319 |
  • 320 |
    321 |

    _mixins contains a collection of commonly used helpers. 322 | They are particularily useful for handling vendor prefixes and 323 | fallbacks. For example, DoCSSa comes with a linear-gradient mixin that compiles to 324 | all required vendor prefixes (and only those required!) and generates a fallback 325 | color from the input values for browsers that don't support linear-gradient at all. 326 | DoCSSa recommends using Modernizr for feature detection and progressive enhancement, and the provided 327 | mixins implementing CSS3 features rely on it by default for their output (even though it can be 328 | disabled at include time).
    329 |

    330 | 331 |

    Mixins can accumulate and enrich your library 332 | with no cost, as they are only compiled when used.
    333 | Mixins are a great way to avoid repetition when coding. They end up in code 334 | repetition in the css output, and for that reason the previous version of DoCSSa 335 | was based on placeholders instead, but it has now been proven that this repetition 336 | is not an issue once gzip comes into play 337 | (more 338 | info)

    339 | 340 | 372 |
    373 |
  • 374 |
375 | 376 | 377 |

378 | Project is where every global setup of a project 379 | is stored. Whereas utils is intended to be kept and grow from a project to the next, 380 | project only stands true for a given project (although you may want to use it as a 381 | boilerplate from project to project). As of today, it consists of _variables, 382 | _fonts, _mixins and _globals. 383 |

384 | 385 |
    386 |
  • 387 |
    388 |

    _variables is were all site wide variables reside. Default values, 389 | color theme, configuration variables, etc. go into this file. 390 |

    391 | 392 |

    Here's what the _variables.scss file might look like :

    393 | 394 | // _variables.scss 395 | 396 |
     397 | /* _____ VARIABLES _____ */
     398 | 
     399 | // Generic
     400 | // ==========================================================================
     401 | 
     402 | $default-borderRadius: 4;
     403 | $containerWidth: 760;
     404 | 
     405 | 
     406 | 
     407 | // Colors
     408 | // ==========================================================================
     409 | 
     410 | $color-default-light:   #fff;
     411 | $color-default-dark:    #333;
     412 | $color-default-darker:  #000;
     413 | 
     414 | $color-main:            #ff7f50;
     415 | $color-main-light:      #ff9e7e;
     416 | $color-main-lighter:    #ffdec7;
     417 | 
     418 | $color-secondary:       #5cbcaa;
     419 | 
     420 | $color-alt:             #f1ede4;
     421 | $color-alt-dark:        #c2c0bc;
     422 | $color-alt-light:       #f8f5ec;
     423 | 
     424 | $color-alt2:            #637c84;
     425 | 
    426 | 427 |
    428 |
  • 429 | 430 |
  • 431 |
    432 |

    The _fonts file is used —you guessed it— for the font-families declaration.
    433 | In our implementation, we use a font mixin that is in charge of generating a bulletproof syntax 434 | according to the passed configuration for each needed font, according to a file naming convention.

    435 | 436 |

    But where do we have to place the font files themselves, you may be wondering? Well, as 437 | this Sass structure is 438 | intended to be compiled to CSS in a different directory, the fonts will be in that directory. 439 | Typically, you'll have the custom.scss file in a "sass" folder" compiled to a 440 | custom.css in a 441 | "css" or "styles" folder. The font files will have to be there (preferably in a "fonts" 442 | subfolder in order to stay nice and tidy).
    443 | Same goes for all the image files you may be referring to in your stylesheets. 444 |

    445 |
    446 |
  • 447 | 448 |
  • 449 |
    450 |

    _mixins is a place for you to store simple helper that you may want 451 | to reutilize throughout the site, but are not generic enough to endup in the 452 | utils/_mixins file. 453 |

    454 |
    455 |
  • 456 | 457 |
  • 458 |
    459 |

    _globals contains rules that are global 460 | to the site. Things like box-sizing type, html font size, body background color, 461 | headings and link defaults, etc. are defined here. It is also be a good place to store 462 | your layout definition if it is used for all pages on the site. 463 |

    464 |
    465 |
  • 466 | 467 |
468 | 469 |

Components folder

470 | 471 |

472 | The "components" folder is where your ui-components are located. It is the place dedicated to 473 | store your reusable UI appearance.
474 | Components are an important part of DoCSSa, and we dedicated a whole section to explain all there is to know about them, 475 | so we won't say much more about them here. 476 |

477 | 478 |

Specifics folder

479 | 480 |

The "specifics" folder is your common playground. It is where you'll place the rules that don't belong 481 | in the "base" or "components" folders. Until you become fluent with DoCSSa's organization system, what will 482 | eventually end up in a component will probably exist in here first.

483 | 484 |

Specifics is the closest thing to your usual CSS file, except that everything in there 485 | is split and dispatched in files and folders according to what they apply to. This fragmentation 486 | is key to keeping things maintainable!

487 | 488 |

By convention, we're using two underscores(__) as a prefix for files that act as an import 489 | summary, and only one underscore(_) for files which are content only. This usually evolves with the 490 | project: you begin with an underscore prefixed file, you add another one, and at some point you stop calling them 491 | directly from the main .scss file and you reorganize them in a folder with its own summary file.

492 | 511 | 512 |

DoCSSa encourages you to keep your definitions tidy and reorganize in subfolders as soon as it makes 513 | sense.
514 | No file should ever be big enough that you can't scroll through it in a few mousewheel movements 515 | max!

516 | 517 |

Before everyone in your team is familiar with DoCSSa, it can be helpful for occasional contributors 518 | wondering where to place their code to have a dedicated file. In such case, we recommend using 519 | a _inbox.scss file in the "specifics" folder and ask them to commit their work in there.
520 | It shall be emptied regularly by a more experienced DoCSSa user, who would move the CSS rules 521 | defined in there to the correct place in the architecture. 522 |

523 | 524 | 525 |

Vendor folder

526 | 527 |

The vendor folder is where we import SCSS files that come from third parties and can be updated at 528 | any time. It can import from a bower folder, or have its assets directly in the folder. 529 | As the .scss syntax is CSS compatible, all we have to do is to rename the .css files to 530 | .scss, in order for them to be integrated to the .css compilation instead of referenced by the CSS 531 | file as a classic @import.

532 | 533 |

_normalize.scss is an excellent candidate for this section, along with more project specific 534 | third party CSS. We currently rely on bower for fetching it for us.

535 |
536 | 537 |
538 | 539 |
540 | 541 |
542 | 543 |
544 |

Components

545 |
546 | 547 |
548 |

Introduction

549 |

Components are an important part of DoCSSa. They have been redesigned since version 1 of DoCSSa 550 | to become simpler and easier to use. They are the "Deferred Object" part of DoCCSa. 551 |

552 |

We say the Object is Deferred because its core resides in an abstraction (the mixin) 553 | instead of being tied to a classname. DoCSSa's components are class agnostic. They are made of mixins. 554 | A component mixin is in charge of binding the reusable styling to one or several HTML class(es). 555 | Thanks to the BEM naming convention, the class passed to the component mixin can be 556 | a prefix for other classes onto which to bind functionalities. 557 |

558 |

This allows for components to be instantiated on any class, and to be composable if needed. 559 |

560 |

As the component is not tied to a particular class, you can use it on whatever class you want, whenever you want, 561 | from the stylesheet side. That means that you can (and should) keep a semantic meaning to your HTML classes, and change 562 | their look and feel without having to modify the markup.
563 | When your markup comes from a RTE, this is a huge gain. 564 | You can change the styling without asking the contributors to change their habits, and you can 565 | affect everything already written without having to make search&replace throughout a database or without 566 | having a "red" class helper mean the color is going to be purple! 567 |

568 |

569 | For example, instead of having a link with the "button red" classes, you can give it a "navTrigger" 570 | class and bind a button component with a red skin to it. You could 571 | also use the same component on a "submitTrigger" class so that both look the same. When time comes 572 | to have a different look for your submits, all you have to do is bind the submitTrigger to another component 573 | and you're done, without affecting the navTriggers and without touching the markup.
574 | Note that for advanced components, 575 | the HTML may be expected to conform to a particular structure to be a valid target. 576 |

577 |

If you need a component with a slightly different behaviour than the original one, you can pass 578 | a parameter to the mixin to change the binding (or rules). If the exceptions become too numerous, 579 | it's probably time to consider creating another component or a set of small components. 580 |

581 |
582 |

Here is what a component definition looks like : 583 |

584 | 585 | // component example 586 |
 587 | // map the placeholders content to some selectors through a mixin
 588 | @mixin example($selector, $defaultSkin: true) {
 589 | 
 590 |   #{$selector} {
 591 |     padding: 10px;
 592 |   }
 593 | 
 594 |   #{$selector}_inner {
 595 |     padding: 20px;
 596 |   }
 597 | 
 598 |   #{$selector}:hover {
 599 |     padding: 30px;
 600 |   }
 601 | 
 602 |   @if $defaultSkin != false {
 603 |     @include example-skin-default($selector, $hover);
 604 |   }
 605 | 
 606 | }
 607 | 
608 | 609 |
610 |

In order to fulfill their role, components need to respect those two guidelines :

611 |
    612 |
  • A component should be self contained.

    613 | 614 |

    This means that what is outside of the visual boundaries of the 615 | component doesn't belong in the component definition. Typically, things like margins or positioning 616 | should reside in the "specifics" folder, not in the component. This is required for your component to 617 | live in any possible context.

    618 |
  • 619 |
  • Structure(layout) should be dissociated from skin(paint).

    620 | 621 |

    For example, background color, images, text colors, etc. may go into the skin section of the 622 | component, not in its core definition. That way, you can create additional styles for them without 623 | altering their expected behaviour as a component, and choose what visual style you want when binding 624 | the component to a classname.

    625 |
  • 626 |
627 |

Of course, it's up to you to compose with those precepts and adapt them to your constraints, but 628 | respecting them results in a clean separation of concerns and genuinely reusable components, which is much 629 | likely to make your dev faster further down the road. 630 |

631 |

632 | When beginning with DoCSSa, it's easy to think as everything as components, as they are so powerful. 633 | You must be careful about that, and think about what needs to be a component and what doesn't.
634 | If you component-ize every set of rules, you risk spending more time building the same thing as you 635 | would have in the "specifics" folder without enough additional value for it to be worth it. 636 | Try to begin with small components to get the hang of it, and adjust your use little by little.
637 | You can begin everything the way you are used to in the "specifics" folder, organize it 638 | in imported files and subfolders the DoCSSa way, and only extract a functionality to a component 639 | when you feel that it would help you.
640 | DoCSSa only gives you tools to play with, what you implement and how you do things with it is up to you. 641 | That's what we believe a "framework" should be anyway. 642 |

643 |

Description

644 |

When looking at a component folder, you will see one file, and possibly some subfolders. 645 | Let's take a Tabs component as an example, as probably everyone has already seen a tabbed 646 | navigation in a page. The file in the Tabs folder would be: _tabs.scss.
647 | It is the component definition. Let's look at it in details. 648 |

649 |

Component's definition

650 |

The component definition file contains two mixins. One for the component structure, one for 651 | the component's skin. 652 |

653 |

Here's the structure part of our "tabs" component :

654 | 655 |
656 |
    657 |
  • 658 | // components/tabs/_tabs.scss 659 |
  • 660 |
661 |
 662 | 
 663 | // _____ STRUCTURE _____ //
 664 | 
 665 | // define the component structure
 666 | @mixin tabs($selector, $defaultSkin: true) {
 667 | 
 668 |   #{$selector} {
 669 |    display: inline-block;
 670 |     margin: 0;
 671 |     padding: 0;
 672 |     font-size: 0;
 673 |   }
 674 | 
 675 |   #{$selector}_item {
 676 |     @include remIt(font-size, 18);
 677 |     display: inline-block;
 678 |     vertical-align: bottom;
 679 |     line-height: 2.5;
 680 |   }
 681 | 
 682 |   #{$selector}_link {
 683 |     padding: 0 10px;
 684 |   }
 685 | 
 686 |   @if $defaultSkin != false {
 687 |     @include tabs-skin-default($selector);
 688 |   }
 689 | 
 690 | }
 691 | 
692 | 693 |
694 | 695 |

A mixin named after the component is all it takes. Its role is to 696 | actually bind the component's styling rules to the provided classname, its "elements", and its state. 697 |

698 |

We recommend that the "structure" part of the component doesn't make use of any 699 | project variable in order to stay as generic and reusable as possible. 700 |

701 |

By default, the component binding will also implement the default skin. If we have defined another 702 | skin, all we need to do is pass "$defaultSkin: false" when instantiating the component, and 703 | call another skin binding mixin to handle the component's skin. 704 |

705 |

We said earlier that a component folder may have subfolders. One of those is a "_skins" 706 | folder that would host different skins that we could import as needed. The "_skins" folder 707 | is prefixed by an underscore only so that it always show on top of the list in case you need 708 | some other folders in there. 709 |

710 |

Now let's look at the skin part of our "tabs" component : 711 |

712 | // A component's skin part 713 |
 714 | // _____ SKIN _____ //
 715 | 
 716 | // provide a default skin for the component
 717 | // only visual changes that don't affect the component layout should be in here
 718 | @mixin tabs-skin-default($selector) {
 719 | 
 720 |   #{$selector} {
 721 |     list-style: none;
 722 |   }
 723 | 
 724 |   #{$selector}_item {
 725 |     border-bottom: 1px solid $color-main-lighter;
 726 | 
 727 |     &._is_current {
 728 |       border-bottom: 3px solid $color-main-light;
 729 |     }
 730 |   }
 731 | 
 732 |   #{$selector}_item--highlighted {
 733 |     background: $color-alt-light;
 734 |   }
 735 | 
 736 |   #{$selector}_link {
 737 |     @include basicClickable(true);
 738 |     border-left: 1px solid $color-main;
 739 |     color: $color-default-dark;
 740 |     font-family: 'titillium', Arial, 'sans-serif';
 741 | 
 742 |     #{$selector}_item:first-child & {
 743 |       border-left: 0;
 744 |     }
 745 | 
 746 |     #{$selector}_item._is_current & {
 747 |       color: $color-main-light;
 748 |     }
 749 | 
 750 |     &:hover {
 751 |       background: $color-alt;
 752 |     }
 753 |   }
 754 | }
 755 | 
756 | 757 |

As you can see, it is very close to the structure part. Actually it is placed inside the component's 758 | folder for simplicity, but it could very well reside in a _skins folder right away. 759 |

760 |

As stated before, a component's "structure" should only contain it's layout, it's skeleton. 761 | The "skin" part, unlike the structure, should 762 | only contain rules that don't affect the structure. These rules can be 763 | background-colors, background-images, border-radius, shadows, opacity... Anything you want as long as it doesn't 764 | fiddle with the component's external boundaries.
765 | It is not always easy, but the more you practice it the 766 | more it feels natural, and the easier it is to find out the right place when you come back to adjust 767 | something about your component. 768 |

769 |

Implementation

770 |

Now that we know how a component is structured, it's time to implement it. 771 | This is done by calling the component mixin and passing it a class selector. 772 |

773 |

Here's what an implementation may look like :

774 | // in specifics/_main.scss 775 |
 776 |     @include tabs('.mainMenu');
 777 |     
778 |

That's right, now that you have defined your component, using it is as easy as that!

779 |

And here is what the output css will look like :

780 | 781 | 782 | 783 | 784 | // in css/custom.css 785 |
 786 | .mainMenu {
 787 |     display: inline-block;
 788 |     margin: 0;
 789 |     padding: 0;
 790 |     font-size: 0;
 791 | }
 792 | .mainMenu_item {
 793 |     font-size: 18px;
 794 |     display: inline-block;
 795 |     vertical-align: bottom;
 796 |     line-height: 2.5;
 797 | }
 798 | .cssremunit .mainMenu_item {
 799 |     font-size: 1.125rem;
 800 | }
 801 | .mainMenu_link {
 802 |     padding: 0 10px;
 803 | }
 804 | 
 805 | 
 806 | .mainMenu {
 807 |     list-style: none;
 808 | }
 809 | .mainMenu_item {
 810 |     border-bottom: 1px solid #ffdec7;
 811 | }
 812 | .mainMenu_item._is_current {
 813 |     border-bottom: 3px solid #ff9e7e;
 814 | }
 815 | .mainMenu_item--highlighted {
 816 |     background: #f8f5ec;
 817 | }
 818 | .mainMenu_link {
 819 |     background: none;
 820 |     border: 0;
 821 |     cursor: pointer;
 822 |     text-decoration: none;
 823 |     border-left: 1px solid #ff7f50;
 824 |     color: #333;
 825 |     font-family: 'titillium', Arial, 'sans-serif';
 826 | }
 827 | .mainMenu_item:first-child .mainMenu_link {
 828 |     border-left: 0;
 829 | }
 830 | .mainMenu_item._is_current .mainMenu_link {
 831 |     color: #ff9e7e;
 832 | }
 833 | .mainMenu_link:hover {
 834 |     background: #f1ede4;
 835 | }
 836 | 
837 |

If later on you need to bind the tabs component to another class, all you have to do is to call the mixin 838 | with that class and the parameters you want, and you're done! 839 |

840 |

For example :

841 | // in specifics/_main.scss 842 |
 843 | @include tabs('.articleTabs', $defaultSkin: false);
 844 | @include tabs-skin-alternate('.articleTabs');
 845 | 
846 |
847 | 848 |
849 | 850 |
851 | 852 |
853 | 854 |
855 |

Naming conventions

856 |
857 | 858 |
859 |

HTML classes

860 | 861 |

In DoCSSa, we decided to follow BEM class naming convention.
862 | HTML class names for Blocks are lowerCamelCase, and the Elements nested 863 | within are separated by 864 | an underscore(_). Modifiers are separated by a double dash(--), and they are used 865 | for elements 866 | variants. An element's state is written separately with a pattern that 867 | begins with "_is_". 868 |

869 | 870 |

871 | Variants are dissociated from states because they play a different role, 872 | and it appeared that with our components architecture, having a simple "_is_current" class for our items' 873 | "current" state was way more effective than a "mainMenu_item--current" when it came to modifying the state through 874 | javascript.
875 | BEM modifiers are now exclusively used for visual variants that don't change over time. They 876 | have a meaning at the content(HTML) level. For example, if a tab needs to be highlighted so that 877 | it stands out, it is applied a variant by using a modifier.
878 | By opposition, a "state" is something that is supposed to be handled by javascript and 879 | change over time. 880 |

881 | 882 |
883 |

Here is an example of what that convention may look like in our tab example :

884 | // naming example 885 |
 886 | <nav class="mainNav">
 887 |     <ul class="mainMenu">
 888 |         <li class="mainMenu_item">
 889 |             <a class="mainMenu_link" href="#">Home</a>
 890 |         </li>
 891 |         <li class="mainMenu_item">
 892 |             <a class="mainMenu_link" href="#about">About</a>
 893 |         </li>
 894 |         <li class="mainMenu_item">
 895 |             <a class="mainMenu_link" href="#fileStructure">File Structure</a>
 896 |         </li>
 897 |         <li class="mainMenu_item">
 898 |             <a class="mainMenu_link" href="#components">Components</a>
 899 |         </li>
 900 |         <li class="mainMenu_item _is_current">
 901 |             <a class="mainMenu_link" href="#namingConventions">Naming conventions</a>
 902 |         </li>
 903 |         <li class="mainMenu_item">
 904 |             <a class="mainMenu_link" href="#responsive">Responsive</a>
 905 |         </li>
 906 |         <li class="mainMenu_item">
 907 |             <a class="mainMenu_link" href="#gettingStarted">Getting started</a>
 908 |         </li>
 909 |         <li class="mainMenu_item mainMenu_item--highlighted">
 910 |             <a class="mainMenu_link" href="#contributing">Contributing</a>
 911 |         </li>
 912 |     </ul>
 913 |     <button class="mainNav_opener"></button>
 914 | </nav>
 915 | 
916 | Note that this example is taken from the menu you're looking at just now in the present 917 | page. 918 |
919 |

At first, the BEM notation style can seem quite verbose and put off some developers, but it 920 | is very powerful and allows us to go way behind old school naming conventions.
921 | It has to be tamed, though, and a classic beginner's mistake is to reflect the position of 922 | each element in the component's DOM in its class name. To avoid that, we recommend that you look 923 | at your low level elements first (those deeper in the DOM tree) and wonder if they could exist 924 | elsewhere in the page or in the component. 925 | Going up the tree, you can identify your most basic reusable components and set the names 926 | accordingly. 927 |

928 | 929 |

930 | For example, in our example above, the "mainMenu_link" class doesn't need to reflect the 931 | fact that it is contained in a "mainMenu_item", this doesn't really matter to the link, so there is no 932 | reason to specify it in its name.
933 | Also, if the element can live outside the block you're looking at, it's probably not a good 934 | idea to tie it to it, and it probably should exist on its own. 935 |

936 | 937 |

Sass files

938 | 939 |

We talked about some of the aspects of the Sass file naming convention in the "File 940 | Structure" section.

941 | 942 |

Each file is lowerCamelCase named and prefixed by an underscore(_) so that it is considered 943 | by the Sass compiler as a partial and not rendered to a standalone CSS file. 944 |

945 | 946 |

947 | Each folder has a single entry point in charge of importing other partial Sass files. This 948 | file is named after the folder's name, and is prefixed with two underscores(__) so that it always 949 | appears on top in the files list. It imports only the files in its own folder, except for other summary 950 | indexes located in a direct subfolder. This way, you always can handle your imports very easily and stop the 951 | imports of nested files at any level.
952 | Components definition files should have the same name as the component's folder name, and 953 | have a single underscore prefix, as they are content and not imports list. 954 |

955 | 956 |

SASS variables

957 | 958 |

Sass variable names should be composed of dash(-) separated parts, with each part sorted from 959 | the most generic to the most specific variable characteristic. This is quite useful in most IDE as 960 | you can take advantage of autocompletion. 961 |

962 | 963 |
964 |

For example :

965 | // variables example 966 |
 967 | /* _____ VARIABLES _____ */
 968 | 
 969 | // Generic
 970 | // ==========================================================================
 971 | 
 972 | $default-borderRadius: 4;
 973 | $containerWidth: 760;
 974 | 
 975 | 
 976 | 
 977 | // Colors
 978 | // ==========================================================================
 979 | 
 980 | $color-default-light:   #fff;
 981 | $color-default-dark:    #333;
 982 | $color-default-darker:  #000;
 983 | 
 984 | $color-main:            #ff7f50;
 985 | $color-main-light:      #ff9e7e;
 986 | $color-main-lighter:    #ffdec7;
 987 | 
 988 | $color-secondary:       #5cbcaa;
 989 | 
 990 | $color-alt:             #f1ede4;
 991 | $color-alt-dark:        #c2c0bc;
 992 | $color-alt-light:       #f8f5ec;
 993 | 
 994 | $color-alt2:            #637c84;
 995 | 
996 |
997 |
998 |
999 | 1000 |
1001 | 1002 |
1003 | 1004 |
1005 |

Responsive

1006 |
1007 | 1008 |
1009 |

Introduction

1010 |

Now that you're all familiar with the core concepts and basic implementation of DoCSSa, it's time 1011 | to take it to the next level and see how we can handle Responsive Web Design (RWD).
1012 | As you may have noticed, the main menu on the page you are currently looking at changes depending 1013 | on the width of the viewport. We'll use it as an example to show you how to handle RWD.

1014 |

As always, there isn't a one size fit all solution, and your mileage may vary, but we thought 1015 | it would be nice to provide at least one implementation of a responsive widget.

1016 | 1017 |

Dispatching the roles

1018 |

In order to have responsive tabs on this page, we had to decide what was going to be part of a 1019 | component, and what would be outside. We chose to create a responsive component that would 1020 | display horizontally from 900px and up, and vertically below that breakpoint.
1021 | As a component should be as reusable as possible, we made that value a parameter of the component 1022 | mixin.
1023 | We also wanted the vertical menu to be hidden by default, and only revealed when clicking on a burger 1024 | icon. This is a specific implementation : all responsive tabs don't need to hide the menu when they 1025 | are in vertical state. As such, we handled the hiding and revealing of the menu in the "specifics" part 1026 | and kept the component unaware of those specifics.

1027 | 1028 |

Responsive component

1029 |

Here is what our sample component looks like :

1030 | 1031 |
1032 |
    1033 |
  • 1034 | // components/responsiveTabs/_responsiveTabs.scss 1035 |
  • 1036 |
1037 | 1038 |
1039 | // _____ STRUCTURE _____ //
1040 | 
1041 | // define the component structure
1042 | @mixin responsiveTabs($selector, $breakpoint: 900, $defaultSkin: true) {
1043 | 
1044 |   // handle tabs vertically until breakpoint
1045 |   @media (max-width: #{($breakpoint - 1)}px) {
1046 | 
1047 |     #{$selector} {
1048 |       padding: 0;
1049 |     }
1050 | 
1051 |     #{$selector}_link {
1052 |       display: block;
1053 |       padding: 20px;
1054 |     }
1055 |   }
1056 | 
1057 |   // handle tabs horizontally until breakpoint
1058 |   @media (min-width: #{$breakpoint}px) {
1059 | 
1060 |     #{$selector} {
1061 |       display: inline-block;
1062 |       margin: 0;
1063 |       padding: 0;
1064 |       font-size: 0;
1065 |     }
1066 | 
1067 |     #{$selector}_item {
1068 |       @include remIt(font-size, 18);
1069 |       display: inline-block;
1070 |       vertical-align: bottom;
1071 |       line-height: 2.5;
1072 |     }
1073 | 
1074 |     #{$selector}_link {
1075 |       padding: 0 10px;
1076 |     }
1077 |   }
1078 | 
1079 |   @if $defaultSkin != false {
1080 |     @include responsiveTabs-skin-default($selector, $breakpoint);
1081 |   }
1082 | 
1083 | }
1084 | 
1085 | // _____ SKIN _____ //
1086 | 
1087 | // provide a default skin for the component
1088 | // only visual changes that don't affect the component layout should be in here
1089 | @mixin responsiveTabs-skin-default($selector, $breakpoint) {
1090 | 
1091 |   #{$selector} {
1092 |     list-style: none;
1093 |   }
1094 | 
1095 |   #{$selector}_item {
1096 |     border-bottom: 1px solid $color-main-lighter;
1097 |   }
1098 | 
1099 |   #{$selector}_item--highlighted {
1100 |     background: $color-alt-light;
1101 |   }
1102 | 
1103 |   #{$selector}_link {
1104 |     @include basicClickable(true);
1105 |     color: $color-default-dark;
1106 |     font-family: 'titillium', Arial, 'sans-serif';
1107 | 
1108 |     #{$selector}_item._is_current & {
1109 |       color: $color-main-light;
1110 |     }
1111 | 
1112 |     &:hover {
1113 |       background: $color-alt;
1114 |     }
1115 |   }
1116 | 
1117 |   // set specific visual adjustments for horizontal display
1118 |   @media (min-width: #{$breakpoint}px) {
1119 | 
1120 |     #{$selector}_item {
1121 |       &._is_current {
1122 |         border-bottom: 3px solid $color-main-light;
1123 |       }
1124 |     }
1125 | 
1126 |     #{$selector}_link {
1127 |       border-left: 1px solid $color-main;
1128 | 
1129 |       #{$selector}_item:first-child & {
1130 |         border-left: 0;
1131 |       }
1132 |     }
1133 |   }
1134 | 
1135 | }
1136 | 
1137 | 
1138 |
1139 |

As usual, the component is split in two parts: the structure and the skin. Its implementation 1140 | is located in specifics/_nav.scss: 1141 |

1142 | @include responsiveTabs('.mainMenu', $breakpoint: 900);
1143 | 
1144 |

As an experiment, you can add a "$defaultSkin: false" parameter to the call to see 1145 | how the component looks like with no skin applied. You'll see that it behaves the same, but 1146 | doesn't look as good. 1147 |

1148 |

On the structure part, things are quite simple: we declare a totally different set of 1149 | rules for below or above the breakpoint. It is not mandatory, but can help avoiding regression 1150 | in the long run.

1151 |

On the skin part, we tried to keep most rules generic. We wanted both layout to have the 1152 | same look&feel. Still, some visual enhancements only made sense in the horizontal 1153 | display, so we made sure they got scoped to the correct media query.

1154 | 1155 |

Responsive implementation

1156 | 1157 |

Once we have a responsive component, all we have to do is give it some boundaries.
1158 | In the "specifics" section we call the component and pass it a breakpoint. We also set some 1159 | rules to the "mainNav" wrapper according to this breakpoint: the position 1160 | of the tabs in the page, and the visual enhancement that go with it. For example, we set a 1161 | bottom drop shadow for the horizontal state of the menu, and a right drop shadow for its 1162 | vertical state. We also make sure the burger menu toggler is hidden when we don't need it, 1163 | and the vertical menu respects a specific width.

1164 | 1165 |
1166 |
    1167 |
  • 1168 | // specifics/_nav.scss 1170 |
  • 1171 |
1172 | 1173 |
1174 | $nav-breakpoint: 900;
1175 | $left-nav-width: 200;
1176 | 
1177 | // bind the responsive tabs mixin to the .mainMenu class
1178 | @include responsiveTabs('.mainMenu', $breakpoint: 900);
1179 | 
1180 | // handle menu position and visibility
1181 | @media (max-width: #{($nav-breakpoint - 1)}px) {
1182 |   .mainNav {
1183 |     @include transition('left .2s linear');
1184 |     @include box-shadow(0 3px 3px 3px rgba(0, 0, 0, .3));
1185 |     position: absolute;
1186 |     top: 0;
1187 |     bottom: 0;
1188 |     left: -#{$left-nav-width}px;
1189 |     z-index: 999;
1190 |     background: $color-default-light;
1191 |     width: #{$left-nav-width}px;
1192 | 
1193 |     &._is_open {
1194 |       left: 0;
1195 |     }
1196 |   }
1197 | 
1198 |   .mainNav_opener {
1199 |     display: block;
1200 |     position: absolute;
1201 |     top: 20px;
1202 |     left: #{$left-nav-width + 20}px;
1203 |     z-index: 998;
1204 |     border: 1px solid $color-default-light;
1205 |     background: $color-main;
1206 |     padding: 0;
1207 |     width: 30px;
1208 |     height: 30px;
1209 |     overflow: hidden;
1210 |     text-indent: -999px;
1211 |     color: $color-default-light;
1212 | 
1213 |     &:before {
1214 |       display: block;
1215 |       width: 28px;
1216 |       height: 30px;
1217 |       text-align: center;
1218 |       text-indent: 0;
1219 |       line-height: 1.8;
1220 |       content: '\2630';
1221 |     }
1222 | 
1223 |     .mainNav._is_open &:before {
1224 |       content: '\2613';
1225 |     }
1226 |   }
1227 | }
1228 | 
1229 | @media (min-width: #{$nav-breakpoint}px) {
1230 | 
1231 |   .mainNav {
1232 |     @include box-shadow('0 3px 5px rgba(0,0,0,.3)');
1233 |     @include box-opacity(.95);
1234 |     position: fixed;
1235 |     top: 0;
1236 |     right: 0;
1237 |     bottom: auto;
1238 |     left: 0;
1239 |     background: $color-default-light;
1240 |     text-align: right;
1241 |   }
1242 | 
1243 |   .mainNav_opener {
1244 |     display: none;
1245 |   }
1246 | 
1247 | }
1248 | 
1249 |
1250 | 1251 |

All there is left to do is use a bit of javascript to drive the state of the mainNav wrapper, 1252 | and voila, a responsive menu we have!

1253 | 1254 |
1255 | 1256 |
1257 | 1258 |
1259 | 1260 |
1261 | 1262 |
1263 |

Getting started

1264 |
1265 | 1266 |
1267 | 1268 |

Download the kit

1269 | Download this page and its implementation of DoCSSa and play with it.
1270 | Source code can be found on 1271 | DoCSSa's github page. 1272 |

Learn about the basics

1273 | 1317 |

How to start ?

1318 |
    1319 |
  1. 1320 |
    1321 | First, you can simply write CSS code in separated files into the "specifics" folder, 1322 | using DoCSSa's logic. 1323 |
    1324 |
  2. 1325 |
  3. 1326 |
    1327 | Then, try manipulating the provided "_mixins" from the base/utils folder 1328 | to give your project more reusable code. 1329 |
    1330 |
  4. 1331 |
  5. 1332 |
    1333 | After that, you may write your own "_mixins", tailored for your own 1334 | specific needs. 1335 |
    1336 |
  6. 1337 |
  7. 1338 |
    1339 | For more reusability within or across your project(s), you may then try to convert 1340 | some of your "specifics" rules into "components".
    1341 | If see you are repeating the same rules on different sets of classes, you have a good candidate. 1342 |
    1343 |
  8. 1344 |
  9. 1345 |
    1346 | Been there, done that ? It's time to preach the choir ;) 1347 |
    1348 |
  10. 1349 |
1350 | 1351 |

I'm the team lead of a non expert koala army, how can I make use of DoCSSa's powers ?

1352 |
    1353 |
  1. 1354 |
    1355 | While your koalas are learning Sass, they can keep writing the same old CSS in 'specifics' folder 1356 |
    1357 |
  2. 1358 |
  3. 1359 |
    1360 | Once one of them feels ready to, let her write a component and let the whole team know 1361 | they can use it. 1362 |
    1363 |
  4. 1364 |
  5. 1365 |
    1366 | It won't be long before some other koalas would like to write a useful component too. 1367 |
    1368 |
  6. 1369 |
  7. 1370 |
    1371 | With knowledge adding up, it will become easier to detect components candidates. 1372 |
    1373 |
  8. 1374 |
  9. 1375 |
    1376 | Don't forget to offer your koalas a lot of eucalyptus regularly. 1377 |
    1378 |
  10. 1379 |
1380 | 1381 |
1382 |
1383 | 1384 |
1385 | 1386 |
1387 | 1388 |
1389 |

Contributing

1390 |
1391 | 1392 |
1393 | 1394 |

Contact us

1395 | 1396 |

DoCSSa is evolving!
1397 | We are very interested in your feedback to improve it or learn about how you implemented 1398 | it.
1399 | Please contact us, fork 1400 | the project, make Pull Requests 1401 | or talk about DoCSSa at will. 1402 |

1403 |
1404 |
1405 | 1406 |
1407 | 1408 |
1409 | Presented by Matthieu Larcher & 1410 | Fabien Zibi 1411 | 1412 |
    1413 |
  • 1414 | 1415 | 1416 |
  • 1417 |
  • 1418 | 1419 |
  • 1420 |
  • 1421 | 1423 |
  • 1424 |
  • 1425 | github 1426 |
  • 1427 |
1428 |
1429 | 1430 |
1431 | 1432 | 1433 | 1434 | 1435 | 1436 | 1437 | 1454 | 1455 | 1456 | 1457 | -------------------------------------------------------------------------------- /js/main.js: -------------------------------------------------------------------------------- 1 | (function ($, window, undefined) { 2 | "use strict"; 3 | 4 | $(document).ready(function () { 5 | 6 | var mainItems, 7 | currentMainMenuItem, 8 | currentMainSection, 9 | scrollTarget = $('html, body'), 10 | mainHeader, 11 | mainFooter, 12 | hashPrefix, 13 | mainNav, 14 | navOpener, 15 | goTop, 16 | sampleLink, 17 | body; 18 | 19 | mainNav = $('.mainNav'); 20 | mainItems = $('.mainMenu_item'); 21 | mainHeader = $('.mainHeader'); 22 | mainFooter = $('.mainFooter'); 23 | navOpener = $('.mainNav_opener'); 24 | goTop = $('.goTop'); 25 | sampleLink = $('.sampleHeader_link'); 26 | body = $('body'); 27 | 28 | 29 | mainItems.bind('click', function (e) { 30 | e.preventDefault(); 31 | navigateTo($(this)); 32 | }); 33 | 34 | function navigateTo($navItem, replace, subItemDest) { 35 | var href, 36 | scrollV; 37 | 38 | mainHeader.hide(); 39 | mainFooter.hide(); 40 | 41 | if (currentMainMenuItem) { 42 | currentMainMenuItem.removeClass('_is_current'); 43 | } 44 | if (currentMainSection) { 45 | currentMainSection.removeClass('_is_current'); 46 | } 47 | 48 | currentMainMenuItem = $navItem.addClass('_is_current'); 49 | href = currentMainMenuItem.find('.mainMenu_link').attr('href'); 50 | 51 | if (href === '#') { 52 | mainHeader.show(); 53 | mainFooter.show(); 54 | } else { 55 | currentMainSection = $(href).addClass('_is_current'); 56 | } 57 | 58 | scrollTarget.scrollTop(0); 59 | 60 | if (history.pushState) { 61 | if (replace) { 62 | //history.replaceState({}, "", href); 63 | } else { 64 | history.pushState({}, "", href); 65 | } 66 | } else { 67 | // provide a fallback 68 | scrollV = document.body.scrollTop; 69 | location.hash = href; 70 | document.body.scrollTop = scrollV; 71 | } 72 | 73 | if (subItemDest) { 74 | window.location.hash = subItemDest; 75 | } 76 | } 77 | 78 | //mainItems.eq(1).find('.mainMenu_link').trigger('click'); 79 | if (window.location.hash) { 80 | hashPrefix = window.location.hash.replace(/_+.*/, ''); 81 | navigateTo(mainItems.find('.mainMenu_link').filter('[href=' + hashPrefix + ']').parents('li'), false, window.location.hash); 82 | } else { 83 | navigateTo(mainItems.find('.mainMenu_link').filter('[href=#]').parents('li'), true); 84 | } 85 | 86 | 87 | // sample switcher 88 | sampleLink.click(function () { 89 | var $this = $(this); 90 | $this.closest('.sampleHeader').find('.sampleHeader_item').toggleClass('_is_current'); 91 | $this.closest('.sample').find('pre').toggleClass('_is_hidden'); 92 | }); 93 | 94 | 95 | // Nav toggle 96 | navOpener.click(function () { 97 | mainNav.toggleClass('_is_open'); 98 | }); 99 | 100 | 101 | // goTop 102 | goTop.click(function (event) { 103 | $('html, body').animate({ 104 | scrollTop: 0 105 | }, 300); 106 | }); 107 | 108 | 109 | }); 110 | 111 | }(jQuery, window)); 112 | -------------------------------------------------------------------------------- /js/modernizr.custom.20463.js: -------------------------------------------------------------------------------- 1 | /* Modernizr 2.7.1 (Custom Build) | MIT & BSD 2 | * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-flexboxlegacy-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-inlinesvg-svg-svgclippaths-touch-shiv-cssclasses-teststyles-testprop-testallprops-prefixes-domprefixes-contenteditable-contextmenu-cors-css_backgroundposition_xy-css_backgroundrepeat-css_boxsizing-css_calc-css_displaytable-css_hyphens-css_lastchild-css_pointerevents-css_positionsticky-css_remunit-load 3 | */ 4 | ;window.Modernizr=function(a,b,c){function B(a){j.cssText=a}function C(a,b){return B(n.join(a+";")+(b||""))}function D(a,b){return typeof a===b}function E(a,b){return!!~(""+a).indexOf(b)}function F(a,b){for(var d in a){var e=a[d];if(!E(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function G(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:D(f,"function")?f.bind(d||b):f}return!1}function H(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return D(b,"string")||D(b,"undefined")?F(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),G(e,b,c))}var d="2.7.1",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l=":)",m={}.toString,n=" -webkit- -moz- -o- -ms- ".split(" "),o="Webkit Moz O ms",p=o.split(" "),q=o.toLowerCase().split(" "),r={svg:"http://www.w3.org/2000/svg"},s={},t={},u={},v=[],w=v.slice,x,y=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["­",'"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z={}.hasOwnProperty,A;!D(z,"undefined")&&!D(z.call,"undefined")?A=function(a,b){return z.call(a,b)}:A=function(a,b){return b in a&&D(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return H("flexWrap")},s.flexboxlegacy=function(){return H("boxDirection")},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.rgba=function(){return B("background-color:rgba(150,255,150,.5)"),E(j.backgroundColor,"rgba")},s.hsla=function(){return B("background-color:hsla(120,40%,100%,.5)"),E(j.backgroundColor,"rgba")||E(j.backgroundColor,"hsla")},s.multiplebgs=function(){return B("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return H("backgroundSize")},s.borderimage=function(){return H("borderImage")},s.borderradius=function(){return H("borderRadius")},s.boxshadow=function(){return H("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return C("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return H("animationName")},s.csscolumns=function(){return H("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return B((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),E(j.backgroundImage,"gradient")},s.cssreflections=function(){return H("boxReflect")},s.csstransforms=function(){return!!H("transform")},s.csstransforms3d=function(){var a=!!H("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return H("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var I in s)A(s,I)&&(x=I.toLowerCase(),e[x]=s[I](),v.push((e[x]?"":"no-")+x));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)A(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},B(""),i=k=null,function(a,b){function l(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function m(){var a=s.elements;return typeof a=="string"?a.split(" "):a}function n(a){var b=j[a[h]];return b||(b={},i++,a[h]=i,j[i]=b),b}function o(a,c,d){c||(c=b);if(k)return c.createElement(a);d||(d=n(c));var g;return d.cache[a]?g=d.cache[a].cloneNode():f.test(a)?g=(d.cache[a]=d.createElem(a)).cloneNode():g=d.createElem(a),g.canHaveChildren&&!e.test(a)&&!g.tagUrn?d.frag.appendChild(g):g}function p(a,c){a||(a=b);if(k)return a.createDocumentFragment();c=c||n(a);var d=c.frag.cloneNode(),e=0,f=m(),g=f.length;for(;e",g="hidden"in a,k=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){g=!0,k=!0}})();var s={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:c,shivCSS:d.shivCSS!==!1,supportsUnknownElements:k,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:r,createElement:o,createDocumentFragment:p};a.html5=s,r(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.testProp=function(a){return F([a])},e.testAllProps=H,e.testStyles=y,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?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)){"img"!=a&&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=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?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),"img"!=a&&(r||2===y[c]?(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("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&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&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},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;f7)}),Modernizr.addTest("cors",!!(window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest)),Modernizr.addTest("bgpositionxy",function(){return Modernizr.testStyles("#modernizr {background-position: 3px 5px;}",function(a){var b=window.getComputedStyle?getComputedStyle(a,null):a.currentStyle,c=b.backgroundPositionX=="3px"||b["background-position-x"]=="3px",d=b.backgroundPositionY=="5px"||b["background-position-y"]=="5px";return c&&d})}),function(){function a(a){return window.getComputedStyle?getComputedStyle(a,null).getPropertyValue("background"):a.currentStyle.background}Modernizr.testStyles(" #modernizr { background-repeat: round; } ",function(b,c){Modernizr.addTest("bgrepeatround",a(b)=="round")}),Modernizr.testStyles(" #modernizr { background-repeat: space; } ",function(b,c){Modernizr.addTest("bgrepeatspace",a(b)=="space")})}(),Modernizr.addTest("csscalc",function(){var a="width:",b="calc(10px);",c=document.createElement("div");return c.style.cssText=a+Modernizr._prefixes.join(b+a),!!c.style.length}),Modernizr.addTest("display-table",function(){var a=window.document,b=a.documentElement,c=a.createElement("div"),d=a.createElement("div"),e=a.createElement("div"),f;return c.style.cssText="display: table",d.style.cssText=e.style.cssText="display: table-cell; padding: 10px",c.appendChild(d),c.appendChild(e),b.insertBefore(c,b.firstChild),f=d.offsetLeftf,b?(d.innerHTML="m
m",f=d.offsetWidth,d.innerHTML="m"+a+"m",i=d.offsetWidth>f):i=!0,h===!0&&i===!0&&(g=!0),document.body.removeChild(c),c.removeChild(d),g}catch(k){return!1}}function c(a){try{var b=document.createElement("input"),c=document.createElement("div"),d="lebowski",e=!1,f,g=document.body.firstElementChild||document.body.firstChild;c.innerHTML=d+a+d,document.body.insertBefore(c,g),document.body.insertBefore(b,c),b.setSelectionRange?(b.focus(),b.setSelectionRange(0,0)):b.createTextRange&&(f=b.createTextRange(),f.collapse(!0),f.moveEnd("character",0),f.moveStart("character",0),f.select());if(window.find)e=window.find(d+d);else try{f=window.self.document.body.createTextRange(),e=f.findText(d+d)}catch(h){e=!1}return document.body.removeChild(c),document.body.removeChild(b),e}catch(h){return!1}}if(!document.body){window.console&&console.warn("document.body doesn't exist. Modernizr hyphens test needs it.");return}Modernizr.addTest("csshyphens",function(){if(!Modernizr.testAllProps("hyphens"))return!1;try{return a()}catch(b){return!1}}),Modernizr.addTest("softhyphens",function(){try{return b("­",!0)&&b("​",!1)}catch(a){return!1}}),Modernizr.addTest("softhyphensfind",function(){try{return c("­")&&c("​")}catch(a){return!1}})}(),Modernizr.addTest("lastchild",function(){return Modernizr.testStyles("#modernizr div {width:100px} #modernizr :last-child{width:200px;display:block}",function(a){return a.lastChild.offsetWidth>a.firstChild.offsetWidth},2)}),Modernizr.addTest("pointerevents",function(){var a=document.createElement("x"),b=document.documentElement,c=window.getComputedStyle,d;return"pointerEvents"in a.style?(a.style.pointerEvents="auto",a.style.pointerEvents="x",b.appendChild(a),d=c&&c(a,"").pointerEvents==="auto",b.removeChild(a),!!d):!1}),Modernizr.addTest("csspositionsticky",function(){var a="position:",b="sticky",c=document.createElement("modernizr"),d=c.style;return d.cssText=a+Modernizr._prefixes.join(b+";"+a).slice(0,-a.length),d.position.indexOf(b)!==-1}),Modernizr.addTest("cssremunit",function(){var a=document.createElement("div");try{a.style.fontSize="3rem"}catch(b){}return/rem/.test(a.style.fontSize)}),Modernizr.addTest("contextmenu","contextMenu"in document.documentElement&&"HTMLMenuItemElement"in window); -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docssa", 3 | "version": "2.0.0-rc1", 4 | "description": "A Sass based CSS architecture and methodology", 5 | "main": "index.html", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [ 10 | "docssa", 11 | "sass", 12 | "css", 13 | "architecture", 14 | "methodology", 15 | "boilerplate" 16 | ], 17 | "author": "Matthieu Larcher (http://www.ringabell.org)", 18 | "license": "ISC" 19 | } 20 | -------------------------------------------------------------------------------- /sass-update.bat: -------------------------------------------------------------------------------- 1 | call sass --update -scss sass:css 2 | pause 3 | -------------------------------------------------------------------------------- /sass-update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | sass --update --scss sass:css 3 | -------------------------------------------------------------------------------- /sass-watch.bat: -------------------------------------------------------------------------------- 1 | call sass --watch --scss sass:css 2 | pause 3 | -------------------------------------------------------------------------------- /sass-watch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | sass --watch --scss sass:css 3 | -------------------------------------------------------------------------------- /sass/base/__base.scss: -------------------------------------------------------------------------------- 1 | 2 | @import '_config'; 3 | @import 'utils/__utils'; 4 | @import 'project/__project'; 5 | -------------------------------------------------------------------------------- /sass/base/_config.scss: -------------------------------------------------------------------------------- 1 | // place variables that are needed by both the system utils and the project here 2 | 3 | $baseFontSize: 16; 4 | -------------------------------------------------------------------------------- /sass/base/project/__project.scss: -------------------------------------------------------------------------------- 1 | 2 | /* ===== PROJECT ===== */ 3 | @import '_variables'; 4 | @import '_fonts'; 5 | @import '_globals'; 6 | @import '_mixins'; 7 | -------------------------------------------------------------------------------- /sass/base/project/_fonts.scss: -------------------------------------------------------------------------------- 1 | @include importOnce('project-fonts') { 2 | 3 | /* _____ FONTS _____ */ 4 | 5 | @include importFont('titillium', 'titilliumweb-regular-webfont', 'titillium_webregular'); 6 | @include importFont('titillium', 'titilliumweb-bold-webfont', 'titillium_webbold', $isBold: true); 7 | @include importFont('robotoSlab', 'robotoslab-regular-webfont', 'roboto_slabregular'); 8 | @include importFont('robotoSlab', 'robotoslab-bold-webfont', 'roboto_slabbold', $isBold: true); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /sass/base/project/_globals.scss: -------------------------------------------------------------------------------- 1 | @include importOnce('project-globals') { 2 | 3 | /* _____ GLOBAL DEFAULTS _____ */ 4 | 5 | *, 6 | :before, 7 | :after { 8 | box-sizing: border-box; 9 | } 10 | 11 | html { 12 | width: 100%; 13 | height: 100%; 14 | font-size: 100%; 15 | } 16 | 17 | body { 18 | @include remIt(font-size, 16); 19 | @include radial-gradient($color-main-light, $color-main); 20 | background: #fff; 21 | width: 100%; 22 | min-height: 100%; 23 | line-height: 1.4; 24 | color: #000; 25 | font-family: Arial, "sans-serif"; 26 | } 27 | 28 | ul { 29 | list-style: square; 30 | } 31 | 32 | pre { 33 | background: #fff; 34 | padding: 10px; 35 | } 36 | 37 | p { 38 | margin: 0 0 20px; 39 | } 40 | 41 | h1, 42 | h2, 43 | h3, 44 | h4, 45 | h5, 46 | h6 { 47 | font-family: 'titillium', Arial, 'sans-serif'; 48 | } 49 | 50 | pre { 51 | // monospace defaults to Courrier New on windows, which seems to badly alter the = sign, so we'll avoid it 52 | font-family: consolas, monospace; 53 | } 54 | 55 | /* _____ LAYOUT _____ */ 56 | 57 | .mainContainer { 58 | @include clearfix; 59 | margin: 0 auto; 60 | width: 100%; 61 | max-width: #{$containerWidth}px; 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /sass/base/project/_mixins.scss: -------------------------------------------------------------------------------- 1 | // project specific mixins 2 | -------------------------------------------------------------------------------- /sass/base/project/_variables.scss: -------------------------------------------------------------------------------- 1 | /* _____ VARIABLES _____ */ 2 | 3 | // Generic 4 | // ========================================================================== 5 | 6 | $default-borderRadius: 4; 7 | $containerWidth: 760; 8 | 9 | 10 | 11 | // Colors 12 | // ========================================================================== 13 | 14 | $color-default-light: #fff; 15 | $color-default-dark: #333; 16 | $color-default-darker: #000; 17 | 18 | $color-main: #ff7f50; 19 | $color-main-light: #ff9e7e; 20 | $color-main-lighter: #ffdec7; 21 | 22 | $color-secondary: #5cbcaa; 23 | 24 | $color-alt: #f1ede4; 25 | $color-alt-dark: #c2c0bc; 26 | $color-alt-light: #f8f5ec; 27 | 28 | $color-alt2: #637c84; 29 | -------------------------------------------------------------------------------- /sass/base/utils/__utils.scss: -------------------------------------------------------------------------------- 1 | 2 | /* ===== UTILS ===== */ 3 | @import '_system'; 4 | @import '_mixins'; 5 | -------------------------------------------------------------------------------- /sass/base/utils/_mixins.scss: -------------------------------------------------------------------------------- 1 | /* _____ MIXINS _____ */ 2 | 3 | // Fonts 4 | // ========================================================================== 5 | 6 | @mixin importFont($fontname, $filename, $svgLabel, $isBold: false, $isItalic: false) { 7 | 8 | @font-face { 9 | font-family: $fontname; 10 | 11 | // IE9 Compat Modes 12 | src: url('fonts/#{$filename}.eot'); 13 | // IE6-IE8 14 | src: url('fonts/#{$filename}.eot?#iefix') format('embedded-opentype'), 15 | // Modern Browsers 16 | url('fonts/#{$filename}.woff') format('woff'), 17 | // Safari, Android, iOS 18 | url('fonts/#{$filename}.ttf') format('truetype'), 19 | // Legacy iOS 20 | url('fonts/#{$filename}.svg##{$svgLabel}') format('svg'); 21 | 22 | @if $isBold { 23 | font-weight: bold; 24 | } @else { 25 | font-weight: normal; 26 | } 27 | 28 | @if $isItalic { 29 | font-style: italic; 30 | } @else { 31 | font-style: normal; 32 | } 33 | } 34 | 35 | } 36 | 37 | 38 | // Units 39 | // ========================================================================== 40 | 41 | @mixin remIt($attr, $value, $value2: '', $before: '', $between:'', $after: '', $useModernizr: true) { 42 | 43 | $cssremunit: getPrefix(cssremunit, $useModernizr); 44 | 45 | // it's good to keep the fallback at all times for debug purpose 46 | @if $value2 == '' { 47 | #{$attr}: #{$before}#{$value}px#{$after}; 48 | } @else { 49 | #{$attr}: #{$before}#{$value}px#{$between}#{$value2}px#{$after}; 50 | } 51 | 52 | #{map-get($cssremunit, yes)} & { 53 | 54 | @if $value2 == '' { 55 | #{$attr}: #{$before}#{$value/$baseFontSize}rem#{$after}; 56 | } @else { 57 | #{$attr}: #{$before}#{$value/$baseFontSize}rem#{$between}#{$value/$baseFontSize}rem#{$after}; 58 | } 59 | 60 | } 61 | } 62 | 63 | // Helpers 64 | // ========================================================================== 65 | 66 | // reset button and link styles 67 | @mixin basicClickable($omitPadding: false) { 68 | background: none; 69 | border: 0; 70 | // padding can change the box boundaries, so we may want to exclude it when dealing with component skins 71 | @if $omitPadding == false { 72 | padding: 0; 73 | } 74 | cursor: pointer; 75 | text-decoration: none; 76 | } 77 | 78 | @mixin box-opacity($value) { 79 | opacity: $value; // Chrome 4+, FF2+, Saf3.1+, Opera 9+, IE9, iOS 3.2+, Android 2.1+ 80 | filter: alpha(opacity=$value*100); // IE6-IE8 81 | } 82 | 83 | @mixin border-radius($value, $useModernizr: true) { 84 | 85 | $borderRadius: getPrefix(borderradius, $useModernizr); 86 | 87 | #{map-get($borderRadius, yes)} & { 88 | -webkit-border-radius: #{$value}; // Saf3-4, iOS 1-3.2, Android ≤1.6 89 | border-radius: #{$value}; // Opera 10.5, IE9, Saf5, Chrome, FF4+, iOS 4, Android 2.1+ 90 | 91 | // useful if you don't want a bg color from leaking outside the border: 92 | -moz-background-clip: padding; 93 | -webkit-background-clip: padding-box; 94 | background-clip: padding-box; 95 | } 96 | } 97 | 98 | @mixin box-shadow($value, $fallback:'', $useModernizr: true) { 99 | 100 | $boxShadow: getPrefix(boxshadow, $useModernizr); 101 | 102 | #{map-get($boxShadow, yes)} & { 103 | -webkit-box-shadow: #{$value}; // Saf3-4, iOS 4.0.2 - 4.2, Android 2.3+ 104 | box-shadow: #{$value}; // Opera 10.5, IE9, FF4+, Chrome 6+, iOS 5 105 | } 106 | 107 | @if $fallback != '' { 108 | #{map-get($boxShadow, no)} & { 109 | border-color: #{$fallback}; 110 | } 111 | } 112 | } 113 | 114 | @mixin text-shadow($value, $useModernizr: true) { 115 | 116 | $textShadow: getPrefix(textshadow, $useModernizr); 117 | 118 | #{map-get($textShadow, yes)} & { 119 | text-shadow: #{$value}; // Chrome, Firefox 3.5+, IE 10+, Opera 9+, Safari 1+ 120 | } 121 | } 122 | 123 | @mixin box-columns($nb: 3, $gap: 10px, $useModernizr: true) { 124 | 125 | $cssColumns: getPrefix(csscolumns, $useModernizr); 126 | 127 | #{map-get($cssColumns, yes)} & { 128 | -webkit-column-count: $nb; 129 | -webkit-column-gap: $gap; // Safari 3, Chrome 130 | -moz-column-count: $nb; 131 | -moz-column-gap: $gap; // Firefox 3.5+ 132 | column-count: $nb; 133 | column-gap: $gap; // Opera 11+ 134 | } 135 | } 136 | 137 | @mixin background-size($value, $useModernizr: true) { 138 | 139 | $backgroundSize: getPrefix(backgroundsize, $useModernizr); 140 | 141 | #{map-get($backgroundSize, yes)} & { 142 | -webkit-background-size: $value; // Saf3-4 143 | background-size: $value; // Opera, IE9, Saf5, Chrome, FF4+ 144 | } 145 | } 146 | 147 | @mixin linear-gradient($from, $to, $fallback: '', $useModernizr: true) { 148 | 149 | $cssGradients: getPrefix(cssgradients, $useModernizr); 150 | 151 | #{map-get($cssGradients, no)} & { 152 | @if $fallback != '' { 153 | background-color: $fallback; 154 | } @else { 155 | background-color: mix($from, $to); 156 | } 157 | } 158 | 159 | #{map-get($cssGradients, yes)} & { 160 | background-image: -webkit-gradient(linear, left top, left bottom, from($from), to($to)); // Saf4+, Chrome 161 | background-image: -webkit-linear-gradient(top, $from, $to); // Chrome 10+, Saf5.1+, iOS 5+ 162 | background-image: -moz-linear-gradient(top, $from, $to); // FF3.6+ 163 | background-image: -o-linear-gradient(top, $from, $to); // Opera 11.10+ 164 | background-image: linear-gradient(to bottom, $from, $to); 165 | } 166 | 167 | } 168 | 169 | // TODO: rewrite with lists and make generic 170 | @mixin linear-gradient-double($from1, $to1, $from2, $to2, $type: 'vertical', $fallback: '', $useModernizr: true) { 171 | 172 | $cssGradients: getPrefix(cssgradients, $useModernizr); 173 | 174 | #{map-get($cssGradients, no)} & { 175 | @if $fallback != '' { 176 | background-color: $fallback; 177 | } @else { 178 | background-color: mix($from1, $to1); 179 | } 180 | } 181 | 182 | $endPointWebkit: 'left bottom'; 183 | $endPointVendor: 'top'; 184 | $endPoint: 'bottom'; 185 | @if $type == 'horizontal' { 186 | $endPointWebkit: 'right top'; 187 | $endPointVendor: 'left'; 188 | $endPoint: 'right'; 189 | } 190 | 191 | #{map-get($cssGradients, yes)} & { 192 | background-image: -webkit-gradient(linear, left top, #{$endPointWebkit}, color-stop(0, $from1), color-stop(.5, $to1), color-stop(.51, $from2), to($to2)); // Saf4+, Chrome 193 | background-image: -webkit-linear-gradient(#{$endPointVendor}, $from1, $to1 50%, $from2 51%, $to2); // Chrome 10+, Saf5.1+, iOS 5+ 194 | background-image: -moz-linear-gradient(#{$endPointVendor}, $from1, $to1 50%, $from2 51%, $to2); // FF3.6+ 195 | background-image: -o-linear-gradient(#{$endPointVendor}, $from1, $to1 50%, $from2 51%, $to2); // Opera 11.10+ 196 | background-image: linear-gradient(to #{$endPoint}, $from1, $to1 50%, $from2 51%, $to2); 197 | } 198 | 199 | } 200 | 201 | // TODO: refactorize with other linear-gradient mixins 202 | @mixin linear-gradient-with-img($from, $to, $img, $bkgmore: no-repeat, $fallback: '', $useModernizr: true) { 203 | 204 | $cssGradients: getPrefix(cssgradients, $useModernizr); 205 | 206 | background: #{$img} #{$bkgmore}; 207 | 208 | #{map-get($cssGradients, no)} & { 209 | @if $fallback != '' { 210 | background-color: $fallback; 211 | } @else { 212 | background-color: mix($from, $to); 213 | } 214 | } 215 | 216 | #{map-get($cssGradients, yes)} & { 217 | background-image: $img, -webkit-gradient(linear, left top, left bottom, from($from), to($to)); // Saf4+, Chrome 218 | background-image: $img, -webkit-linear-gradient(top, $from, $to); // Chrome 10+, Saf5.1+, iOS 5+ 219 | background-image: $img, -moz-linear-gradient(top, $from, $to); // FF3.6+ 220 | background-image: $img, -o-linear-gradient(top, $from, $to); // Opera 11.10+ 221 | background-image: $img, linear-gradient(to bottom, $from, $to); 222 | } 223 | 224 | } 225 | 226 | @mixin radial-gradient($from, $to, $fallback: '', $useModernizr: true) { 227 | 228 | $cssGradients: getPrefix(cssgradients, $useModernizr); 229 | 230 | #{map-get($cssGradients, no)} & { 231 | @if $fallback != '' { 232 | background-color: $fallback; 233 | } @else { 234 | background-color: mix($from, $to); 235 | } 236 | } 237 | 238 | #{map-get($cssGradients, yes)} & { 239 | background: -moz-radial-gradient(center, ellipse cover, $from 0%, $to 100%) fixed; /* FF3.6+ */ 240 | background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, $from), color-stop(100%, $to)) fixed; /* Chrome,Safari4+ */ 241 | background: -webkit-radial-gradient(center, ellipse cover, $from 0%, $to 100%) fixed; /* Chrome10+,Safari5.1+ */ 242 | background: -o-radial-gradient(center, ellipse cover, $from 0%, $to 100%) fixed; /* Opera 12+ */ 243 | background: -ms-radial-gradient(center, ellipse cover, $from 0%, $to 100%) fixed; /* IE10+ */ 244 | background: radial-gradient(ellipse at center, $from 0%, $to 100%) fixed; /* W3C */ 245 | } 246 | 247 | } 248 | 249 | // Animations 250 | // ========================================================================== 251 | 252 | @mixin animation($value, $useModernizr: true) { 253 | 254 | $cssAnimations: getPrefix(cssanimations, $useModernizr); 255 | 256 | #{map-get($cssAnimations, yes)} & { 257 | -webkit-animation: #{$value}; // Chrome, Safari 5 258 | -moz-animation: #{$value}; // Firefox 5-15 259 | -o-animation: #{$value}; // Opera 12+ 260 | animation: #{$value}; // Chrome, Firefox 16+, IE 10+, Safari 5 261 | } 262 | } 263 | 264 | @mixin transition($value, $useModernizr: true) { 265 | 266 | $cssTransitions: getPrefix(csstransitions, $useModernizr); 267 | 268 | #{map-get($cssTransitions, yes)} & { 269 | -webkit-transition: #{$value}; // Saf3.2+, Chrome 270 | -moz-transition: #{$value}; // FF4+ 271 | -o-transition: #{$value}; // Opera 10.5+ 272 | transition: #{$value}; 273 | } 274 | } 275 | 276 | @mixin keyframes($name) { 277 | @-webkit-keyframes #{$name} { 278 | @content; 279 | } 280 | @-moz-keyframes #{$name} { 281 | @content; 282 | } 283 | @-ms-keyframes #{$name} { 284 | @content; 285 | } 286 | @keyframes #{$name} { 287 | @content; 288 | } 289 | } 290 | 291 | 292 | // Transforms 293 | // ========================================================================== 294 | 295 | @mixin transform($value, $useModernizr: true) { 296 | 297 | $cssTransforms: getPrefix(csstransforms, $useModernizr); 298 | 299 | #{map-get($cssTransforms, yes)} & { 300 | -webkit-transform: #{$value}; // Saf3.1+, Chrome 301 | -moz-transform: #{$value}; // FF3.5+ 302 | -ms-transform: #{$value}; // IE9 303 | -o-transform: #{$value}; // Opera 10.5 304 | transform: #{$value}; 305 | } 306 | } 307 | 308 | @mixin box-rotate($degrees, $useModernizr: true) { 309 | 310 | $cssTransforms: getPrefix(csstransforms, $useModernizr); 311 | 312 | #{map-get($cssTransforms, yes)} & { 313 | -webkit-transform: rotate(#{$degrees}deg); // Saf3.1+, Chrome 314 | -moz-transform: rotate(#{$degrees}deg); // FF3.5+ 315 | -ms-transform: rotate(#{$degrees}deg); // IE9 316 | -o-transform: rotate(#{$degrees}deg); // Opera 10.5 317 | transform: rotate(#{$degrees}deg); 318 | } 319 | } 320 | 321 | @mixin box-transform($val, $useModernizr: true) { 322 | 323 | $cssTransforms: getPrefix(csstransforms, $useModernizr); 324 | 325 | #{map-get($cssTransforms, yes)} & { 326 | -webkit-transform: #{$val}; 327 | -moz-transform: #{$val}; 328 | -ms-transform: #{$val}; 329 | -o-transform: #{$val}; 330 | transform: #{$val}; 331 | } 332 | } 333 | 334 | @mixin box-skew($degrees1, $degrees2, $useModernizr: true) { 335 | 336 | $cssTransforms: getPrefix(csstransforms, $useModernizr); 337 | 338 | #{map-get($cssTransforms, yes)} & { 339 | transform: skew(#{$degrees1}deg, #{$degrees2}deg); 340 | -ms-transform: skew(#{$degrees1}deg, #{$degrees2}deg); // IE 9 341 | -webkit-transform: skew(#{$degrees1}deg, #{$degrees2}deg); // Safari and Chrome 342 | } 343 | } 344 | 345 | @mixin box-scale($ratio, $useModernizr: true) { 346 | 347 | $cssTransforms: getPrefix(csstransforms, $useModernizr); 348 | 349 | #{map-get($cssTransforms, yes)} & { 350 | -webkit-transform: scale($ratio); // Chrome, Safari 3.1+ 351 | -moz-transform: scale($ratio); // Firefox 3.5+ 352 | -ms-transform: scale($ratio); // IE 9 353 | -o-transform: scale($ratio); // Opera 10.50-12.00 354 | transform: scale($ratio); // Firefox 16+, IE 10+, Opera 12.10+ 355 | } 356 | } 357 | 358 | @mixin transform-matrix($value, $useModernizr: true) { 359 | 360 | $cssTransforms: getPrefix(csstransforms, $useModernizr); 361 | 362 | #{map-get($cssTransforms, yes)} & { 363 | -webkit-transform: matrix(#{$value}); 364 | -moz-transform: matrix(#{$value}); 365 | -ms-transform: matrix(#{$value}); 366 | -o-transform: matrix(#{$value}); 367 | transform: matrix(#{$value}); 368 | } 369 | } 370 | 371 | /* _____ UNIVERSAL HELPERS _____ */ 372 | 373 | // From H5BP 374 | // ========================================================================== 375 | 376 | // Image replacement 377 | @mixin ir { 378 | background-color: transparent; 379 | border: 0; 380 | overflow: hidden; 381 | 382 | &:before { 383 | display: block; 384 | width: 0; 385 | height: 100%; 386 | content: ""; 387 | } 388 | } 389 | 390 | // Hide from both screenreaders and browsers: h5bp.com/u 391 | @mixin hidden { 392 | display: none !important; 393 | visibility: hidden; 394 | } 395 | 396 | // Hide only visually, but have it available for screenreaders: h5bp.com/v 397 | @mixin visuallyHidden { 398 | border: 0; 399 | clip: rect(0 0 0 0); 400 | height: 1px; 401 | margin: -1px; 402 | overflow: hidden; 403 | padding: 0; 404 | position: absolute; 405 | width: 1px; 406 | 407 | // Extends the visuallyHidden feature to allow the element to be focusable 408 | // when navigated to via the keyboard: h5bp.com/p 409 | &.focusable:active, 410 | &.focusable:focus { 411 | position: static; 412 | margin: 0; 413 | width: auto; 414 | height: auto; 415 | overflow: visible; 416 | clip: auto; 417 | } 418 | } 419 | 420 | // Hide visually and from screenreaders, but maintain layout 421 | @mixin invisible { 422 | visibility: hidden; 423 | } 424 | 425 | // Contain floats: h5bp.com/q 426 | @mixin clearfix { 427 | &:before, 428 | &:after { 429 | display: table; 430 | content: ' '; 431 | } 432 | 433 | &:after { 434 | clear: both; 435 | } 436 | } 437 | -------------------------------------------------------------------------------- /sass/base/utils/_system.scss: -------------------------------------------------------------------------------- 1 | 2 | /* _____ SYSTEM TOOLS _____ */ 3 | 4 | // importOnce 5 | // this mixin makes it possible to have a file imported at multiple place and only be output the first time it is called 6 | // it is used for placeholders to prevent them from being repeated by each file depending on them 7 | 8 | $modules: () !default; 9 | 10 | @mixin importOnce($uniqeRef) { 11 | @if not index($modules, $uniqeRef) { 12 | $modules: append($modules, $uniqeRef) !global; 13 | @content; 14 | } 15 | } 16 | 17 | // getPrefixes 18 | // this function is used by mixins to set the proper progressive enhancement prefixes 19 | @function getPrefix($feature, $useModernizr: true) { 20 | $yesPrefix: ''; 21 | $noPrefix: ''; 22 | @if $useModernizr { 23 | $yesPrefix: '.' + $feature; 24 | $noPrefix: '.no-' + $feature; 25 | } 26 | @return (yes: $yesPrefix, no: $noPrefix); 27 | } 28 | -------------------------------------------------------------------------------- /sass/components/__components.scss: -------------------------------------------------------------------------------- 1 | 2 | @import 'tabs/_tabs'; 3 | @import 'responsiveTabs/_responsiveTabs'; 4 | 5 | @import 'example/_example'; 6 | @import 'example/_skins/_alt'; 7 | -------------------------------------------------------------------------------- /sass/components/example/_example.scss: -------------------------------------------------------------------------------- 1 | /* 2 | usage examples: 3 | @include example('.example'); 4 | 5 | @include example('.example2', $defaultSkin: false); 6 | @include example-skin-alt('.example2'); 7 | */ 8 | 9 | /* **** EXAMPLE COMPONENT **** */ 10 | 11 | // map the placeholders content to some selectors through a mixin 12 | @mixin example($selector, $defaultSkin: true) { 13 | 14 | #{$selector} { 15 | padding: 10px; 16 | } 17 | 18 | #{$selector}_inner { 19 | padding: 20px; 20 | } 21 | 22 | #{$selector}:hover { 23 | padding: 30px; 24 | } 25 | 26 | @if $defaultSkin != false { 27 | @include example-skin-default($selector); 28 | } 29 | 30 | } 31 | 32 | /* **** EXAMPLE COMPONENT SKIN **** */ 33 | 34 | // provide a default skin for the component 35 | // only visual changes that don't affect the component layout should be in here 36 | @mixin example-skin-default($selector) { 37 | 38 | #{$selector} { 39 | background: #eee; 40 | color: blue; 41 | } 42 | 43 | #{$selector}_inner { 44 | color: red; 45 | } 46 | 47 | #{$selector}:hover { 48 | border: solid 1px red; 49 | } 50 | 51 | } 52 | 53 | -------------------------------------------------------------------------------- /sass/components/example/_skins/_alt.scss: -------------------------------------------------------------------------------- 1 | 2 | /* **** EXAMPLE COMPONENT SKIN ALT **** */ 3 | 4 | // provide a default skin for the component 5 | // only visual changes that don't affect the component layout should be in here 6 | @mixin example-skin-alt($selector: '.example', $hover: ':hover', $param2: '') { 7 | 8 | #{$selector} { 9 | background: #fff; 10 | color: green; 11 | } 12 | 13 | #{$selector}_inner { 14 | background: #eee; 15 | color: orange; 16 | } 17 | 18 | @if $hover == ':hover' { 19 | #{$selector}:hover { 20 | border: solid 1px purple; 21 | background: blue; 22 | } 23 | } @else { 24 | #{$selector}_#{$hover} { 25 | border: solid 1px purple; 26 | background: blue; 27 | } 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /sass/components/responsiveTabs/_responsiveTabs.scss: -------------------------------------------------------------------------------- 1 | // _____ STRUCTURE _____ // 2 | 3 | // define the component structure 4 | @mixin responsiveTabs($selector, $breakpoint: 900, $defaultSkin: true) { 5 | 6 | // handle tabs vertically until breakpoint 7 | @media (max-width: #{($breakpoint - 1)}px) { 8 | 9 | #{$selector} { 10 | padding: 0; 11 | } 12 | 13 | #{$selector}_link { 14 | display: block; 15 | padding: 20px; 16 | } 17 | } 18 | 19 | // handle tabs horizontally until breakpoint 20 | @media (min-width: #{$breakpoint}px) { 21 | 22 | #{$selector} { 23 | display: inline-block; 24 | margin: 0; 25 | padding: 0; 26 | font-size: 0; 27 | } 28 | 29 | #{$selector}_item { 30 | @include remIt(font-size, 18); 31 | display: inline-block; 32 | vertical-align: bottom; 33 | line-height: 2.5; 34 | } 35 | 36 | #{$selector}_link { 37 | padding: 0 10px; 38 | } 39 | } 40 | 41 | @if $defaultSkin != false { 42 | @include responsiveTabs-skin-default($selector, $breakpoint); 43 | } 44 | 45 | } 46 | 47 | // _____ SKIN _____ // 48 | 49 | // provide a default skin for the component 50 | // only visual changes that don't affect the component layout should be in here 51 | @mixin responsiveTabs-skin-default($selector, $breakpoint) { 52 | 53 | #{$selector} { 54 | list-style: none; 55 | } 56 | 57 | #{$selector}_item { 58 | border-bottom: 1px solid $color-main-lighter; 59 | } 60 | 61 | #{$selector}_item--highlighted { 62 | background: $color-alt-light; 63 | } 64 | 65 | #{$selector}_link { 66 | @include basicClickable(true); 67 | color: $color-default-dark; 68 | font-family: 'titillium', Arial, 'sans-serif'; 69 | 70 | #{$selector}_item._is_current & { 71 | color: $color-main-light; 72 | } 73 | 74 | &:hover { 75 | background: $color-alt; 76 | } 77 | } 78 | 79 | // set specific visual adjustments for horizontal display 80 | @media (min-width: #{$breakpoint}px) { 81 | 82 | #{$selector}_item { 83 | &._is_current { 84 | border-bottom: 3px solid $color-main-light; 85 | } 86 | } 87 | 88 | #{$selector}_link { 89 | border-left: 1px solid $color-main; 90 | 91 | #{$selector}_item:first-child & { 92 | border-left: 0; 93 | } 94 | } 95 | } 96 | 97 | } 98 | -------------------------------------------------------------------------------- /sass/components/tabs/_tabs.scss: -------------------------------------------------------------------------------- 1 | // _____ STRUCTURE _____ // 2 | 3 | // define the component structure 4 | @mixin tabs($selector, $defaultSkin: true) { 5 | 6 | #{$selector} { 7 | display: inline-block; 8 | margin: 0; 9 | padding: 0; 10 | font-size: 0; 11 | } 12 | 13 | #{$selector}_item { 14 | @include remIt(font-size, 18); 15 | display: inline-block; 16 | vertical-align: bottom; 17 | line-height: 2.5; 18 | } 19 | 20 | #{$selector}_link { 21 | padding: 0 10px; 22 | } 23 | 24 | @if $defaultSkin != false { 25 | @include tabs-skin-default($selector); 26 | } 27 | 28 | } 29 | 30 | // _____ SKIN _____ // 31 | 32 | // provide a default skin for the component 33 | // only visual changes that don't affect the component layout should be in here 34 | @mixin tabs-skin-default($selector) { 35 | 36 | #{$selector} { 37 | list-style: none; 38 | } 39 | 40 | #{$selector}_item { 41 | border-bottom: 1px solid $color-main-lighter; 42 | 43 | &._is_current { 44 | border-bottom: 3px solid $color-main-light; 45 | } 46 | } 47 | 48 | #{$selector}_item--highlighted { 49 | background: $color-alt-light; 50 | } 51 | 52 | #{$selector}_link { 53 | @include basicClickable(true); 54 | border-left: 1px solid $color-main; 55 | color: $color-default-dark; 56 | font-family: 'titillium', Arial, 'sans-serif'; 57 | 58 | #{$selector}_item:first-child & { 59 | border-left: 0; 60 | } 61 | 62 | #{$selector}_item._is_current & { 63 | color: $color-main-light; 64 | } 65 | 66 | &:hover { 67 | background: $color-alt; 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /sass/custom.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /*! 4 | ========== INIT 5 | */ 6 | // css reset (normalize) and third party scss required for the project 7 | @import 'vendor/_normalize'; 8 | 9 | 10 | /*! 11 | ========== BASE 12 | */ 13 | // variables, fonts, mixins, helpers... common styles used across the entire site 14 | @import 'base/__base'; 15 | 16 | 17 | /*! 18 | ========== COMPONENTS 19 | */ 20 | // reusable abstract components 21 | @import 'components/__components'; 22 | 23 | 24 | /*! 25 | ========== SPECIFICS 26 | */ 27 | // more specific declarations, built on a per page/module basis 28 | @import 'specifics/__specifics'; 29 | -------------------------------------------------------------------------------- /sass/specifics/__specifics.scss: -------------------------------------------------------------------------------- 1 | 2 | /* _____ SPECIFICS _____ */ 3 | 4 | // import contextual entities 5 | @import 'buttons'; 6 | @import 'footer'; 7 | @import 'main'; 8 | @import 'nav'; 9 | @import 'sample'; 10 | 11 | // miscellaneous rules 12 | .navLink { 13 | @include basicClickable; 14 | } 15 | 16 | .externalLink { 17 | @include basicClickable; 18 | } 19 | 20 | .firstOrderList_item { 21 | color: $color-secondary; 22 | list-style-type: square; 23 | } 24 | 25 | .firstOrderList_item_content { 26 | color: $color-default-darker; 27 | } 28 | 29 | .secondaryList_item { 30 | color: $color-secondary; 31 | list-style-type: square; 32 | } 33 | 34 | .secondaryList_item_content { 35 | color: $color-default-darker; 36 | } 37 | 38 | .articleSeparator { 39 | @include hidden; 40 | } 41 | 42 | .note { 43 | border: solid 1px transparentize($color-main-lighter, .7); 44 | background: transparentize($color-main-lighter, .8); 45 | padding: 15px; 46 | } 47 | 48 | .exampleNote { 49 | margin-bottom: 15px; 50 | border: dotted 1px $color-secondary; 51 | padding: 15px; 52 | } 53 | 54 | .sampleTitle { 55 | display: inline-block; 56 | background: $color-alt; 57 | padding: 5px 20px; 58 | } 59 | 60 | .codeSample { 61 | @include remIt('font-size', 14); 62 | margin-top: 0; 63 | border: solid 1px $color-alt; 64 | background: $color-alt-light; 65 | padding: 20px; 66 | line-height: 1.3; 67 | color: $color-alt2; 68 | } 69 | 70 | // example component implementations 71 | @include example('.example'); 72 | 73 | @include example('.example2', $defaultSkin: false); 74 | @include example-skin-alt('.example2'); 75 | 76 | -------------------------------------------------------------------------------- /sass/specifics/_buttons.scss: -------------------------------------------------------------------------------- 1 | 2 | .goTop { 3 | display: block; 4 | position: fixed; 5 | right: 10px; 6 | bottom: 10px; 7 | z-index: 0; 8 | 9 | border: 20px solid transparent; 10 | border-bottom-color: $color-default-light; 11 | 12 | background: transparent; 13 | padding: 0; 14 | width: 0; 15 | height: 0; 16 | text-align: center; 17 | font-size: 0; 18 | } 19 | -------------------------------------------------------------------------------- /sass/specifics/_footer.scss: -------------------------------------------------------------------------------- 1 | .mainFooter { 2 | position: fixed; 3 | right: 0; 4 | bottom: 0; 5 | left: 0; 6 | z-index: 10; 7 | background: $color-main; 8 | padding: 5px; 9 | text-align: center; 10 | } 11 | 12 | .mainFooter_link { 13 | text-decoration: none; 14 | color: $color-default-dark; 15 | 16 | &:hover { 17 | text-decoration: underline; 18 | color: #fff; 19 | } 20 | } 21 | 22 | .mainFooter_iconLink { 23 | display: block; 24 | float: right; 25 | margin: 2px 5px; 26 | width: 22px; 27 | height: 22px; 28 | } 29 | 30 | .repoWrapper { 31 | @include clearfix; 32 | margin: 10px auto; 33 | width: 362px; 34 | list-style: none; 35 | } 36 | 37 | .repoWrapper_item { 38 | float: left; 39 | } 40 | 41 | .repoWrapper_element { 42 | margin-bottom: -6px; 43 | } 44 | 45 | .repoWrapper_link { 46 | display: block; 47 | float: right; 48 | margin: 2px 5px; 49 | background: url('../assets/img/github.png') center no-repeat; 50 | width: 22px; 51 | height: 22px; 52 | font-size: 0; 53 | } 54 | 55 | @media (min-width: 600px) { 56 | .repoWrapper { 57 | position: absolute; 58 | top: 3px; 59 | right: 10px; 60 | margin: 0; 61 | width: auto; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /sass/specifics/_main.scss: -------------------------------------------------------------------------------- 1 | 2 | .mainHeader { 3 | @include transform('translate(-50%, -50%)'); 4 | position: fixed; 5 | top: 50%; 6 | left: 50%; 7 | z-index: 10; 8 | text-align: center; 9 | color: $color-default-light; 10 | } 11 | 12 | .mainTitle { 13 | @include remIt('font-size', 70); 14 | @include remIt('line-height', 75); 15 | @include text-shadow(1px 1px 3px rgba(0, 0, 0, .3)); 16 | margin: 0 0 10px; 17 | font-family: 'robotoSlab', georgia, serif; 18 | font-weight: normal; 19 | } 20 | 21 | .mainSubtitle { 22 | @include text-shadow(1px 1px 3px rgba(0, 0, 0, .3)); 23 | margin: 0; 24 | font-weight: normal; 25 | } 26 | 27 | .mainContent { 28 | margin: 65px 0 50px; 29 | } 30 | 31 | // only hide mainSections by default if js is present to reveal them 32 | .js .mainSection { 33 | display: none; 34 | } 35 | 36 | .js .mainSection._is_current { 37 | display: block; 38 | } 39 | 40 | .mainSection_body { 41 | background: $color-default-light; 42 | padding: 10px 40px; 43 | } 44 | 45 | .mainSection_header { 46 | background: $color-main-lighter; 47 | padding: 10px 40px; 48 | } 49 | 50 | .mainSection_title { 51 | @include remIt('font-size', 26); 52 | @include remIt('line-height', 30); 53 | color: $color-main; 54 | font-weight: normal; 55 | } 56 | 57 | .mainSection_subtitle { 58 | margin-top: 30px; 59 | margin-bottom: 20px; 60 | } 61 | 62 | .mainSection_smallTitle { 63 | margin-top: 80px; 64 | } 65 | -------------------------------------------------------------------------------- /sass/specifics/_nav.scss: -------------------------------------------------------------------------------- 1 | $nav-breakpoint: 900; 2 | $left-nav-width: 200; 3 | 4 | // bind the responsive tabs mixin to the .mainMenu class 5 | @include responsiveTabs('.mainMenu', $breakpoint: 900); 6 | 7 | // handle menu position and visibility 8 | @media (max-width: #{($nav-breakpoint - 1)}px) { 9 | .mainNav { 10 | @include transition('left .2s linear'); 11 | @include box-shadow(0 3px 3px 3px rgba(0, 0, 0, .3)); 12 | position: fixed; 13 | top: 0; 14 | bottom: 0; 15 | left: -#{$left-nav-width}px; 16 | z-index: 999; 17 | background: $color-default-light; 18 | width: #{$left-nav-width}px; 19 | 20 | &._is_open { 21 | left: 0; 22 | } 23 | } 24 | 25 | .mainNav_opener { 26 | display: block; 27 | position: absolute; 28 | top: 20px; 29 | left: #{$left-nav-width + 20}px; 30 | z-index: 998; 31 | border: 1px solid $color-default-light; 32 | background: $color-main; 33 | padding: 0; 34 | width: 30px; 35 | height: 30px; 36 | overflow: hidden; 37 | text-indent: -999px; 38 | color: $color-default-light; 39 | 40 | &:before { 41 | display: block; 42 | width: 28px; 43 | height: 30px; 44 | text-align: center; 45 | text-indent: 0; 46 | line-height: 1.8; 47 | content: '\2630'; 48 | } 49 | 50 | .mainNav._is_open &:before { 51 | content: '\2613'; 52 | } 53 | } 54 | } 55 | 56 | @media (min-width: #{$nav-breakpoint}px) { 57 | 58 | .mainNav { 59 | @include box-shadow('0 3px 5px rgba(0,0,0,.3)'); 60 | @include box-opacity(.95); 61 | position: fixed; 62 | top: 0; 63 | right: 0; 64 | bottom: auto; 65 | left: 0; 66 | background: $color-default-light; 67 | text-align: right; 68 | } 69 | 70 | .mainNav_opener { 71 | display: none; 72 | } 73 | 74 | } 75 | 76 | 77 | -------------------------------------------------------------------------------- /sass/specifics/_sample.scss: -------------------------------------------------------------------------------- 1 | 2 | .sampleHeader { 3 | margin: 0; 4 | padding: 0; 5 | list-style: none; 6 | @include clearfix; 7 | } 8 | 9 | .sampleHeader_item { 10 | float: left; 11 | background: $color-alt; 12 | 13 | &._is_current { 14 | background: $color-alt-light; 15 | } 16 | } 17 | 18 | .sampleHeader_link { 19 | @include basicClickable; 20 | display: block; 21 | border: 0; 22 | background: transparent; 23 | padding: 10px; 24 | color: #ccc; 25 | } 26 | 27 | .sampleHeader_item._is_current .sampleHeader_link { 28 | color: $color-default-darker; 29 | } 30 | 31 | .sampleTitle { 32 | display: inline-block; 33 | background: $color-alt; 34 | padding: 5px 20px; 35 | } 36 | 37 | .codeSample { 38 | @include remIt('font-size', 14); 39 | margin-top: 0; 40 | border: solid 1px $color-alt; 41 | background: $color-alt-light; 42 | padding: 20px; 43 | line-height: 1.3; 44 | color: $color-alt2; 45 | 46 | &._is_hidden { 47 | display: none; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /sass/vendor/__vendor.scss: -------------------------------------------------------------------------------- 1 | @import '../../bower_components/normalize-scss/_normalize'; 2 | -------------------------------------------------------------------------------- /sass/vendor/_normalize.scss: -------------------------------------------------------------------------------- 1 | /*! normalize.css v3.0.1 | MIT License | git.io/normalize */ 2 | 3 | /** 4 | * 1. Set default font family to sans-serif. 5 | * 2. Prevent iOS text size adjust after orientation change, without disabling 6 | * user zoom. 7 | */ 8 | 9 | html { 10 | font-family: sans-serif; /* 1 */ 11 | -ms-text-size-adjust: 100%; /* 2 */ 12 | -webkit-text-size-adjust: 100%; /* 2 */ 13 | } 14 | 15 | /** 16 | * Remove default margin. 17 | */ 18 | 19 | body { 20 | margin: 0; 21 | } 22 | 23 | /* HTML5 display definitions 24 | ========================================================================== */ 25 | 26 | /** 27 | * Correct `block` display not defined for any HTML5 element in IE 8/9. 28 | * Correct `block` display not defined for `details` or `summary` in IE 10/11 and Firefox. 29 | * Correct `block` display not defined for `main` in IE 11. 30 | */ 31 | 32 | article, 33 | aside, 34 | details, 35 | figcaption, 36 | figure, 37 | footer, 38 | header, 39 | hgroup, 40 | main, 41 | nav, 42 | section, 43 | summary { 44 | display: block; 45 | } 46 | 47 | /** 48 | * 1. Correct `inline-block` display not defined in IE 8/9. 49 | * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. 50 | */ 51 | 52 | audio, 53 | canvas, 54 | progress, 55 | video { 56 | display: inline-block; /* 1 */ 57 | vertical-align: baseline; /* 2 */ 58 | } 59 | 60 | /** 61 | * Prevent modern browsers from displaying `audio` without controls. 62 | * Remove excess height in iOS 5 devices. 63 | */ 64 | 65 | audio:not([controls]) { 66 | display: none; 67 | height: 0; 68 | } 69 | 70 | /** 71 | * Address `[hidden]` styling not present in IE 8/9/10. 72 | * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. 73 | */ 74 | 75 | [hidden], 76 | template { 77 | display: none; 78 | } 79 | 80 | /* Links 81 | ========================================================================== */ 82 | 83 | /** 84 | * Remove the gray background color from active links in IE 10. 85 | */ 86 | 87 | a { 88 | background: transparent; 89 | } 90 | 91 | /** 92 | * Improve readability when focused and also mouse hovered in all browsers. 93 | */ 94 | 95 | a:active, 96 | a:hover { 97 | outline: 0; 98 | } 99 | 100 | /* Text-level semantics 101 | ========================================================================== */ 102 | 103 | /** 104 | * Address styling not present in IE 8/9/10/11, Safari, and Chrome. 105 | */ 106 | 107 | abbr[title] { 108 | border-bottom: 1px dotted; 109 | } 110 | 111 | /** 112 | * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. 113 | */ 114 | 115 | b, 116 | strong { 117 | font-weight: bold; 118 | } 119 | 120 | /** 121 | * Address styling not present in Safari and Chrome. 122 | */ 123 | 124 | dfn { 125 | font-style: italic; 126 | } 127 | 128 | /** 129 | * Address variable `h1` font-size and margin within `section` and `article` 130 | * contexts in Firefox 4+, Safari, and Chrome. 131 | */ 132 | 133 | h1 { 134 | font-size: 2em; 135 | margin: 0.67em 0; 136 | } 137 | 138 | /** 139 | * Address styling not present in IE 8/9. 140 | */ 141 | 142 | mark { 143 | background: #ff0; 144 | color: #000; 145 | } 146 | 147 | /** 148 | * Address inconsistent and variable font size in all browsers. 149 | */ 150 | 151 | small { 152 | font-size: 80%; 153 | } 154 | 155 | /** 156 | * Prevent `sub` and `sup` affecting `line-height` in all browsers. 157 | */ 158 | 159 | sub, 160 | sup { 161 | font-size: 75%; 162 | line-height: 0; 163 | position: relative; 164 | vertical-align: baseline; 165 | } 166 | 167 | sup { 168 | top: -0.5em; 169 | } 170 | 171 | sub { 172 | bottom: -0.25em; 173 | } 174 | 175 | /* Embedded content 176 | ========================================================================== */ 177 | 178 | /** 179 | * Remove border when inside `a` element in IE 8/9/10. 180 | */ 181 | 182 | img { 183 | border: 0; 184 | } 185 | 186 | /** 187 | * Correct overflow not hidden in IE 9/10/11. 188 | */ 189 | 190 | svg:not(:root) { 191 | overflow: hidden; 192 | } 193 | 194 | /* Grouping content 195 | ========================================================================== */ 196 | 197 | /** 198 | * Address margin not present in IE 8/9 and Safari. 199 | */ 200 | 201 | figure { 202 | margin: 1em 40px; 203 | } 204 | 205 | /** 206 | * Address differences between Firefox and other browsers. 207 | */ 208 | 209 | hr { 210 | -moz-box-sizing: content-box; 211 | box-sizing: content-box; 212 | height: 0; 213 | } 214 | 215 | /** 216 | * Contain overflow in all browsers. 217 | */ 218 | 219 | pre { 220 | overflow: auto; 221 | } 222 | 223 | /** 224 | * Address odd `em`-unit font size rendering in all browsers. 225 | */ 226 | 227 | code, 228 | kbd, 229 | pre, 230 | samp { 231 | font-family: monospace, monospace; 232 | font-size: 1em; 233 | } 234 | 235 | /* Forms 236 | ========================================================================== */ 237 | 238 | /** 239 | * Known limitation: by default, Chrome and Safari on OS X allow very limited 240 | * styling of `select`, unless a `border` property is set. 241 | */ 242 | 243 | /** 244 | * 1. Correct color not being inherited. 245 | * Known issue: affects color of disabled elements. 246 | * 2. Correct font properties not being inherited. 247 | * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. 248 | */ 249 | 250 | button, 251 | input, 252 | optgroup, 253 | select, 254 | textarea { 255 | color: inherit; /* 1 */ 256 | font: inherit; /* 2 */ 257 | margin: 0; /* 3 */ 258 | } 259 | 260 | /** 261 | * Address `overflow` set to `hidden` in IE 8/9/10/11. 262 | */ 263 | 264 | button { 265 | overflow: visible; 266 | } 267 | 268 | /** 269 | * Address inconsistent `text-transform` inheritance for `button` and `select`. 270 | * All other form control elements do not inherit `text-transform` values. 271 | * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. 272 | * Correct `select` style inheritance in Firefox. 273 | */ 274 | 275 | button, 276 | select { 277 | text-transform: none; 278 | } 279 | 280 | /** 281 | * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` 282 | * and `video` controls. 283 | * 2. Correct inability to style clickable `input` types in iOS. 284 | * 3. Improve usability and consistency of cursor style between image-type 285 | * `input` and others. 286 | */ 287 | 288 | button, 289 | html input[type="button"], /* 1 */ 290 | input[type="reset"], 291 | input[type="submit"] { 292 | -webkit-appearance: button; /* 2 */ 293 | cursor: pointer; /* 3 */ 294 | } 295 | 296 | /** 297 | * Re-set default cursor for disabled elements. 298 | */ 299 | 300 | button[disabled], 301 | html input[disabled] { 302 | cursor: default; 303 | } 304 | 305 | /** 306 | * Remove inner padding and border in Firefox 4+. 307 | */ 308 | 309 | button::-moz-focus-inner, 310 | input::-moz-focus-inner { 311 | border: 0; 312 | padding: 0; 313 | } 314 | 315 | /** 316 | * Address Firefox 4+ setting `line-height` on `input` using `!important` in 317 | * the UA stylesheet. 318 | */ 319 | 320 | input { 321 | line-height: normal; 322 | } 323 | 324 | /** 325 | * It's recommended that you don't attempt to style these elements. 326 | * Firefox's implementation doesn't respect box-sizing, padding, or width. 327 | * 328 | * 1. Address box sizing set to `content-box` in IE 8/9/10. 329 | * 2. Remove excess padding in IE 8/9/10. 330 | */ 331 | 332 | input[type="checkbox"], 333 | input[type="radio"] { 334 | box-sizing: border-box; /* 1 */ 335 | padding: 0; /* 2 */ 336 | } 337 | 338 | /** 339 | * Fix the cursor style for Chrome's increment/decrement buttons. For certain 340 | * `font-size` values of the `input`, it causes the cursor style of the 341 | * decrement button to change from `default` to `text`. 342 | */ 343 | 344 | input[type="number"]::-webkit-inner-spin-button, 345 | input[type="number"]::-webkit-outer-spin-button { 346 | height: auto; 347 | } 348 | 349 | /** 350 | * 1. Address `appearance` set to `searchfield` in Safari and Chrome. 351 | * 2. Address `box-sizing` set to `border-box` in Safari and Chrome 352 | * (include `-moz` to future-proof). 353 | */ 354 | 355 | input[type="search"] { 356 | -webkit-appearance: textfield; /* 1 */ 357 | -moz-box-sizing: content-box; 358 | -webkit-box-sizing: content-box; /* 2 */ 359 | box-sizing: content-box; 360 | } 361 | 362 | /** 363 | * Remove inner padding and search cancel button in Safari and Chrome on OS X. 364 | * Safari (but not Chrome) clips the cancel button when the search input has 365 | * padding (and `textfield` appearance). 366 | */ 367 | 368 | input[type="search"]::-webkit-search-cancel-button, 369 | input[type="search"]::-webkit-search-decoration { 370 | -webkit-appearance: none; 371 | } 372 | 373 | /** 374 | * Define consistent border, margin, and padding. 375 | */ 376 | 377 | fieldset { 378 | border: 1px solid #c0c0c0; 379 | margin: 0 2px; 380 | padding: 0.35em 0.625em 0.75em; 381 | } 382 | 383 | /** 384 | * 1. Correct `color` not being inherited in IE 8/9/10/11. 385 | * 2. Remove padding so people aren't caught out if they zero out fieldsets. 386 | */ 387 | 388 | legend { 389 | border: 0; /* 1 */ 390 | padding: 0; /* 2 */ 391 | } 392 | 393 | /** 394 | * Remove default vertical scrollbar in IE 8/9/10/11. 395 | */ 396 | 397 | textarea { 398 | overflow: auto; 399 | } 400 | 401 | /** 402 | * Don't inherit the `font-weight` (applied by a rule above). 403 | * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. 404 | */ 405 | 406 | optgroup { 407 | font-weight: bold; 408 | } 409 | 410 | /* Tables 411 | ========================================================================== */ 412 | 413 | /** 414 | * Remove most spacing between table cells. 415 | */ 416 | 417 | table { 418 | border-collapse: collapse; 419 | border-spacing: 0; 420 | } 421 | 422 | td, 423 | th { 424 | padding: 0; 425 | } 426 | --------------------------------------------------------------------------------