droidcss 1.1.8 → 1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4d191583d5ee95c37c5b6f65a58b2867ad914d5e
4
- data.tar.gz: d2d4a395dc2b0f49e081a096a6966b4434711ca4
3
+ metadata.gz: 3f968aa1227f8a62d6fb35a66a95c6c294e95dfd
4
+ data.tar.gz: 3d3b8b7be27ec601e6df02daf033963d8bf2ac07
5
5
  SHA512:
6
- metadata.gz: fe5023109cbafdc05ef2734fb0f04bae5b22367f5e385cc35ff3ce77bb8e0456983d1d44b951c8464748a16ea260cc09bfd30a64180af3a555e00fd190c3b5ba
7
- data.tar.gz: 60cec4db0c38d5daf9df2c4658878e19698af9eec02bc1566f8777408e6c1584465268075fb0289276bc183823b8fb1edd470865d607a91c68c9c819e04b07ed
6
+ metadata.gz: b4ebc53124afc86982f862634c2299256532f454e3e6fa6a4fab172366e76a19ee76d81e68976536d03fa22badd1a0228f0422945a789b03aa112a5f85dcc6f0
7
+ data.tar.gz: 9d8f7cf097864e073681e85626dbbd69900b38b04824884b668845a3c521546670827d603a4a9c8dac08b354ed6977e44be47adb878b3bff8a7548804552905a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ### 1.2 (23 January 2014)
2
+ * Grids now support margins/paddings in px
3
+
1
4
  ### 1.1.5 (11 January 2014)
2
5
  * Added mobile prefixes & suffixes = 0
3
6
 
@@ -1,3 +1,3 @@
1
1
  module DroidCss
2
- VERSION = "1.1.8"
2
+ VERSION = "1.2"
3
3
  end
@@ -1,3 +1,19 @@
1
+ @function contentWidth($num) {
2
+ @if (unit($gutterWidth) == "%") {
3
+ @return 100% * ($num/$columnsCount) - 2 * $gutterWidth;
4
+ } @else {
5
+ @return 100% * ($num/$columnsCount);
6
+ }
7
+ }
8
+
9
+ @function contentWidthOffset($num) {
10
+ @if (unit($gutterWidth) == "%") {
11
+ @return 100% * ($num/$columnsCount) + $gutterWidth;
12
+ } @else {
13
+ @return 100% * ($num/$columnsCount);
14
+ }
15
+ }
16
+
1
17
  .grid-container {
2
18
  max-width: $gridWidth;
3
19
  margin-left: auto;
@@ -17,8 +33,8 @@
17
33
  }
18
34
 
19
35
  .row {
20
- #{$gutterType}-right: -$gutterWidth;
21
- #{$gutterType}-left: -$gutterWidth;
36
+ margin-right: -$gutterWidth;
37
+ margin-left: -$gutterWidth;
22
38
  @include clearfix;
23
39
  }
24
40
 
@@ -46,8 +62,8 @@
46
62
 
47
63
  @for $i from 1 through $columnsCount {
48
64
  $num: $i;
49
- $contentWidth: 100% * ($num/$columnsCount) - 2 * $gutterWidth;
50
- $contentWidthOffset: 100% * ($num/$columnsCount) + $gutterWidth;
65
+ $contentWidth: contentWidth($num);
66
+ $contentWidthOffset: contentWidthOffset($num);
51
67
  .grid-#{$num} { width: $contentWidth; }
52
68
  .prefix-#{$num} { #{$gutterType}-left: $contentWidthOffset; }
53
69
  .suffix-#{$num} { #{$gutterType}-right: $contentWidthOffset; }
@@ -86,8 +102,8 @@
86
102
 
87
103
  @for $i from 1 through $columnsCount {
88
104
  $num: $i;
89
- $contentWidth: 100% * ($num/$columnsCount) - 2 * $gutterWidth;
90
- $contentWidthOffset: 100% * ($num/$columnsCount) + $gutterWidth;
105
+ $contentWidth: contentWidth($num);
106
+ $contentWidthOffset: contentWidthOffset($num);
91
107
  .grid-tablet-#{$num} { width: $contentWidth; }
92
108
  .prefix-tablet-#{$num} { #{$gutterTypeTabletOffset}-left: $contentWidthOffset; }
93
109
  .suffix-tablet-#{$num} { #{$gutterTypeTabletOffset}-right: $contentWidthOffset; }
@@ -115,8 +131,8 @@
115
131
 
116
132
  @for $i from 1 through $columnsCount {
117
133
  $num: $i;
118
- $contentWidth: 100% * ($num/$columnsCount) - 2 * $gutterWidth;
119
- $contentWidthOffset: 100% * ($num/$columnsCount) + $gutterWidth;
134
+ $contentWidth: contentWidth($num);
135
+ $contentWidthOffset: contentWidthOffset($num);
120
136
  .grid-mobile-#{$num} { width: $contentWidth; }
121
137
  .prefix-mobile-#{$num} { #{$gutterTypeMobileOffset}-left: $contentWidthOffset; }
122
138
  .suffix-mobile-#{$num} { #{$gutterTypeMobileOffset}-right: $contentWidthOffset; }
@@ -10,8 +10,23 @@ $columnsCount: 12 !default;
10
10
 
11
11
  // Gutters
12
12
  $gutterWidth: 1.04166666666% !default;
13
- $gutterType: margin !default;
14
- $gutterTypeTablet: padding !default;
15
- $gutterTypeTabletOffset: margin !default;
16
- $gutterTypeMobile: padding !default;
17
- $gutterTypeMobileOffset: margin !default;
13
+
14
+ $gutterType: null !default;
15
+ $gutterTypeTablet: null !default;
16
+ $gutterTypeTabletOffset: null !default;
17
+ $gutterTypeMobile: null !default;
18
+ $gutterTypeMobileOffset: null !default;
19
+
20
+ @if (unit($gutterWidth) == "%") {
21
+ $gutterType: margin !default;
22
+ $gutterTypeTablet: padding !default;
23
+ $gutterTypeTabletOffset: margin !default;
24
+ $gutterTypeMobile: padding !default;
25
+ $gutterTypeMobileOffset: margin !default;
26
+ } @else {
27
+ $gutterType: padding !default;
28
+ $gutterTypeTablet: padding !default;
29
+ $gutterTypeTabletOffset: margin !default;
30
+ $gutterTypeMobile: padding !default;
31
+ $gutterTypeMobileOffset: margin !default;
32
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: droidcss
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.8
4
+ version: '1.2'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilya Gorenburg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-11 00:00:00.000000000 Z
11
+ date: 2014-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass
@@ -78,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
78
78
  version: '0'
79
79
  requirements: []
80
80
  rubyforge_project:
81
- rubygems_version: 2.0.3
81
+ rubygems_version: 2.2.1
82
82
  signing_key:
83
83
  specification_version: 4
84
84
  summary: Small responsive framework