opoloo_assets 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 381e9cf1fee659ef6a78d6b202bcf144a85a6624
4
+ data.tar.gz: bb210d6eefa7e4d94fcbf96e21ed415b29521374
5
+ SHA512:
6
+ metadata.gz: 546bf56a8de51079d0ccbe74ad640014d19d09a0834afbc238d48502a6747e2e431b55e1d86a2799574dafc4c04566730bdfa0b30b65d16cf2e254a1f3daf9af
7
+ data.tar.gz: 50908ea4f436c946206f2150e686af273c98f524fd30006a740c738ab6d4377c26b6bd71060aa5a54142414da072a7f5ccb945bd0fd0f1f7fee2e497a8518d67
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in opoloo_assets.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Jochen Greif
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,61 @@
1
+ # Opoloo Assets
2
+
3
+ A collection of our standard CSS files, containing normalization and a grid system
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'opoloo_assets'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install opoloo_assets
20
+
21
+ ## Usage
22
+
23
+ Include the files inside your manifest (usually application.css):
24
+
25
+ //= require opoloo_assets
26
+
27
+ ### Grid
28
+
29
+ *Example:*
30
+
31
+ ```html
32
+ <div class="container">
33
+ <div class="row">
34
+
35
+ <div class="col span6">
36
+ Left columns nesting 3 other columns:
37
+
38
+ <div class="row">
39
+ <div class="col span4">Col 1</div>
40
+ <div class="col span4">Col 2</div>
41
+ <div class="col span4">Col 3</div>
42
+ </div>
43
+
44
+ </div>
45
+
46
+ <div class="col span6">
47
+ Right columns
48
+ </div>
49
+
50
+ </div>
51
+ </div>
52
+
53
+ ```
54
+
55
+ ## Contributing
56
+
57
+ 1. Fork it ( https://github.com/opoloo/opoloo_assets/fork )
58
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
59
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
60
+ 4. Push to the branch (`git push origin my-new-feature`)
61
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
@@ -0,0 +1,3 @@
1
+ module OpolooAssets
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,6 @@
1
+ require "opoloo_assets/version"
2
+
3
+ module OpolooAssets
4
+ class Engine < ::Rails::Engine
5
+ end
6
+ end
@@ -0,0 +1,22 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'opoloo_assets/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "opoloo_assets"
8
+ spec.version = OpolooAssets::VERSION
9
+ spec.authors = ["Jochen Greif"]
10
+ spec.email = ["jochen@opoloo.de"]
11
+ spec.summary = %q{Standard grid and normalize styles by Opoloo}
12
+ spec.description = %q{Standard grid and normalize styles by Opoloo}
13
+ spec.homepage = "http://www.opoloo.de"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.require_paths = ["lib"]
18
+
19
+ spec.add_development_dependency "bundler", "~> 1.7"
20
+ spec.add_development_dependency "rake", "~> 10.0"
21
+ spec.add_development_dependency "railties", ">= 3.1", "< 5"
22
+ end
@@ -0,0 +1,40 @@
1
+ @mixin noTransition() {
2
+ -moz-transition: none;
3
+ -webkit-transition: none;
4
+ -o-transition: color 0 ease-in;
5
+ transition: none;
6
+ }
7
+
8
+ /* phones */
9
+ @media only screen and (max-width: 767px) {
10
+ .row {
11
+ .col {
12
+ width: 100%;
13
+ margin-left: 0px;
14
+ float: left;
15
+ }
16
+ .col + .col:last-child {
17
+ float: left;
18
+ }
19
+ }
20
+ }
21
+
22
+ @media screen and (max-width: 480px) {
23
+ * {
24
+ font-size: 14px;
25
+ }
26
+ }
27
+
28
+ /* portrait phones */
29
+ @media only screen and (max-width: 767px) and (orientation: portrait) {
30
+ .row {
31
+ .col {
32
+ width: 100%;
33
+ margin-left: 0px;
34
+ float: left;
35
+ }
36
+ .col + .col:last-child {
37
+ float: left;
38
+ }
39
+ }
40
+ }
@@ -0,0 +1,71 @@
1
+ /* Opoloo Standard Style Sheet */
2
+ /*******************************/
3
+
4
+ @import "opoloo_reset.css.scss";
5
+ @import "opoloo_grid.css.scss";
6
+
7
+
8
+ * {
9
+ padding:0px;
10
+ margin:0px;
11
+ }
12
+
13
+
14
+ .clearfix {
15
+ *zoom: 1;
16
+ &:before,
17
+ &:after {
18
+ display: table;
19
+ content: "";
20
+ // Fixes Opera/contenteditable bug:
21
+ // http://nicolasgallagher.com/micro-clearfix-hack/#comment-36952
22
+ line-height: 0;
23
+ }
24
+ &:after {
25
+ clear: both;
26
+ }
27
+ }
28
+
29
+ a {
30
+ text-decoration: none;
31
+ }
32
+
33
+ ul li, ol li {
34
+ list-style-type: none;
35
+ }
36
+
37
+ h1, h2, h3, h4, h5, h6 {
38
+ margin:0px;
39
+ }
40
+
41
+ #loading-indicator {
42
+ text-align: center;
43
+ z-index: 100;
44
+ position: fixed;
45
+ left: 45%;
46
+ top: 50%;
47
+ width: 200px;
48
+ padding: 10px;
49
+ background: #000;
50
+ opacity: 0.8;
51
+ color: #FFF;
52
+ -webkit-border-radius: 5px;
53
+ -moz-border-radius: 5px;
54
+ border-radius: 5px;
55
+ }
56
+
57
+ #form_errors {
58
+ text-align: center;
59
+ z-index: 100;
60
+ position: fixed;
61
+ left: 45%;
62
+ top: 50%;
63
+ width: 600px;
64
+ padding: 10px;
65
+ background: #000;
66
+ opacity: 0.8;
67
+ color: #FFF;
68
+ -webkit-border-radius: 5px;
69
+ -moz-border-radius: 5px;
70
+ border-radius: 5px;
71
+ }
@@ -0,0 +1,2 @@
1
+ @import 'opoloo.css.scss';
2
+
@@ -0,0 +1,5 @@
1
+ $gridColumnCount : 12; // Total column count
2
+ $gridGutterWidth : 10; // [in pixels] Abstand zwischen Spalten
3
+ $gridColumnPadding : 0; // [in pixels] padding Innerhalb einer Spalte
4
+ $gridMaxWidth : 960; // [in pixels] Maximale Gesamtbreite
5
+ $gridMargin : 0; // [in pixels] Space outside the grid
@@ -0,0 +1,93 @@
1
+ @import "opoloo_config.css.scss";
2
+
3
+ @function gridColumnWidth() {
4
+ @return $gridMaxWidth / $gridColumnCount;
5
+ }
6
+ // Grid calculations
7
+ @function gridColumnWidthCalc($colNumber) {
8
+ // Is correct
9
+ @if $gridGutterWidth == 0 {
10
+ @return percentage($colNumber / $gridColumnCount);
11
+ }
12
+ // Is incorrect
13
+ @else {
14
+ @return percentage( (($colNumber / $gridColumnCount) - gutterCalc(false) ) );
15
+ }
16
+ }
17
+
18
+ // Accepts a number of columns that a block should span.
19
+ // Returns a percentage width for that block.
20
+ @mixin columns($columnSpan: 1) {
21
+ $number-of-blocks-in-container: $gridColumnCount / $columnSpan;
22
+ $total-width-of-all-gutters: gutterCalc(false) * ($number-of-blocks-in-container - 1);
23
+ $total-width-of-all-blocks: 1 - $total-width-of-all-gutters;
24
+ $width-of-a-single-block: $total-width-of-all-blocks / $number-of-blocks-in-container;
25
+
26
+ width: percentage( $width-of-a-single-block );
27
+ }
28
+
29
+ @function gutterCalc($showUnit: true) {
30
+ @if $showUnit == true {
31
+ @return percentage( $gridGutterWidth / $gridMaxWidth );
32
+ } @else {
33
+ @return $gridGutterWidth / ( $gridMaxWidth - ($gridMargin * 2) );
34
+ }
35
+ }
36
+
37
+ @mixin gridColumn() {
38
+ @if $gridGutterWidth > 0 {
39
+ margin-left: gutterCalc();
40
+ }
41
+ @if $gridColumnPadding > 0 {
42
+ padding: $gridColumnPadding + px;
43
+ }
44
+ float: left;
45
+ min-height: 30px;
46
+ position: relative;
47
+ clear: none;
48
+ &:first-child {
49
+ margin-left: 0;
50
+ }
51
+ }
52
+ @mixin clearfix {
53
+ *zoom: 1;
54
+
55
+ &:before,
56
+ &:after {
57
+ content: " ";
58
+ display: table;
59
+ }
60
+
61
+ &:after {
62
+ clear: both;
63
+ }
64
+ }
65
+ @for $i from 1 to $gridColumnCount + 1 {
66
+ .span#{$i} { @include columns($i); }
67
+ }
68
+
69
+
70
+
71
+ * {
72
+ -webkit-box-sizing: border-box;
73
+ -moz-box-sizing: border-box;
74
+ -ms-box-sizing: border-box;
75
+ box-sizing: border-box;
76
+ }
77
+
78
+ .container {
79
+ padding-left: $gridMargin + px;
80
+ padding-right: $gridMargin + px;
81
+ width: 100%;
82
+ max-width: $gridMaxWidth + px;
83
+ margin: 0 auto;
84
+ }
85
+ .row {
86
+ margin-bottom: 10px;
87
+ @include clearfix();
88
+ }
89
+ .col {
90
+ @include gridColumn();
91
+ }
92
+ .col + .col:last-child { float: right; }
93
+ .col + .col.end { float: left; }
@@ -0,0 +1,207 @@
1
+ //
2
+ // Reset CSS
3
+ // Adapted from http://github.com/necolas/normalize.css
4
+ // --------------------------------------------------
5
+
6
+
7
+ // Display in IE6-9 and FF3
8
+ // -------------------------
9
+
10
+ article,
11
+ aside,
12
+ main,
13
+ details,
14
+ figcaption,
15
+ figure,
16
+ footer,
17
+ header,
18
+ hgroup,
19
+ nav,
20
+ section {
21
+ display: block;
22
+ }
23
+
24
+ // Display block in IE6-9 and FF3
25
+ // -------------------------
26
+
27
+ audio,
28
+ canvas,
29
+ video {
30
+ display: inline-block;
31
+ *display: inline;
32
+ *zoom: 1;
33
+ }
34
+
35
+ // Prevents modern browsers from displaying 'audio' without controls
36
+ // -------------------------
37
+
38
+ audio:not([controls]) {
39
+ display: none;
40
+ }
41
+
42
+ // Base settings
43
+ // -------------------------
44
+
45
+ html {
46
+ font-size: 100%;
47
+ -webkit-text-size-adjust: 100%;
48
+ -ms-text-size-adjust: 100%;
49
+ }
50
+ // Hover & Active
51
+ a:hover,
52
+ a:active {
53
+ outline: 0;
54
+ }
55
+
56
+ // Prevents sub and sup affecting line-height in all browsers
57
+ // -------------------------
58
+
59
+ sub,
60
+ sup {
61
+ position: relative;
62
+ font-size: 75%;
63
+ line-height: 0;
64
+ vertical-align: baseline;
65
+ }
66
+ sup {
67
+ top: -0.5em;
68
+ }
69
+ sub {
70
+ bottom: -0.25em;
71
+ }
72
+
73
+ // Img border in a's and image quality
74
+ // -------------------------
75
+
76
+ img {
77
+ /* Responsive images (ensure images don't scale beyond their parents) */
78
+ max-width: 100%; /* Part 1: Set a maxium relative to the parent */
79
+ width: auto\9; /* IE7-8 need help adjusting responsive images */
80
+ height: auto; /* Part 2: Scale the height according to the width, otherwise you get stretching */
81
+
82
+ vertical-align: middle;
83
+ border: 0;
84
+ -ms-interpolation-mode: bicubic;
85
+ }
86
+
87
+ // Prevent max-width from affecting Google Maps
88
+ #map_canvas img,
89
+ .google-maps img {
90
+ max-width: none;
91
+ }
92
+
93
+ // Forms
94
+ // -------------------------
95
+
96
+ // Font size in all browsers, margin changes, misc consistency
97
+ button,
98
+ input,
99
+ select,
100
+ textarea {
101
+ margin: 0;
102
+ font-size: 100%;
103
+ vertical-align: middle;
104
+ }
105
+ button,
106
+ input {
107
+ *overflow: visible; // Inner spacing ie IE6/7
108
+ line-height: normal; // FF3/4 have !important on line-height in UA stylesheet
109
+ }
110
+ button::-moz-focus-inner,
111
+ input::-moz-focus-inner { // Inner padding and border oddities in FF3/4
112
+ padding: 0;
113
+ border: 0;
114
+ }
115
+ button,
116
+ html input[type="button"], // Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` and `video` controls.
117
+ input[type="reset"],
118
+ input[type="submit"] {
119
+ -webkit-appearance: button; // Corrects inability to style clickable `input` types in iOS.
120
+ cursor: pointer; // Improves usability and consistency of cursor style between image-type `input` and others.
121
+ }
122
+ label,
123
+ select,
124
+ button,
125
+ input[type="button"],
126
+ input[type="reset"],
127
+ input[type="submit"],
128
+ input[type="radio"],
129
+ input[type="checkbox"] {
130
+ cursor: pointer; // Improves usability and consistency of cursor style between image-type `input` and others.
131
+ }
132
+ input[type="search"] { // Appearance in Safari/Chrome
133
+ -webkit-appearance: textfield;
134
+ }
135
+ input[type="search"]::-webkit-search-decoration,
136
+ input[type="search"]::-webkit-search-cancel-button {
137
+ -webkit-appearance: none; // Inner-padding issues in Chrome OSX, Safari 5
138
+ }
139
+ textarea {
140
+ overflow: auto; // Remove vertical scrollbar in IE6-9
141
+ vertical-align: top; // Readability and alignment cross-browser
142
+ }
143
+
144
+
145
+ // Printing
146
+ // -------------------------
147
+ // Source: https://github.com/h5bp/html5-boilerplate/blob/master/css/main.css
148
+
149
+ @media print {
150
+
151
+ * {
152
+ text-shadow: none !important;
153
+ color: #000 !important; // Black prints faster: h5bp.com/s
154
+ background: transparent !important;
155
+ box-shadow: none !important;
156
+ }
157
+
158
+ a, a:visited {
159
+ text-decoration: underline;
160
+ }
161
+
162
+ a[href]:after {
163
+ content: " (" attr(href) ")";
164
+ }
165
+
166
+ abbr[title]:after {
167
+ content: " (" attr(title) ")";
168
+ }
169
+
170
+ // Don't show links for images, or javascript/internal links
171
+ .ir a:after,
172
+ a[href^="javascript:"]:after,
173
+ a[href^="#"]:after {
174
+ content: "";
175
+ }
176
+
177
+ pre, blockquote {
178
+ border: 1px solid #999;
179
+ page-break-inside: avoid;
180
+ }
181
+
182
+ thead {
183
+ display: table-header-group; // h5bp.com/t
184
+ }
185
+
186
+ tr,
187
+ img {
188
+ page-break-inside: avoid;
189
+ }
190
+
191
+ img {
192
+ max-width: 100% !important;
193
+ }
194
+
195
+ @page {
196
+ margin: 0.5cm;
197
+ }
198
+
199
+ p, h2, h3 {
200
+ orphans: 3;
201
+ widows: 3;
202
+ }
203
+
204
+ h2, h3 {
205
+ page-break-after: avoid;
206
+ }
207
+ }
metadata ADDED
@@ -0,0 +1,106 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: opoloo_assets
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Jochen Greif
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-09-09 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.7'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.7'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: railties
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '3.1'
48
+ - - "<"
49
+ - !ruby/object:Gem::Version
50
+ version: '5'
51
+ type: :development
52
+ prerelease: false
53
+ version_requirements: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: '3.1'
58
+ - - "<"
59
+ - !ruby/object:Gem::Version
60
+ version: '5'
61
+ description: Standard grid and normalize styles by Opoloo
62
+ email:
63
+ - jochen@opoloo.de
64
+ executables: []
65
+ extensions: []
66
+ extra_rdoc_files: []
67
+ files:
68
+ - ".gitignore"
69
+ - Gemfile
70
+ - LICENSE.txt
71
+ - README.md
72
+ - Rakefile
73
+ - lib/opoloo_assets.rb
74
+ - lib/opoloo_assets/version.rb
75
+ - opoloo_assets.gemspec
76
+ - vendor/assets/stylesheets/media_queries.css.scss
77
+ - vendor/assets/stylesheets/opoloo.css.scss
78
+ - vendor/assets/stylesheets/opoloo_assets.css.scss
79
+ - vendor/assets/stylesheets/opoloo_config.css.scss
80
+ - vendor/assets/stylesheets/opoloo_grid.css.scss
81
+ - vendor/assets/stylesheets/opoloo_reset.css.scss
82
+ homepage: http://www.opoloo.de
83
+ licenses:
84
+ - MIT
85
+ metadata: {}
86
+ post_install_message:
87
+ rdoc_options: []
88
+ require_paths:
89
+ - lib
90
+ required_ruby_version: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ required_rubygems_version: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ requirements: []
101
+ rubyforge_project:
102
+ rubygems_version: 2.3.0
103
+ signing_key:
104
+ specification_version: 4
105
+ summary: Standard grid and normalize styles by Opoloo
106
+ test_files: []