adrianss-compass-oocss-plugin 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2009 Adrian Sanchez
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,30 @@
1
+ Software License Agreement (BSD License)
2
+
3
+ Copyright (c) 2009, Nicole Sullivan.
4
+ All rights reserved.
5
+
6
+ Redistribution and use of this software in source and binary forms, with or without modification, are
7
+ permitted provided that the following conditions are met:
8
+
9
+ * Redistributions of source code must retain the above
10
+ copyright notice, this list of conditions and the
11
+ following disclaimer.
12
+
13
+ * Redistributions in binary form must reproduce the above
14
+ copyright notice, this list of conditions and the
15
+ following disclaimer in the documentation and/or other
16
+ materials provided with the distribution.
17
+
18
+ * Neither the name of Nicole Sullivan nor the names of its
19
+ contributors may be used to endorse or promote products
20
+ derived from this software without specific prior
21
+ written permission of Nicole Sullivan.
22
+
23
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
24
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
25
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
26
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
29
+ TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
30
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/README ADDED
@@ -0,0 +1,4 @@
1
+ == Build gem
2
+
3
+ rake gem
4
+
@@ -0,0 +1,58 @@
1
+ require 'rubygems' unless ENV['NO_RUBYGEMS']
2
+ require 'rake/gempackagetask'
3
+ require 'rubygems/specification'
4
+ require 'date'
5
+ require 'spec/rake/spectask'
6
+
7
+ GEM = "compass-oocss-plugin"
8
+
9
+ spec = Gem::Specification.new do |s|
10
+ s.name = "compass-oocss-plugin"
11
+ s.version = File.read('VERSION').strip
12
+ s.author = "Adrian Sanchez"
13
+ s.email = "adrian.saz@gmail.com"
14
+ s.rubyforge_project = "compass-oocss-plugin"
15
+ # s.homepage = "http://example.com"
16
+ s.summary = "compass-oocss-plugin is a plugin for compass that incorporate oocss framework."
17
+ s.description = <<-END
18
+ compass-oocss-plugin is a plugin for compass that incorporate oocss framework.
19
+ END
20
+
21
+ s.platform = Gem::Platform::RUBY
22
+ s.has_rdoc = true
23
+ s.extra_rdoc_files = ["README", "LICENSE"]
24
+
25
+ s.add_runtime_dependency 'chriseppstein-compass', '>= 0'
26
+ s.add_development_dependency 'spec', '>= 1.2'
27
+
28
+ s.require_path = 'lib'
29
+ s.files = %w(LICENSE OOCSS-LICENSE README Rakefile) + Dir.glob("{lib,spec,sass,templates}/**/*")
30
+
31
+ s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Compass-oocss-plugin", "--main"]
32
+ end
33
+
34
+ task :default => :spec
35
+
36
+ desc "Run specs"
37
+ Spec::Rake::SpecTask.new do |t|
38
+ t.spec_files = FileList['spec/**/*_spec.rb']
39
+ t.spec_opts = %w(-fs --color)
40
+ end
41
+
42
+
43
+ Rake::GemPackageTask.new(spec) do |pkg|
44
+ pkg.gem_spec = spec
45
+ end
46
+
47
+ desc "install the gem locally"
48
+ task :install => [:package] do
49
+ GEM_VERSION=File.read('VERSION').strip
50
+ sh %{sudo gem install pkg/#{GEM}-#{GEM_VERSION}}
51
+ end
52
+
53
+ desc "create a gemspec file"
54
+ task :make_spec do
55
+ File.open("#{GEM}.gemspec", "w") do |file|
56
+ file.puts spec.to_ruby
57
+ end
58
+ end
@@ -0,0 +1,2 @@
1
+ require File.join(File.dirname(__FILE__), 'compass-oocss-plugin', 'compass_plugin')
2
+ require File.join(File.dirname(__FILE__), 'compass-oocss-plugin', 'sass_extensions')
@@ -0,0 +1,5 @@
1
+ options = Hash.new
2
+ options[:stylesheets_directory] = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'sass'))
3
+ options[:templates_directory] = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'templates'))
4
+
5
+ Compass::Frameworks.register('oocss', options)
@@ -0,0 +1,10 @@
1
+ require 'sass'
2
+ #require 'css_parser'
3
+
4
+ #960
5
+ module Sass::Script::Functions
6
+ def enumerate(prefix, from_index, to_index)
7
+ Sass::Script::String.new(((from_index.value)..(to_index.value)).map{|i| "#{prefix}#{i}"}.join(", "))
8
+ end
9
+ end
10
+
@@ -0,0 +1,271 @@
1
+ // Content style
2
+
3
+ =content_scaffold
4
+ body
5
+ font-family: "Myriad Pro","Segoe UI",Helvetica, Arial, sans-serif
6
+
7
+ /* **************** CONTENT OBJECTS *****************
8
+ /* ====== Default spacing ======
9
+ h1, h2, h3, h4, h5, h6, ul, ol, dl, p, blockquote
10
+ padding: 10px
11
+
12
+
13
+ h1, h2, h3, h4, h5, h6, img
14
+ padding-bottom: 0px
15
+
16
+
17
+ pre
18
+ margin: 10px
19
+
20
+
21
+ table
22
+ h1, h2, h3, h4, h5, h6, p, ul, ol, dl
23
+ padding: 0
24
+
25
+ /* ====== Headings ======
26
+ /*
27
+ .h1-.h6 classes should be used to maintain the semantically
28
+ appropriate heading levels - NOT for use on non-headings
29
+
30
+ /*
31
+ if additional headings are needed they should be created
32
+ via additional classes, never via location dependant styling
33
+
34
+ h1, .h1
35
+ font-size: 196%
36
+ font-weight: normal
37
+ font-style: normal
38
+ color: #AE0345
39
+
40
+ h2, .h2
41
+ font-size: 167%
42
+ font-weight: normal
43
+ font-style: normal
44
+ color: #AE0345
45
+
46
+ h3, .h3
47
+ font-size: 146.5%
48
+ font-weight: normal
49
+ font-style: normal
50
+ color: #DF2B72
51
+
52
+ h4, .h4
53
+ font-size: 123.1%
54
+ font-weight: normal
55
+ font-style: normal
56
+ color: #333
57
+
58
+ h5, .h5
59
+ font-size: 108%
60
+ font-weight: bold
61
+ font-style: normal
62
+ color: #AE0345
63
+
64
+ h6, .h6
65
+ font-size: 108%
66
+ font-weight: normal
67
+ font-style: italic
68
+ color: #333
69
+
70
+ .category
71
+ font-size: 108%
72
+ font-weight: normal
73
+ font-style: normal
74
+ text-transform: uppercase
75
+ color: #333
76
+
77
+ a
78
+ color: #333
79
+
80
+ .important a
81
+ font-weight: bold
82
+
83
+
84
+ /* links
85
+ a
86
+ color: #036
87
+ font-weight: bold
88
+ text-decoration: none
89
+
90
+ &:focus, &:hover
91
+ text-decoration: underline
92
+
93
+ &:visited
94
+ color: #005a9c
95
+
96
+ /* ====== Lists ======
97
+ /* numbered list
98
+ ol.simpleList li
99
+ list-style-type: decimal
100
+ margin-left: 40px
101
+
102
+ /* standard list
103
+ ul.simpleList li
104
+ list-style-type: disc
105
+ margin-left: 40px
106
+
107
+ /* ====== Tables ======
108
+ .data
109
+ padding: 20px
110
+ position: relative
111
+ zoom: 1
112
+ vertical-align: top
113
+ /* border fixes a FF2 bug which causes the data table to overlay its borders
114
+ border-right: solid 1px transparent
115
+
116
+ table
117
+ width: 100%
118
+ border: 1px solid #AE0345
119
+
120
+
121
+ th, td
122
+ vertical-align: top
123
+ border: 1px solid #AE0345
124
+
125
+
126
+ .txtC
127
+ text-align: center
128
+
129
+
130
+ .data .txtC
131
+ td, th
132
+ text-align: center
133
+
134
+
135
+ .txtL
136
+ text-align: left
137
+
138
+
139
+ .data .txtL
140
+ td, th
141
+ text-align: left
142
+
143
+
144
+ .txtR
145
+ text-align: right
146
+
147
+
148
+ .data .txtR
149
+ td, th
150
+ text-align: right
151
+
152
+
153
+ .txtT
154
+ vertical-align: top
155
+
156
+
157
+ .data .txtT
158
+ td, th
159
+ vertical-align: top
160
+
161
+
162
+ .txtB
163
+ vertical-align: bottom
164
+
165
+
166
+ .data .txtB
167
+ td, th
168
+ vertical-align: bottom
169
+
170
+
171
+ .txtM
172
+ vertical-align: middle
173
+
174
+
175
+ .data
176
+ .txtM
177
+ td, th
178
+ vertical-align: middle
179
+
180
+ th, td
181
+ padding: 3px 20px
182
+
183
+ thead tr
184
+ background-color: #fff0f8
185
+
186
+ th
187
+ color: #000
188
+ font-weight: bold
189
+
190
+ /* specification table - extends data table
191
+ .spec
192
+ padding: 10px
193
+
194
+ table
195
+ border-top: 1px solid #e2e2e2
196
+ border-bottom-color: #fff
197
+ border-left: none
198
+ border-right: none
199
+
200
+ th, td
201
+ border: 1px solid #e2e2e2
202
+ border-width: 1px 0
203
+ padding-left: 0
204
+
205
+ .odd, .even
206
+ background-color: #fff
207
+
208
+ /* ====== blockquote ======
209
+ cite
210
+ display: block
211
+ text-align: right
212
+ padding-top: 10px
213
+
214
+ /* ====== callout ======
215
+ .callout
216
+ font-size: 189%
217
+ color: #999999
218
+ font-style: italic
219
+
220
+ cite
221
+ display: block
222
+ text-align: right
223
+ padding-top: 30px
224
+ font-size: 69.25%
225
+
226
+ span
227
+ &.quot
228
+ font-size: 500%
229
+ vertical-align: sub
230
+ color: #e2e2e2
231
+ line-height: 25px
232
+ font-weight: bold
233
+
234
+ &.quotLast
235
+ vertical-align: middle
236
+
237
+ /* ====== image treatments (get more from jason santa maria) ======
238
+ /*
239
+ will need to either
240
+ 1. find a way to capture the width of the caption in the width of the image or flash
241
+ 2. Set some default widths, mby use flickr widths?
242
+
243
+ .caption
244
+ font-size: 13px
245
+ color: #666666
246
+ font-style: italic
247
+ padding-top: 0
248
+
249
+ /* ====== media ======
250
+ .media
251
+ overflow: hidden
252
+ overflow: visible
253
+ zoom: 1
254
+ margin: 10px
255
+
256
+ .img
257
+ float: left
258
+ margin-right: 10px
259
+
260
+ img
261
+ display: block
262
+
263
+ .imgExt
264
+ float: right
265
+ margin-left: 10px
266
+
267
+ /* ====== special formatting classes ======
268
+ .detail
269
+ color: #777
270
+ font-size: 11px
271
+ display: block
@@ -0,0 +1,29 @@
1
+ // set default fonts size and family for the document
2
+ =fonts(!fonts_family="arial,helvetica,clean,sans-serif")
3
+ body
4
+ font= "13px/1.231 #{!fonts_family}"
5
+ *font-size: small
6
+ *font: x-small
7
+
8
+ select, input, button, textarea
9
+ font= "99% #{!fonts_family}"
10
+
11
+ table
12
+ font-size: inherit
13
+ font: 100%
14
+
15
+ pre, code, kbd, samp, tt
16
+ font-family: monospace
17
+ *font-size: 108%
18
+ line-height: 100%
19
+
20
+
21
+ =fonts_scaffold
22
+ /*
23
+ Copyright (c) 2008, Yahoo! Inc. All rights reserved.
24
+ Code licensed under the BSD License:
25
+ http://developer.yahoo.net/yui/license.txt
26
+ version: 3.0.0pr2
27
+
28
+ /* fonts
29
+ +fonts
@@ -0,0 +1,113 @@
1
+ // **************** GRIDS *****************
2
+ =line
3
+ _zoom: 1
4
+ &:after
5
+ content: "."
6
+ display: block
7
+ height: 0
8
+ clear: both
9
+ visibility: hidden
10
+
11
+ =unit
12
+ float: left
13
+ /*_zoom:1;
14
+
15
+ =last_unit
16
+ display: table-cell
17
+ float: none
18
+ width: auto
19
+ _display: block
20
+ _position: relative
21
+ _left: -3px
22
+ _margin-right: -3px
23
+
24
+ =unit_size(!size)
25
+ @if !size == 1
26
+ float: none
27
+ @else if !size == 1/3
28
+ //Special case
29
+ width: 33.33333%
30
+ @else if !size == 2/3
31
+ width: 66.66666%
32
+ @else
33
+ width= "#{!size * 100}%"
34
+
35
+ =column(!size, !last=false)
36
+ +unit
37
+ +unit_size(!size)
38
+ @if !last == true
39
+ +last_unit
40
+
41
+ =size1of1
42
+ +unit_size(1)
43
+
44
+ =size1of2
45
+ +unit_size(1/2)
46
+
47
+ =size1of3
48
+ +unit_size(1/3)
49
+
50
+ =size2of3
51
+ +unit_size(2/3)
52
+
53
+ =size1of4
54
+ +unit_size(1/4)
55
+
56
+ =size3of4
57
+ +unit_size(3/4)
58
+
59
+ =size1of5
60
+ +unit_size(1/5)
61
+
62
+ =size2of5
63
+ +unit_size(2/5)
64
+
65
+ =size3of5
66
+ +unit_size(3/5)
67
+
68
+ =size4of5
69
+ +unit_size(4/5)
70
+
71
+ =lastUnit
72
+ +last_unit
73
+
74
+ =grids_scaffold
75
+ /* **************** GRIDS *****************
76
+ .line
77
+ +line
78
+
79
+ .unit
80
+ +unit
81
+
82
+ .size1of1
83
+ +size1of1
84
+
85
+ .size1of2
86
+ +size1of2
87
+
88
+ .size1of3
89
+ +size1of3
90
+
91
+ .size2of3
92
+ +size2of3
93
+
94
+ .size1of4
95
+ +size1of4
96
+
97
+ .size3of4
98
+ +size3of4
99
+
100
+ .size1of5
101
+ +size1of5
102
+
103
+ .size2of5
104
+ +size2of5
105
+
106
+ .size3of5
107
+ +size3of5
108
+
109
+ .size4of5
110
+ +size4of5
111
+
112
+ .lastUnit
113
+ +lastUnit