boxmodel-rails 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 03754715636e21f9b0947a9feb01f82227a7f79c
4
+ data.tar.gz: e4f58b81e3a0c701bdef86d30e1197ec58f34e40
5
+ SHA512:
6
+ metadata.gz: 2f95c0e85da8c4d3f33c7dfd63936add608b4e9743698aeb30ed7826d51597344c53ddf919058292254f6c079c73ecc4d92ef66eb4de2210a557d6e902261ea7
7
+ data.tar.gz: 0782d196fae78f31a82ec2b8caf3474a59182633023f957333430d765c773771635dde34a97d399ea85ce824190b98d1727ba50f2dec2b2f224c0401cd2352fc
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in boxmodel-rails.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Szymon Szeliga
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,76 @@
1
+ # boxmodel-rails
2
+
3
+ Provides a pack of css utility classes to set paddings, margins and borders without writting css code
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'boxmodel-rails'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install boxmodel-rails
18
+
19
+ ----
20
+
21
+ ## Usage
22
+
23
+ #### Configuration
24
+
25
+ In you CSS manifest file add the following line:
26
+
27
+ ```scss
28
+ $step: 1;
29
+ $maxValue: 5;
30
+ @import 'boxmodel';
31
+ ```
32
+
33
+ Variables:
34
+
35
+ - `step` - defines the step by which the classes will be generated, e.g. 5 will generate *-5 *-10 etc
36
+ - `maxValue` - defines the maximum value that will be generated
37
+
38
+ #### Types of classes
39
+
40
+ The gem creates four types of classes:
41
+
42
+ 1. disabling classes - e.g. `.n-m`, `.n-p`
43
+ 2. one way classes - e.g. `.m-l-5`, `p-b-5`
44
+ 3. two way classes - e.g. `.m-v-5`, `.p-h-5`
45
+ 4. four way classes - e.g. `m-5`, `p-5`
46
+
47
+ #### Naming convetions
48
+
49
+ The naming conventions for this shortcuts are as follows:
50
+
51
+ - n - no (disabling)
52
+ - m - margin
53
+ - p - padding
54
+ - b - border
55
+ - l - left
56
+ - r - right
57
+ - t - top
58
+ - b - bottom
59
+ - v - vertical
60
+ - h - horizontal
61
+
62
+ So for example:
63
+
64
+ - `.m-5` - `margin: 5px;`
65
+ - `.m-b-10` - `margin-bottom: 10px;`
66
+ - `.m-v-10` - `margin-top: 10px; margin-bottom: 10px;`
67
+
68
+ ----
69
+
70
+ ## Contributing
71
+
72
+ 1. Fork it
73
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
74
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
75
+ 4. Push to the branch (`git push origin my-new-feature`)
76
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -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 'boxmodel/rails/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "boxmodel-rails"
8
+ spec.version = Boxmodel::Rails::VERSION
9
+ spec.authors = ["Szymon Szeliga", "Paweł Rosa"]
10
+ spec.email = ["szymon.szeliga@kmpgroup.pl", "pawel.rosa@kmpgroup.pl"]
11
+ spec.description = %q{Provides a pack of css utility classes to set paddings, margins and borders without writting css code}
12
+ spec.summary = %q{Box model css library}
13
+ spec.homepage = "https://github.com/KMPgroup/boxmodel-rails"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.require_paths = ["lib"]
18
+
19
+ spec.add_development_dependency "bundler", "~> 1.3"
20
+ spec.add_development_dependency "rake"
21
+ spec.add_dependency "railties", "> 3.0", "< 5.0"
22
+ end
@@ -0,0 +1,8 @@
1
+ require "boxmodel/rails/version"
2
+
3
+ module Boxmodel
4
+ module Rails
5
+ class Engine < ::Rails::Engine
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,5 @@
1
+ module Boxmodel
2
+ module Rails
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,94 @@
1
+ // Box-Model v1.0.0 by @szeliga and @asor
2
+ // Copyright 2013 KMP group sp. z o.o.
3
+ // Licensed under MIT License
4
+
5
+ // Variables
6
+ $step: 5 !default
7
+ $maxValue: 40 !default
8
+
9
+ // Disabling classes
10
+ .n-m
11
+ margin: 0 !important
12
+ .n-m-h
13
+ margin-left: 0 !important
14
+ margin-right: 0 !important
15
+ .n-m-v
16
+ margin-top: 0 !important
17
+ margin-bottom: 0 !important
18
+ .n-m-t
19
+ margin-top: 0 !important
20
+ .n-m-r
21
+ margin-right: 0 !important
22
+ .n-m-b
23
+ margin-bottom: 0 !important
24
+ .n-m-l
25
+ margin-left: 0 !important
26
+ .n-p
27
+ padding: 0 !important
28
+ .n-p-h
29
+ padding-left: 0 !important
30
+ padding-right: 0 !important
31
+ .n-p-v
32
+ padding-top: 0 !important
33
+ padding-bottom: 0 !important
34
+ .n-p-t
35
+ padding-top: 0 !important
36
+ .n-p-r
37
+ padding-right: 0 !important
38
+ .n-p-b
39
+ padding-bottom: 0 !important
40
+ .n-p-l
41
+ padding-left: 0 !important
42
+ .n-b
43
+ border: none !important
44
+ .n-b-h
45
+ border-left: none !important
46
+ border-right: none !important
47
+ .n-b-v
48
+ border-top: none !important
49
+ border-bottom: none !important
50
+ .n-b-t
51
+ border-top: none !important
52
+ .n-b-r
53
+ border-right: none !important
54
+ .n-b-b
55
+ border-bottom: none !important
56
+ .n-b-l
57
+ border-left: none !important
58
+
59
+ @for $i from 1 through ceil($maxValue/$step)
60
+ $val: $step * $i
61
+ // Four way classes
62
+ .m-#{$val}
63
+ margin: $val * 1px !important
64
+ .p-#{$val}
65
+ padding: $val * 1px !important
66
+ // One way classes
67
+ .m-t-#{$val}
68
+ margin-top: $val * 1px !important
69
+ .m-r-#{$val}
70
+ margin-right: $val * 1px !important
71
+ .m-b-#{$val}
72
+ margin-bottom: $val * 1px !important
73
+ .m-l-#{$val}
74
+ margin-left: $val * 1px !important
75
+ .m-h-#{$val}
76
+ margin-left: $val * 1px !important
77
+ margin-right: $val * 1px !important
78
+ .m-v-#{$val}
79
+ margin-top: $val * 1px !important
80
+ margin-bottom: $val * 1px !important
81
+ .p-t-#{$val}
82
+ padding-top: $val * 1px !important
83
+ .p-b-#{$val}
84
+ padding-bottom: $val * 1px !important
85
+ .p-r-#{$val}
86
+ padding-right: $val * 1px !important
87
+ .p-l-#{$val}
88
+ padding-left: $val * 1px !important
89
+ .p-h-#{$val}
90
+ padding-left: $val * 1px !important
91
+ padding-right: $val * 1px !important
92
+ .p-v-#{$val}
93
+ padding-top: $val * 1px !important
94
+ padding-bottom: $val * 1px !important
@@ -0,0 +1,3 @@
1
+ body {
2
+ background-color: #f00;
3
+ }
metadata ADDED
@@ -0,0 +1,105 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: boxmodel-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Szymon Szeliga
8
+ - Paweł Rosa
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-11-23 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: bundler
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ~>
19
+ - !ruby/object:Gem::Version
20
+ version: '1.3'
21
+ type: :development
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ~>
26
+ - !ruby/object:Gem::Version
27
+ version: '1.3'
28
+ - !ruby/object:Gem::Dependency
29
+ name: rake
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - '>='
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - '>='
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: railties
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - '>'
47
+ - !ruby/object:Gem::Version
48
+ version: '3.0'
49
+ - - <
50
+ - !ruby/object:Gem::Version
51
+ version: '5.0'
52
+ type: :runtime
53
+ prerelease: false
54
+ version_requirements: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - '>'
57
+ - !ruby/object:Gem::Version
58
+ version: '3.0'
59
+ - - <
60
+ - !ruby/object:Gem::Version
61
+ version: '5.0'
62
+ description: Provides a pack of css utility classes to set paddings, margins and borders
63
+ without writting css code
64
+ email:
65
+ - szymon.szeliga@kmpgroup.pl
66
+ - pawel.rosa@kmpgroup.pl
67
+ executables: []
68
+ extensions: []
69
+ extra_rdoc_files: []
70
+ files:
71
+ - .gitignore
72
+ - Gemfile
73
+ - LICENSE.txt
74
+ - README.md
75
+ - Rakefile
76
+ - boxmodel-rails.gemspec
77
+ - lib/boxmodel/rails.rb
78
+ - lib/boxmodel/rails/version.rb
79
+ - vendor/assets/stylesheets/boxmodel.css.sass
80
+ - vendor/assets/stylesheets/test.css
81
+ homepage: https://github.com/KMPgroup/boxmodel-rails
82
+ licenses:
83
+ - MIT
84
+ metadata: {}
85
+ post_install_message:
86
+ rdoc_options: []
87
+ require_paths:
88
+ - lib
89
+ required_ruby_version: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ required_rubygems_version: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - '>='
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ requirements: []
100
+ rubyforge_project:
101
+ rubygems_version: 2.1.10
102
+ signing_key:
103
+ specification_version: 4
104
+ summary: Box model css library
105
+ test_files: []