pine 0.1.0

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.
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "http://rubygems.org"
2
+ gemspec
3
+
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (C) 2011 by Tobias Svensson
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all 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
19
+ THE SOFTWARE.
20
+
@@ -0,0 +1,171 @@
1
+ # Pine
2
+
3
+ CSS grid that smell of pine. In SCSS, based on [1140](http://cssgrid.net/) for
4
+ [Compass](http://compass-style.org/). Pines are evergreen.
5
+
6
+ ## <a name="installation">Installation</a>
7
+
8
+ The best way to install Pine is with RubyGems:
9
+
10
+ $ [sudo] gem install pine
11
+
12
+ You can safely include the whole framework. Nothing is being mixed into the
13
+ global scope by default:
14
+
15
+ require 'pine'
16
+
17
+ And in your main SCSS file:
18
+
19
+ @import "pine";
20
+
21
+ ## <a name="reset">The Reset</a>
22
+
23
+ Pine includes a very basic reset mixin which contains only the rules required
24
+ in order to make the grid work. It is not intended to be a general CSS reset.
25
+
26
+ @include grid-reset;
27
+
28
+ ## <a name="grid">The Grid</a>
29
+
30
+ ### Basics
31
+
32
+ Pine is a fluid, response 12-column grid, based on
33
+ [1140](http://cssgrid.net/) by [Andy Taylor](http://www.andytlr.com/). To
34
+ create a grid, simply include the container, row and column mixins:
35
+
36
+ .container {
37
+ @include grid-container;
38
+
39
+ .row {
40
+ @include grid-row;
41
+
42
+ // Define 3 4-column wide columns.
43
+ .column1 {
44
+ @include grid-column(4);
45
+ }
46
+
47
+ .column2 {
48
+ @include grid-column(4);
49
+ }
50
+
51
+ .column3 {
52
+ // Pass 'last' as an additional argument to indicate the last column
53
+ // in a row and clear the right margin.
54
+ @include grid-column(4, last);
55
+ }
56
+ }
57
+ }
58
+
59
+ ### Media queries
60
+
61
+ Pine automatically generates media queries for each of your grid containers and
62
+ columns to stack columns on top of each other if the browser window sizes
63
+ reaches 767px or less. The following SCSS code:
64
+
65
+ .container {
66
+ @include grid-container;
67
+
68
+ .row {
69
+ @include grid-row;
70
+
71
+ .column1 {
72
+ @include grid-column(12);
73
+ }
74
+ }
75
+ }
76
+
77
+ Compiles to:
78
+
79
+ .container {
80
+ padding-left: 20px;
81
+ padding-right: 20px;
82
+ }
83
+
84
+ @media handheld, only screen and (max-width: 767px) {
85
+ .container {
86
+ width: auto;
87
+ float: none;
88
+ margin-left: 0px;
89
+ margin-right: 0px;
90
+ padding-left: 20px;
91
+ padding-right: 20px;
92
+ }
93
+ }
94
+
95
+ .container .row {
96
+ width: 100%;
97
+ max-width: 1140px;
98
+ margin: 0 auto;
99
+ overflow: hidden;
100
+ }
101
+
102
+ .container .row .column1 {
103
+ width: 100.0%;
104
+ margin-right: 3.8%;
105
+ float: left;
106
+ }
107
+
108
+ @media handheld, only screen and (max-width: 767px) {
109
+ .container .row .column1 {
110
+ width: auto;
111
+ float: none;
112
+ margin-left: 0px;
113
+ margin-right: 0px;
114
+ padding-left: 20px;
115
+ padding-right: 20px;
116
+ }
117
+ }
118
+
119
+ Of course it is possible to disable automatic media queries with:
120
+
121
+ $grid-media-queries: false;
122
+
123
+ As opposed to 1140, Pine supports floating-point column widths:
124
+
125
+ @include grid-column(1.5);
126
+
127
+ ### Configuration
128
+
129
+ Pine adds a few new things to the 1140 grid system. You can set the overall
130
+ grid width with:
131
+
132
+ $grid-width: 1140px;
133
+
134
+ Enable debug mode (background + border-bottom) with:
135
+
136
+ $grid-debug: true;
137
+
138
+ And also change the color and borders used in debug mode:
139
+
140
+ $grid-debug-background: #FDD;
141
+ $grid-debug-border-bottom: 1px solid #977;
142
+
143
+ ### Internet Explorer
144
+
145
+ To make all this work in Internet Explorer, simply import "pine/ie" into your
146
+ Internet Explorer specific stylesheet before using any of the mixins.
147
+
148
+ @import "pine/ie";
149
+
150
+ ## <a name="contributing">Contributing</a>
151
+
152
+ If you'd like to contribute to Pine, start by forking my repo on GitHub:
153
+
154
+ [http://github.com/tobiassvn/pine](http://github.com/tobiassvn/pine)
155
+
156
+ To get all of the dependencies, install the gem first. The best way to get
157
+ your changes merged back into core is as follows:
158
+
159
+ 1. Clone down your fork
160
+ 1. Create a thoughtfully named topic branch to contain your change
161
+ 1. Hack away
162
+ 1. If you are adding new functionality, document it in the README
163
+ 1. Do not change the version number, I will do that on my end
164
+ 1. If necessary, rebase your commits into logical chunks, without errors
165
+ 1. Push the branch up to GitHub
166
+ 1. Send a pull request to the tobiassvn/pine project.
167
+
168
+ ## <a name="license">License</a>
169
+
170
+ Copyright (c) 2011 Tobias Svensson. See LICENSE for further details.
171
+
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
@@ -0,0 +1,9 @@
1
+ require "compass"
2
+
3
+ module Pine
4
+ VERSION = "0.1.0"
5
+ COMPASS_REQUIRE_DIR = File.expand_path(File.join(File.dirname(__FILE__), ".."))
6
+ end
7
+
8
+ Compass::Frameworks.register("pine", Pine::COMPASS_REQUIRE_DIR)
9
+
@@ -0,0 +1,22 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "pine"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "pine"
7
+ s.version = Pine::VERSION
8
+ s.authors = ["Tobias Svensson"]
9
+ s.email = ["tob@tobiassvensson.co.uk"]
10
+ s.homepage = "http://github.com/tobiassvn/pine"
11
+ s.summary = %q{CSS grid that smells of pine. In SCSS, for Compass.}
12
+ s.description = s.summary
13
+
14
+ s.rubyforge_project = "pine"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.require_paths = ["lib"]
18
+ s.has_rdoc = false
19
+
20
+ s.add_dependency "compass", ">= 0.10"
21
+ end
22
+
@@ -0,0 +1,3 @@
1
+ @import "pine/reset";
2
+ @import "pine/grid";
3
+
@@ -0,0 +1,69 @@
1
+ $grid-width: 1140px !default;
2
+ $grid-debug: false !default;
3
+ $grid-debug-background: #FDD !default;
4
+ $grid-debug-border-bottom: 1px solid #977 !default;
5
+ $grid-media-queries: true !default;
6
+ $grid-ie-mode: false !default;
7
+
8
+ @mixin grid-container {
9
+ padding-left: 20px;
10
+ padding-right: 20px;
11
+
12
+ @if $grid-media-queries {
13
+ @media handheld, only screen and (max-width: 767px) {
14
+ width: auto;
15
+ float: none;
16
+ margin-left: 0px;
17
+ margin-right: 0px;
18
+ padding-left: 20px;
19
+ padding-right: 20px;
20
+ }
21
+ }
22
+ }
23
+
24
+ @mixin grid-row {
25
+ width: 100%;
26
+ max-width: $grid-width;
27
+ margin: 0 auto;
28
+ overflow: hidden;
29
+ }
30
+
31
+ @mixin grid-column($size: 1, $last: false) {
32
+ $column-margin: 3.8%;
33
+ $column-width: 4.85%;
34
+
35
+ @if $size < 1 {
36
+ @warn "Grid column sizes smaller than one are not supported by pine.";
37
+ }
38
+
39
+ // Internet Explorer rounds sub-pixels up instead of down, so use slightly
40
+ // smaller column sizes.
41
+ @if $grid-ie-mode { $column-width: 4.8; }
42
+
43
+ width: $size * $column-width + $size * $column-margin - $column-margin;
44
+
45
+ @if $last {
46
+ margin-right: 0px;
47
+ } @else {
48
+ margin-right: $column-margin;
49
+ }
50
+
51
+ @if $grid-debug {
52
+ background: $grid-debug-background;
53
+ border-bottom: $grid-debug-border-bottom;
54
+ }
55
+
56
+ float: left;
57
+
58
+ @if $grid-media-queries {
59
+ @media handheld, only screen and (max-width: 767px) {
60
+ width: auto;
61
+ float: none;
62
+ margin-left: 0px;
63
+ margin-right: 0px;
64
+ padding-left: 20px;
65
+ padding-right: 20px;
66
+ }
67
+ }
68
+ }
69
+
@@ -0,0 +1,2 @@
1
+ $grid-ie-mode: true;
2
+
@@ -0,0 +1,34 @@
1
+ @mixin grid-reset {
2
+ html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote,
3
+ pre, a, abbr, address, cite, code, del, dfn, em, img, ins, q, small, strong,
4
+ sub, sup, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table,
5
+ caption, tbody, tfoot, thead, tr, th, td {
6
+ border: 0;
7
+ margin: 0;
8
+ padding: 0;
9
+ }
10
+
11
+ article, aside, figcaption, hgroup, footer, header, nav, section, video,
12
+ object {
13
+ display: block;
14
+ }
15
+
16
+ a img{
17
+ border: 0;
18
+ }
19
+
20
+ figure {
21
+ position: relative;
22
+ display: block;
23
+
24
+ img {
25
+ display: block;
26
+ width: 100%;
27
+ }
28
+ }
29
+
30
+ img, object, embed {
31
+ max-width: 100%;
32
+ }
33
+ }
34
+
metadata ADDED
@@ -0,0 +1,67 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pine
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Tobias Svensson
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-10-20 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: compass
16
+ requirement: &70174221894100 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0.10'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70174221894100
25
+ description: CSS grid that smells of pine. In SCSS, for Compass.
26
+ email:
27
+ - tob@tobiassvensson.co.uk
28
+ executables: []
29
+ extensions: []
30
+ extra_rdoc_files: []
31
+ files:
32
+ - .gitignore
33
+ - Gemfile
34
+ - LICENSE
35
+ - README.md
36
+ - Rakefile
37
+ - lib/pine.rb
38
+ - pine.gemspec
39
+ - stylesheets/_pine.scss
40
+ - stylesheets/pine/_grid.scss
41
+ - stylesheets/pine/_ie.scss
42
+ - stylesheets/pine/_reset.scss
43
+ homepage: http://github.com/tobiassvn/pine
44
+ licenses: []
45
+ post_install_message:
46
+ rdoc_options: []
47
+ require_paths:
48
+ - lib
49
+ required_ruby_version: !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ required_rubygems_version: !ruby/object:Gem::Requirement
56
+ none: false
57
+ requirements:
58
+ - - ! '>='
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ requirements: []
62
+ rubyforge_project: pine
63
+ rubygems_version: 1.8.10
64
+ signing_key:
65
+ specification_version: 3
66
+ summary: CSS grid that smells of pine. In SCSS, for Compass.
67
+ test_files: []