├── README.md ├── .editorconfig ├── .gitignore ├── bower.json ├── LICENSE └── _objects.media.scss /README.md: -------------------------------------------------------------------------------- 1 | objects.media 2 | ============= 3 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | indent_style = space 7 | indent_size = 2 8 | end_of_line = lf 9 | charset = utf-8 10 | trim_trailing_whitespace = true 11 | insert_final_newline = true 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Runtime data 6 | pids 7 | *.pid 8 | *.seed 9 | 10 | # Directory for instrumented libs generated by jscoverage/JSCover 11 | lib-cov 12 | 13 | # Coverage directory used by tools like istanbul 14 | coverage 15 | 16 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 17 | .grunt 18 | 19 | # Compiled binary addons (http://nodejs.org/api/addons.html) 20 | build/Release 21 | 22 | # Dependency directory 23 | # Commenting this out is preferred by some people, see 24 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- 25 | node_modules 26 | 27 | # Users Environment Variables 28 | .lock-wscript 29 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "spacelab-objects.media", 3 | "version": "0.1.0", 4 | "authors": [ 5 | "Axel Salder", 6 | "Daniel Blomeyer" 7 | ], 8 | "description": "here be a description", 9 | "main": "_objects.media.scss", 10 | "keywords": [ 11 | "spacelab", 12 | "css" 13 | ], 14 | "license": "MIT", 15 | "homepage": "https://github.com/spacelab/objects.media", 16 | "private": true, 17 | "ignore": [ 18 | "**/.*", 19 | "node_modules", 20 | "bower_components", 21 | "test", 22 | "tests" 23 | ], 24 | "dependencies": { 25 | "spacelab-objects.clearfix": "spacelab/objects.clearfix", 26 | "spacelab-settings.defaults": "spacelab/settings.defaults" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 spacelab 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /_objects.media.scss: -------------------------------------------------------------------------------- 1 | $media-spacing: $base-spacing !default; 2 | 3 | $media-spacing--quarter: $media-spacing / 4 !default; 4 | $media-spacing--half: $media-spacing / 2 !default; 5 | $media-spacing--double: $media-spacing * 2 !default; 6 | $media-spacing--quadruple: $media-spacing * 4 !default; 7 | 8 | %media, 9 | .media { 10 | @extend %clearfix; 11 | 12 | display: block; 13 | } 14 | 15 | %media__image, 16 | .media__image { 17 | float: left; 18 | 19 | margin-right: rem($media-spacing); 20 | 21 | %media--half > &, 22 | .media--half > & { 23 | margin-right: rem($media-spacing--half); 24 | } 25 | 26 | %media--quarter > &, 27 | .media--quarter > & { 28 | margin-right: rem($media-spacing--quarter); 29 | } 30 | 31 | %media--double > &, 32 | .media--double > & { 33 | margin-right: rem($media-spacing--double); 34 | } 35 | 36 | %media--quadruple > &, 37 | .media--quadruple > & { 38 | margin-right: rem($media-spacing--quadruple); 39 | } 40 | } 41 | 42 | %media__image--alternate, 43 | .media__image--alternate { 44 | float: right; 45 | 46 | margin-left: rem($media-spacing); 47 | 48 | %media--half > &, 49 | .media--half > & { 50 | margin-left: rem($media-spacing--half); 51 | } 52 | 53 | %media--quarter > &, 54 | .media--quarter > & { 55 | margin-left: rem($media-spacing--quarter); 56 | } 57 | 58 | %media--double > &, 59 | .media--double > & { 60 | margin-left: rem($media-spacing--double); 61 | } 62 | 63 | %media--quadruple > &, 64 | .media--quadruple > & { 65 | margin-left: rem($media-spacing--quadruple); 66 | } 67 | } 68 | 69 | %media__body, 70 | .media__body { 71 | display: block; 72 | 73 | overflow: hidden; 74 | } 75 | --------------------------------------------------------------------------------