boxmodel-rails 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -7
- data/lib/boxmodel/rails/version.rb +1 -1
- data/vendor/assets/stylesheets/boxmodel.css.sass +53 -42
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4da5520d2a2541cb5cca8567f0587cbffa94f01a
|
4
|
+
data.tar.gz: 989395fab6c1c14b273a3cc38f4aaa4f01989ee9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6fec2e594b9ef8f2c59d496ccc10d9fd0c250aeb86eb00262b38ef1fdc76ba20d948c0ccbd06d7e88038b975387eec98687599a5de975c293b8854c9a63322ae
|
7
|
+
data.tar.gz: f8c168648573871477b3eb91698213f27c7568a48469a3c6c99bd960445169efb847626126044c36ad1f9d5a7b2dcfb765c91506cab2c9eddc1c14e19b9dfc85
|
data/README.md
CHANGED
@@ -30,11 +30,20 @@ $minValue: -10;
|
|
30
30
|
$maxValue: 10;
|
31
31
|
@import 'boxmodel';
|
32
32
|
```
|
33
|
+
You can also generate classes only for specific values. To do so, define a list of values like this:
|
34
|
+
|
35
|
+
```scss
|
36
|
+
$values: -5,1,2,3,10,40;
|
37
|
+
@import 'boxmodel';
|
38
|
+
```
|
39
|
+
If you set the `$values` to something else than `null`, variables `$step`, `$minValues` and `$maxValue` are not taken into account.
|
33
40
|
|
34
41
|
Variables:
|
35
42
|
|
36
|
-
- `step` - defines the step by which the classes will be generated, e.g. 5 will generate *-5 *-10 etc
|
37
|
-
- `
|
43
|
+
- `step` - defines the step by which the classes will be generated, e.g. 5 will generate *-5 *-10 etc.
|
44
|
+
- `minValue` - defines the minimum value that will be generated.
|
45
|
+
- `maxValue` - defines the maximum value that will be generated.
|
46
|
+
- `values` - defines a list of specific values that will be generated. It's `null` by default.
|
38
47
|
|
39
48
|
#### Types of classes
|
40
49
|
|
@@ -71,8 +80,8 @@ So for example:
|
|
71
80
|
|
72
81
|
## Contributing
|
73
82
|
|
74
|
-
1. Fork it
|
75
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
76
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
77
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
78
|
-
5. Create new Pull Request
|
83
|
+
1. Fork it.
|
84
|
+
2. Create your feature branch (`git checkout -b my-new-feature`).
|
85
|
+
3. Commit your changes (`git commit -am 'Add some feature'`).
|
86
|
+
4. Push to the branch (`git push origin my-new-feature`).
|
87
|
+
5. Create new Pull Request.
|
@@ -2,11 +2,51 @@
|
|
2
2
|
// Copyright 2013 KMP group sp. z o.o.
|
3
3
|
// Licensed under MIT License
|
4
4
|
|
5
|
-
//
|
6
|
-
$
|
7
|
-
|
8
|
-
$
|
5
|
+
// Mixins
|
6
|
+
@mixin classes($val)
|
7
|
+
// Four way classes
|
8
|
+
.m-#{$val}
|
9
|
+
margin: $val * 1px !important
|
10
|
+
@if $val >= 0
|
11
|
+
.p-#{$val}
|
12
|
+
padding: $val * 1px !important
|
13
|
+
// One way classes
|
14
|
+
.m-t-#{$val}
|
15
|
+
margin-top: $val * 1px !important
|
16
|
+
.m-r-#{$val}
|
17
|
+
margin-right: $val * 1px !important
|
18
|
+
.m-b-#{$val}
|
19
|
+
margin-bottom: $val * 1px !important
|
20
|
+
.m-l-#{$val}
|
21
|
+
margin-left: $val * 1px !important
|
22
|
+
.m-h-#{$val}
|
23
|
+
margin-left: $val * 1px !important
|
24
|
+
margin-right: $val * 1px !important
|
25
|
+
.m-v-#{$val}
|
26
|
+
margin-top: $val * 1px !important
|
27
|
+
margin-bottom: $val * 1px !important
|
28
|
+
@if $val > 0
|
29
|
+
.p-t-#{$val}
|
30
|
+
padding-top: $val * 1px !important
|
31
|
+
.p-b-#{$val}
|
32
|
+
padding-bottom: $val * 1px !important
|
33
|
+
.p-r-#{$val}
|
34
|
+
padding-right: $val * 1px !important
|
35
|
+
.p-l-#{$val}
|
36
|
+
padding-left: $val * 1px !important
|
37
|
+
.p-h-#{$val}
|
38
|
+
padding-left: $val * 1px !important
|
39
|
+
padding-right: $val * 1px !important
|
40
|
+
.p-v-#{$val}
|
41
|
+
padding-top: $val * 1px !important
|
42
|
+
padding-bottom: $val * 1px !important
|
9
43
|
|
44
|
+
// Variables
|
45
|
+
$step: 5 !default
|
46
|
+
$minValue: 0 !default
|
47
|
+
$maxValue: 40 !default
|
48
|
+
$values: null !default
|
49
|
+
|
10
50
|
// Disabling classes
|
11
51
|
.n-m
|
12
52
|
margin: 0 !important
|
@@ -56,42 +96,13 @@ $maxValue: 40 !default
|
|
56
96
|
border-bottom: none !important
|
57
97
|
.n-b-l
|
58
98
|
border-left: none !important
|
99
|
+
|
100
|
+
@if $values == null
|
101
|
+
@for $i from $minValue through ceil($maxValue/$step)
|
102
|
+
$val: $step * $i
|
103
|
+
@mixin classes($val)
|
104
|
+
@else
|
105
|
+
@each $val in $values
|
106
|
+
@mixin classes($val)
|
59
107
|
|
60
|
-
|
61
|
-
$val: $step * $i
|
62
|
-
// Four way classes
|
63
|
-
.m-#{$val}
|
64
|
-
margin: $val * 1px !important
|
65
|
-
@if $val >= 0
|
66
|
-
.p-#{$val}
|
67
|
-
padding: $val * 1px !important
|
68
|
-
// One way classes
|
69
|
-
.m-t-#{$val}
|
70
|
-
margin-top: $val * 1px !important
|
71
|
-
.m-r-#{$val}
|
72
|
-
margin-right: $val * 1px !important
|
73
|
-
.m-b-#{$val}
|
74
|
-
margin-bottom: $val * 1px !important
|
75
|
-
.m-l-#{$val}
|
76
|
-
margin-left: $val * 1px !important
|
77
|
-
.m-h-#{$val}
|
78
|
-
margin-left: $val * 1px !important
|
79
|
-
margin-right: $val * 1px !important
|
80
|
-
.m-v-#{$val}
|
81
|
-
margin-top: $val * 1px !important
|
82
|
-
margin-bottom: $val * 1px !important
|
83
|
-
@if $val >= 0
|
84
|
-
.p-t-#{$val}
|
85
|
-
padding-top: $val * 1px !important
|
86
|
-
.p-b-#{$val}
|
87
|
-
padding-bottom: $val * 1px !important
|
88
|
-
.p-r-#{$val}
|
89
|
-
padding-right: $val * 1px !important
|
90
|
-
.p-l-#{$val}
|
91
|
-
padding-left: $val * 1px !important
|
92
|
-
.p-h-#{$val}
|
93
|
-
padding-left: $val * 1px !important
|
94
|
-
padding-right: $val * 1px !important
|
95
|
-
.p-v-#{$val}
|
96
|
-
padding-top: $val * 1px !important
|
97
|
-
padding-bottom: $val * 1px !important
|
108
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: boxmodel-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Szymon Szeliga
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-05-
|
12
|
+
date: 2014-05-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|