bearded_grid 0.0.4
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 +19 -0
- data/_bearded-grid.scss +1 -0
- data/bearded_grid.gemspec +24 -0
- data/lib/bearded_grid.rb +9 -0
- data/stylesheets/bearded/_grid.scss +121 -0
- metadata +84 -0
    
        data/README.md
    ADDED
    
    | @@ -0,0 +1,19 @@ | |
| 1 | 
            +
            bearded-grid
         | 
| 2 | 
            +
            ===========
         | 
| 3 | 
            +
             | 
| 4 | 
            +
            Our RWD Grid System, Gemified.
         | 
| 5 | 
            +
             | 
| 6 | 
            +
            In your main Compass "imports" file or wherever you like:
         | 
| 7 | 
            +
             | 
| 8 | 
            +
                @import "compass";
         | 
| 9 | 
            +
                @import "bearded/grid";
         | 
| 10 | 
            +
             | 
| 11 | 
            +
            Then, you can use the grid as we always have.
         | 
| 12 | 
            +
             | 
| 13 | 
            +
            Be sure to define a max-width on your container:
         | 
| 14 | 
            +
                
         | 
| 15 | 
            +
                .container {
         | 
| 16 | 
            +
                  @include container(68.75em);
         | 
| 17 | 
            +
                }
         | 
| 18 | 
            +
             | 
| 19 | 
            +
            If you don't set a max-width, it will default to 81.25em (1300px).
         | 
    
        data/_bearded-grid.scss
    ADDED
    
    | @@ -0,0 +1 @@ | |
| 1 | 
            +
            @import "stylesheets/grid";
         | 
| @@ -0,0 +1,24 @@ | |
| 1 | 
            +
            Gem::Specification.new do |s|
         | 
| 2 | 
            +
              s.name = %q{bearded_grid}
         | 
| 3 | 
            +
              s.version = "0.0.4"
         | 
| 4 | 
            +
              s.date = "2013-02-18"
         | 
| 5 | 
            +
             | 
| 6 | 
            +
              s.required_rubygems_version = Gem::Requirement.new(">= 1.3.5")
         | 
| 7 | 
            +
              s.authors = ["Patrick Fulton", "Matt Griffin"]
         | 
| 8 | 
            +
              s.description = %q{A responsive grid system from Bearded}
         | 
| 9 | 
            +
              s.email = %w{patrick@bearded.com matt@bearded.com}
         | 
| 10 | 
            +
              s.has_rdoc = false
         | 
| 11 | 
            +
              s.files = [
         | 
| 12 | 
            +
                "bearded_grid.gemspec",
         | 
| 13 | 
            +
                "README.md",
         | 
| 14 | 
            +
                "lib/bearded_grid.rb",
         | 
| 15 | 
            +
                "_bearded-grid.scss",
         | 
| 16 | 
            +
                "stylesheets/bearded/_grid.scss"
         | 
| 17 | 
            +
              ]
         | 
| 18 | 
            +
              s.homepage = %q{https://github.com/beardedstudio/bearded_grid}
         | 
| 19 | 
            +
              s.require_paths = ["lib"]
         | 
| 20 | 
            +
              s.rubygems_version = %q{1.3.6}
         | 
| 21 | 
            +
              s.summary = %q{A responsive CSS grid system from Bearded}
         | 
| 22 | 
            +
              s.add_dependency("sass",      [">=3.2.5"])
         | 
| 23 | 
            +
              s.add_dependency(%q<compass>, [">= 0.12.2"])
         | 
| 24 | 
            +
            end
         | 
    
        data/lib/bearded_grid.rb
    ADDED
    
    
| @@ -0,0 +1,121 @@ | |
| 1 | 
            +
            // Loosely based on 960.gs //
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            $gutter_width: 3.5%;
         | 
| 4 | 
            +
            $columns: 12;
         | 
| 5 | 
            +
            $column_width: 5.125%;
         | 
| 6 | 
            +
            $grid_width: ((($column_width+($gutter_width))*$columns)-$gutter_width);
         | 
| 7 | 
            +
             | 
| 8 | 
            +
            // A 16-column version of the grid:
         | 
| 9 | 
            +
             | 
| 10 | 
            +
            // $gutter_width: 4%;
         | 
| 11 | 
            +
            // $columns: 16;
         | 
| 12 | 
            +
            // $column_width: 2.5%;
         | 
| 13 | 
            +
            // $grid_width: ((($column_width+($gutter_width))*$columns)-$gutter_width);
         | 
| 14 | 
            +
             | 
| 15 | 
            +
            @mixin container($max-width: 81.25em) {
         | 
| 16 | 
            +
              width: $grid_width;
         | 
| 17 | 
            +
              margin: auto;
         | 
| 18 | 
            +
              max-width: $max-width;
         | 
| 19 | 
            +
              *zoom: 1;
         | 
| 20 | 
            +
            }
         | 
| 21 | 
            +
             | 
| 22 | 
            +
            @function column_width($num) {
         | 
| 23 | 
            +
              @return ($num * $column_width) + (($num - 1) * ($gutter_width));
         | 
| 24 | 
            +
            }
         | 
| 25 | 
            +
             | 
| 26 | 
            +
            @mixin column($num) {
         | 
| 27 | 
            +
              display: inline;
         | 
| 28 | 
            +
              float: left;
         | 
| 29 | 
            +
              width: column_width($num);
         | 
| 30 | 
            +
              margin-right: $gutter_width;
         | 
| 31 | 
            +
              margin-left: 0;
         | 
| 32 | 
            +
            }
         | 
| 33 | 
            +
             | 
| 34 | 
            +
            @mixin prepend($num) {
         | 
| 35 | 
            +
              margin-left: column_width($num) + ($gutter_width * 2);
         | 
| 36 | 
            +
            }
         | 
| 37 | 
            +
             | 
| 38 | 
            +
            @mixin append($num) {
         | 
| 39 | 
            +
              margin-right: column_width($num) + ($gutter_width * 2);
         | 
| 40 | 
            +
            }
         | 
| 41 | 
            +
             | 
| 42 | 
            +
            @mixin last {
         | 
| 43 | 
            +
              margin-right: 0;
         | 
| 44 | 
            +
            }
         | 
| 45 | 
            +
             | 
| 46 | 
            +
            @mixin last-col2 {
         | 
| 47 | 
            +
              &:nth-of-type(n) {
         | 
| 48 | 
            +
                margin-right: $gutter-width;
         | 
| 49 | 
            +
                .lt-ie8 & {
         | 
| 50 | 
            +
                  margin-right: $gutter_width - 0.25%;
         | 
| 51 | 
            +
                }
         | 
| 52 | 
            +
                float: left;
         | 
| 53 | 
            +
                clear: none;
         | 
| 54 | 
            +
              }
         | 
| 55 | 
            +
              &:nth-of-type(2n+2) {
         | 
| 56 | 
            +
                @include last;
         | 
| 57 | 
            +
                float: right;
         | 
| 58 | 
            +
              }
         | 
| 59 | 
            +
              &:nth-of-type(2n+3) {
         | 
| 60 | 
            +
                clear: both;
         | 
| 61 | 
            +
              }
         | 
| 62 | 
            +
            }
         | 
| 63 | 
            +
             | 
| 64 | 
            +
            @mixin last-col3 {
         | 
| 65 | 
            +
              &:nth-of-type(n) {
         | 
| 66 | 
            +
                margin-right: $gutter-width;
         | 
| 67 | 
            +
                .lt-ie8 & {
         | 
| 68 | 
            +
                  margin-right: $gutter_width - 0.25%;
         | 
| 69 | 
            +
                }
         | 
| 70 | 
            +
                float: left;
         | 
| 71 | 
            +
                clear: none;
         | 
| 72 | 
            +
              }
         | 
| 73 | 
            +
              &:nth-of-type(3n+3) {
         | 
| 74 | 
            +
                @include last;
         | 
| 75 | 
            +
                float: right;
         | 
| 76 | 
            +
              }
         | 
| 77 | 
            +
              &:nth-of-type(3n+4) {
         | 
| 78 | 
            +
                clear: both;
         | 
| 79 | 
            +
              }
         | 
| 80 | 
            +
            }
         | 
| 81 | 
            +
             | 
| 82 | 
            +
            @mixin last-col4 {
         | 
| 83 | 
            +
              &:nth-of-type(n) {
         | 
| 84 | 
            +
                margin-right: $gutter-width;
         | 
| 85 | 
            +
                .lt-ie8 & {
         | 
| 86 | 
            +
                  margin-right: $gutter_width - 0.25%;
         | 
| 87 | 
            +
                }
         | 
| 88 | 
            +
                float: left;
         | 
| 89 | 
            +
                clear: none;
         | 
| 90 | 
            +
              }
         | 
| 91 | 
            +
              &:nth-of-type(4n+4) {
         | 
| 92 | 
            +
                @include last;
         | 
| 93 | 
            +
                float: right;
         | 
| 94 | 
            +
              }
         | 
| 95 | 
            +
              &:nth-of-type(4n+5) {
         | 
| 96 | 
            +
                clear: both;
         | 
| 97 | 
            +
              }
         | 
| 98 | 
            +
            }
         | 
| 99 | 
            +
             | 
| 100 | 
            +
            @mixin last-col6 {
         | 
| 101 | 
            +
              &:nth-of-type(n) {
         | 
| 102 | 
            +
                margin-right: $gutter-width;
         | 
| 103 | 
            +
                .lt-ie8 & {
         | 
| 104 | 
            +
                  margin-right: $gutter_width - 0.25%;
         | 
| 105 | 
            +
                }
         | 
| 106 | 
            +
                float: left;
         | 
| 107 | 
            +
                clear: none;
         | 
| 108 | 
            +
              }
         | 
| 109 | 
            +
              &:nth-of-type(6n+6) {
         | 
| 110 | 
            +
                @include last;
         | 
| 111 | 
            +
                float: right;
         | 
| 112 | 
            +
              }
         | 
| 113 | 
            +
              &:nth-of-type(6n+7) {
         | 
| 114 | 
            +
                clear: both;
         | 
| 115 | 
            +
              }
         | 
| 116 | 
            +
            }
         | 
| 117 | 
            +
             | 
| 118 | 
            +
            @mixin mobile-grid {
         | 
| 119 | 
            +
              padding-left: 2.5%;
         | 
| 120 | 
            +
              padding-right: 2.5%;
         | 
| 121 | 
            +
            }
         | 
    
        metadata
    ADDED
    
    | @@ -0,0 +1,84 @@ | |
| 1 | 
            +
            --- !ruby/object:Gem::Specification
         | 
| 2 | 
            +
            name: bearded_grid
         | 
| 3 | 
            +
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            +
              version: 0.0.4
         | 
| 5 | 
            +
              prerelease: 
         | 
| 6 | 
            +
            platform: ruby
         | 
| 7 | 
            +
            authors:
         | 
| 8 | 
            +
            - Patrick Fulton
         | 
| 9 | 
            +
            - Matt Griffin
         | 
| 10 | 
            +
            autorequire: 
         | 
| 11 | 
            +
            bindir: bin
         | 
| 12 | 
            +
            cert_chain: []
         | 
| 13 | 
            +
            date: 2013-02-18 00:00:00.000000000 Z
         | 
| 14 | 
            +
            dependencies:
         | 
| 15 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 16 | 
            +
              name: sass
         | 
| 17 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 18 | 
            +
                none: false
         | 
| 19 | 
            +
                requirements:
         | 
| 20 | 
            +
                - - ! '>='
         | 
| 21 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 22 | 
            +
                    version: 3.2.5
         | 
| 23 | 
            +
              type: :runtime
         | 
| 24 | 
            +
              prerelease: false
         | 
| 25 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 26 | 
            +
                none: false
         | 
| 27 | 
            +
                requirements:
         | 
| 28 | 
            +
                - - ! '>='
         | 
| 29 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 30 | 
            +
                    version: 3.2.5
         | 
| 31 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 32 | 
            +
              name: compass
         | 
| 33 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 34 | 
            +
                none: false
         | 
| 35 | 
            +
                requirements:
         | 
| 36 | 
            +
                - - ! '>='
         | 
| 37 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 38 | 
            +
                    version: 0.12.2
         | 
| 39 | 
            +
              type: :runtime
         | 
| 40 | 
            +
              prerelease: false
         | 
| 41 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 42 | 
            +
                none: false
         | 
| 43 | 
            +
                requirements:
         | 
| 44 | 
            +
                - - ! '>='
         | 
| 45 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 46 | 
            +
                    version: 0.12.2
         | 
| 47 | 
            +
            description: A responsive grid system from Bearded
         | 
| 48 | 
            +
            email:
         | 
| 49 | 
            +
            - patrick@bearded.com
         | 
| 50 | 
            +
            - matt@bearded.com
         | 
| 51 | 
            +
            executables: []
         | 
| 52 | 
            +
            extensions: []
         | 
| 53 | 
            +
            extra_rdoc_files: []
         | 
| 54 | 
            +
            files:
         | 
| 55 | 
            +
            - bearded_grid.gemspec
         | 
| 56 | 
            +
            - README.md
         | 
| 57 | 
            +
            - lib/bearded_grid.rb
         | 
| 58 | 
            +
            - _bearded-grid.scss
         | 
| 59 | 
            +
            - stylesheets/bearded/_grid.scss
         | 
| 60 | 
            +
            homepage: https://github.com/beardedstudio/bearded_grid
         | 
| 61 | 
            +
            licenses: []
         | 
| 62 | 
            +
            post_install_message: 
         | 
| 63 | 
            +
            rdoc_options: []
         | 
| 64 | 
            +
            require_paths:
         | 
| 65 | 
            +
            - lib
         | 
| 66 | 
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         | 
| 67 | 
            +
              none: false
         | 
| 68 | 
            +
              requirements:
         | 
| 69 | 
            +
              - - ! '>='
         | 
| 70 | 
            +
                - !ruby/object:Gem::Version
         | 
| 71 | 
            +
                  version: '0'
         | 
| 72 | 
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 73 | 
            +
              none: false
         | 
| 74 | 
            +
              requirements:
         | 
| 75 | 
            +
              - - ! '>='
         | 
| 76 | 
            +
                - !ruby/object:Gem::Version
         | 
| 77 | 
            +
                  version: 1.3.5
         | 
| 78 | 
            +
            requirements: []
         | 
| 79 | 
            +
            rubyforge_project: 
         | 
| 80 | 
            +
            rubygems_version: 1.8.24
         | 
| 81 | 
            +
            signing_key: 
         | 
| 82 | 
            +
            specification_version: 3
         | 
| 83 | 
            +
            summary: A responsive CSS grid system from Bearded
         | 
| 84 | 
            +
            test_files: []
         |