compass-tfg-plugin 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.
- data/README.md +94 -0
- data/compass-tfg-plugin.gemspec +31 -0
- data/lib/compass-tfg.rb +2 -0
- data/stylesheets/_tfg.scss +36 -0
- metadata +88 -0
data/README.md
ADDED
@@ -0,0 +1,94 @@
|
|
1
|
+
# Tiny Fluid Grid: Compass Plugin
|
2
|
+
|
3
|
+
This is a port of the [Tiny Fluid Grid][], originally developed by
|
4
|
+
[Girlfriend][].
|
5
|
+
|
6
|
+
[tiny fluid grid]: http://tinyfluidgrid.com/
|
7
|
+
[girlfriend]: http://girlfriendnyc.com/
|
8
|
+
|
9
|
+
|
10
|
+
## Usage Example
|
11
|
+
|
12
|
+
### HTML
|
13
|
+
|
14
|
+
#container
|
15
|
+
<!-- row 1 -->
|
16
|
+
#col1
|
17
|
+
#subcol1
|
18
|
+
#subcol2
|
19
|
+
#col2
|
20
|
+
|
21
|
+
<!-- row 2 -->
|
22
|
+
#col3
|
23
|
+
#col4
|
24
|
+
#col5
|
25
|
+
|
26
|
+
### Sass
|
27
|
+
|
28
|
+
@import "tfg";
|
29
|
+
|
30
|
+
// The following configuration variables are all optional.
|
31
|
+
$tfg-min-width: 960px; // default 800px
|
32
|
+
$tfg-max-width: 1200px; // default 960px
|
33
|
+
$tfg-columns: 16; // default 12
|
34
|
+
$tfg-gutter: 30%; // default 20%
|
35
|
+
|
36
|
+
#container {
|
37
|
+
@include container;
|
38
|
+
|
39
|
+
// Row 1
|
40
|
+
|
41
|
+
#col1 {
|
42
|
+
@include grid(8);
|
43
|
+
|
44
|
+
#subcol1 {
|
45
|
+
@include grid(3);
|
46
|
+
@include alpha;
|
47
|
+
}
|
48
|
+
|
49
|
+
#subcol2 {
|
50
|
+
@include grid(5);
|
51
|
+
@include omega;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
#col2 {
|
56
|
+
@include grid(5);
|
57
|
+
@include prepend(2);
|
58
|
+
@include append(1);
|
59
|
+
}
|
60
|
+
|
61
|
+
// Row 2:
|
62
|
+
|
63
|
+
#col3 { @include grid(4); }
|
64
|
+
#col4 { @include grid(6); }
|
65
|
+
#col5 { @include grid(6); }
|
66
|
+
}
|
67
|
+
|
68
|
+
|
69
|
+
## (Un)license
|
70
|
+
|
71
|
+
This is free and unencumbered software released into the public domain.
|
72
|
+
|
73
|
+
Anyone is free to copy, modify, publish, use, compile, sell, or
|
74
|
+
distribute this software, either in source code form or as a compiled
|
75
|
+
binary, for any purpose, commercial or non-commercial, and by any
|
76
|
+
means.
|
77
|
+
|
78
|
+
In jurisdictions that recognize copyright laws, the author or authors
|
79
|
+
of this software dedicate any and all copyright interest in the
|
80
|
+
software to the public domain. We make this dedication for the benefit
|
81
|
+
of the public at large and to the detriment of our heirs and
|
82
|
+
successors. We intend this dedication to be an overt act of
|
83
|
+
relinquishment in perpetuity of all present and future rights to this
|
84
|
+
software under copyright law.
|
85
|
+
|
86
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
87
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
88
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
89
|
+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
90
|
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
91
|
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
92
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
93
|
+
|
94
|
+
For more information, please refer to <http://unlicense.org/>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
#!/usr/bin/env ruby -rubygems
|
2
|
+
# -*- coding: utf-8 -*-
|
3
|
+
|
4
|
+
|
5
|
+
GEMSPEC = Gem::Specification.new do |gem|
|
6
|
+
gem.version = File.read('VERSION').chomp
|
7
|
+
gem.date = File.mtime('VERSION').strftime('%Y-%m-%d')
|
8
|
+
|
9
|
+
gem.name = 'compass-tfg-plugin'
|
10
|
+
gem.summary = 'A Compass-compatible Sass port of the Tiny Fluid Grid system, plus extras.'
|
11
|
+
gem.homepage = 'http://github.com/zacharyvoase/compass-tfg-plugin'
|
12
|
+
gem.license = 'Public Domain' if gem.respond_to?(:license=)
|
13
|
+
gem.description = 'The happy & awesome way to build fluid grid based websites (http://tinyfluidgrid.com/).'
|
14
|
+
|
15
|
+
gem.authors = ['Zachary Voase']
|
16
|
+
gem.email = 'z@zacharyvoase.com'
|
17
|
+
|
18
|
+
gem.platform = Gem::Platform::RUBY
|
19
|
+
gem.files = %w(README.md compass-tfg-plugin.gemspec) + Dir['lib/**/*.rb'] + Dir['stylesheets/**/*.scss']
|
20
|
+
gem.bindir = %q(bin)
|
21
|
+
gem.executables = %w()
|
22
|
+
gem.require_paths = %w(lib)
|
23
|
+
gem.extensions = %w()
|
24
|
+
gem.test_files = %w()
|
25
|
+
gem.has_rdoc = false
|
26
|
+
|
27
|
+
gem.required_rubygems_version = Gem::Requirement.new(">= 1.3.6")
|
28
|
+
gem.rubygems_version = "1.3.6"
|
29
|
+
gem.add_dependency 'compass', '>= 0.10.0.rc3'
|
30
|
+
gem.post_install_message = nil
|
31
|
+
end
|
data/lib/compass-tfg.rb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
@import "compass/utilities/general/clearfix";
|
2
|
+
|
3
|
+
$tfg-min-width: 960px !default;
|
4
|
+
$tfg-max-width: 1080px !default;
|
5
|
+
$tfg-columns: 12 !default;
|
6
|
+
$tfg-gutter: 20% !default;
|
7
|
+
|
8
|
+
@mixin grid($span) {
|
9
|
+
width: ((100% - $tfg-gutter) * ($span / $tfg-columns)) + ($tfg-gutter * (($span - 1) / $tfg-columns));
|
10
|
+
|
11
|
+
margin-left: $tfg-gutter / $tfg-columns / 2;
|
12
|
+
margin-right: $tfg-gutter / $tfg-columns / 2;
|
13
|
+
|
14
|
+
float: left;
|
15
|
+
display: block;
|
16
|
+
}
|
17
|
+
|
18
|
+
@mixin append($span) {
|
19
|
+
margin-right: ((100% - $tfg-gutter) * ($span / $tfg-columns)) + ($tfg-gutter * (($span + 1) / $tfg-columns / 2));
|
20
|
+
}
|
21
|
+
|
22
|
+
@mixin prepend($span) {
|
23
|
+
margin-left: ((100% - $tfg-gutter) * ($span / $tfg-columns)) + ($tfg-gutter * (($span + 1) / $tfg-columns / 2));
|
24
|
+
}
|
25
|
+
|
26
|
+
@mixin container {
|
27
|
+
@include pie-clearfix;
|
28
|
+
|
29
|
+
min-width: $tfg-min-width;
|
30
|
+
max-width: $tfg-max-width;
|
31
|
+
|
32
|
+
margin: auto;
|
33
|
+
}
|
34
|
+
|
35
|
+
@mixin alpha { margin-left: 0; }
|
36
|
+
@mixin omega { margin-right: 0; }
|
metadata
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: compass-tfg-plugin
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Zachary Voase
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2010-05-30 00:00:00 +00:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: compass
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 977940508
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
- 10
|
33
|
+
- 0
|
34
|
+
- rc3
|
35
|
+
version: 0.10.0.rc3
|
36
|
+
type: :runtime
|
37
|
+
version_requirements: *id001
|
38
|
+
description: The happy & awesome way to build fluid grid based websites (http://tinyfluidgrid.com/).
|
39
|
+
email: z@zacharyvoase.com
|
40
|
+
executables: []
|
41
|
+
|
42
|
+
extensions: []
|
43
|
+
|
44
|
+
extra_rdoc_files: []
|
45
|
+
|
46
|
+
files:
|
47
|
+
- README.md
|
48
|
+
- compass-tfg-plugin.gemspec
|
49
|
+
- lib/compass-tfg.rb
|
50
|
+
- stylesheets/_tfg.scss
|
51
|
+
has_rdoc: false
|
52
|
+
homepage: http://github.com/zacharyvoase/compass-tfg-plugin
|
53
|
+
licenses:
|
54
|
+
- Public Domain
|
55
|
+
post_install_message:
|
56
|
+
rdoc_options: []
|
57
|
+
|
58
|
+
require_paths:
|
59
|
+
- lib
|
60
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
62
|
+
requirements:
|
63
|
+
- - ">="
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
hash: 3
|
66
|
+
segments:
|
67
|
+
- 0
|
68
|
+
version: "0"
|
69
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
|
+
none: false
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
hash: 23
|
75
|
+
segments:
|
76
|
+
- 1
|
77
|
+
- 3
|
78
|
+
- 6
|
79
|
+
version: 1.3.6
|
80
|
+
requirements: []
|
81
|
+
|
82
|
+
rubyforge_project:
|
83
|
+
rubygems_version: 1.3.7
|
84
|
+
signing_key:
|
85
|
+
specification_version: 3
|
86
|
+
summary: A Compass-compatible Sass port of the Tiny Fluid Grid system, plus extras.
|
87
|
+
test_files: []
|
88
|
+
|