ionica 0.0.2 → 0.3.0

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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 96720b8149d55212b3032c7e17b8f71b3f1f2dcd
4
+ data.tar.gz: 7175b80a092212837dec063b298f05d1321e075b
5
+ SHA512:
6
+ metadata.gz: c96f33733c826b46bd5cfe6d8734fd702249e9c3f408d299d451e370a5617b005d12f7320578b7058d2608efa384b65756e725336180767b85a3b003c98fdd17
7
+ data.tar.gz: 44509c7f8a52eab9b15af2c35f35ff55101034f05864310490a06fe21040886eaefef1798809fc4481f6aa68301223ffb56493bf95a82c7e9431d0a4e18be865
@@ -1,4 +1,6 @@
1
1
  $DEFAULT_RESOLUTION: 768
2
+ $DEFAULT_IDENTIFIER: "amplify-ionica-grid-default-identifier"
3
+ $DEFAULT_CLASSNAME: "amplify-ionica-grid-default-classname"
2
4
 
3
5
  @mixin grid-column-styles($transition_duration)
4
6
  transition: transform, $transition_duration
@@ -28,7 +30,7 @@ $DEFAULT_RESOLUTION: 768
28
30
  .#{$class_name}-#{$i}
29
31
  @include column($grid, $i)
30
32
 
31
- @function grid($list, $breakpoints: 767, $padding: 0, $transition_duration: 500ms, $class_name: "amplify-ionica-grid-default-classname")
33
+ @function grid($list, $breakpoints: 767, $padding: 0, $transition_duration: 500ms, $class_name: $DEFAULT_CLASSNAME)
32
34
  $breakpoints: parse-breakpoints($breakpoints)
33
35
  $total_grid_weight: get-sum-of-column-weights($list)
34
36
  $num_core_columns: get-num-core-columns($list)
@@ -47,12 +49,13 @@ $DEFAULT_RESOLUTION: 768
47
49
 
48
50
  $column_weight: get-column-weight($column_param)
49
51
  $column_padding: $padding/100
52
+ $column_identifier: get-column-identifier($column_param)
50
53
  @if $index == 1
51
54
  $column_padding: 0
52
- $to_return: map-merge($to_return, ($index: (weight: $column_weight, offset: $offset + $column_padding)))
55
+ $to_return: map-merge($to_return, ($index: (weight: $column_weight, offset: $offset + $column_padding, identifier: $column_identifier)))
53
56
 
54
57
  @if is-core-column-param($column_param) or $num_core_columns == 0
55
- $core_columns: map-merge($core_columns, ($index: (weight: $column_weight)))
58
+ $core_columns: map-merge($core_columns, ($index: (weight: $column_weight, identifier: $column_identifier)))
56
59
  $index: $index + 1
57
60
  $offset: $offset + $column_weight + $column_padding
58
61
 
@@ -137,6 +140,12 @@ $DEFAULT_RESOLUTION: 768
137
140
  @if type-of($column_param) == number
138
141
  @return $column_param
139
142
 
143
+ @function get-column-identifier($column_param)
144
+ @if type-of($column_param) == list
145
+ @if length($column_param) > 2 and type-of(nth($column_param, 3)) == string
146
+ @return nth($column_param, 3)
147
+ @return $DEFAULT_IDENTIFIER
148
+
140
149
  @function is-core-column-param($column_param)
141
150
  @if type-of($column_param) == list
142
151
  @return nth($column_param,2) == true
@@ -244,11 +253,14 @@ $DEFAULT_RESOLUTION: 768
244
253
  $total_core_weight: map-get($grid, total_core_column_weight)
245
254
  $total_weight: map-get($grid, total_grid_weight)
246
255
  $padding: map-get($grid, padding)
247
- @each $index, $weight in $core_columns
248
- $weight: map-get($weight, weight)
256
+ @each $index, $params in $core_columns
257
+ $weight: map-get($params, weight)
258
+ $identifier: map-get($params, identifier)
259
+ @if $identifier == $DEFAULT_IDENTIFIER
260
+ $identifier: ".#{$class_name}-#{$index}"
249
261
  $this_column_in_percentages: ($weight / $total_core_weight) * 100%
250
262
  $x_position: $this_column_in_percentages / ($this_column_in_percentages / $shift_distance)
251
- & ~ .#{$class_name}-#{$index}
263
+ & ~ #{$identifier}
252
264
  @if $direction == "right"
253
265
  transform: translate3d($x_position + ($padding * ($total_core_weight / $total_weight) / $weight * 1%), 0, 0)
254
266
  @if $direction == "left"
@@ -1,4 +1,4 @@
1
1
  module Ionica
2
- VERSION = '0.0.2'
2
+ VERSION = '0.3.0'
3
3
  end
4
4
 
metadata CHANGED
@@ -1,49 +1,44 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ionica
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
5
- prerelease:
4
+ version: 0.3.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Tomislav Pesut
9
8
  - Anna Andresian
10
- autorequire:
9
+ autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2014-11-18 00:00:00.000000000 Z
12
+ date: 2014-12-02 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: railties
17
- requirement: !ruby/object:Gem::Requirement
18
- none: false
16
+ version_requirements: !ruby/object:Gem::Requirement
19
17
  requirements:
20
- - - ! '>='
18
+ - - '>='
21
19
  - !ruby/object:Gem::Version
22
20
  version: '0'
23
- type: :runtime
24
- prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- none: false
21
+ requirement: !ruby/object:Gem::Requirement
27
22
  requirements:
28
- - - ! '>='
23
+ - - '>='
29
24
  - !ruby/object:Gem::Version
30
25
  version: '0'
26
+ prerelease: false
27
+ type: :runtime
31
28
  - !ruby/object:Gem::Dependency
32
29
  name: sass
33
- requirement: !ruby/object:Gem::Requirement
34
- none: false
30
+ version_requirements: !ruby/object:Gem::Requirement
35
31
  requirements:
36
32
  - - ~>
37
33
  - !ruby/object:Gem::Version
38
34
  version: 3.4.5
39
- type: :runtime
40
- prerelease: false
41
- version_requirements: !ruby/object:Gem::Requirement
42
- none: false
35
+ requirement: !ruby/object:Gem::Requirement
43
36
  requirements:
44
37
  - - ~>
45
38
  - !ruby/object:Gem::Version
46
39
  version: 3.4.5
40
+ prerelease: false
41
+ type: :runtime
47
42
  description: A gem that provides a lightweight responsive grid
48
43
  email:
49
44
  - tpesut@amplify.com
@@ -52,35 +47,34 @@ executables: []
52
47
  extensions: []
53
48
  extra_rdoc_files: []
54
49
  files:
55
- - lib/ionica/version.rb
56
50
  - lib/ionica.rb
51
+ - lib/ionica/version.rb
57
52
  - app/assets/stylesheets/ionica.sass
58
53
  - LICENSE
59
54
  - README.md
60
55
  homepage: http://rubygems.org/gems/ionica
61
56
  licenses:
62
57
  - MIT
63
- post_install_message:
58
+ metadata: {}
59
+ post_install_message:
64
60
  rdoc_options: []
65
61
  require_paths:
66
62
  - lib
67
63
  - app
68
64
  required_ruby_version: !ruby/object:Gem::Requirement
69
- none: false
70
65
  requirements:
71
- - - ! '>='
66
+ - - '>='
72
67
  - !ruby/object:Gem::Version
73
68
  version: '0'
74
69
  required_rubygems_version: !ruby/object:Gem::Requirement
75
- none: false
76
70
  requirements:
77
- - - ! '>='
71
+ - - '>='
78
72
  - !ruby/object:Gem::Version
79
73
  version: '0'
80
74
  requirements: []
81
- rubyforge_project:
82
- rubygems_version: 1.8.24
83
- signing_key:
84
- specification_version: 3
75
+ rubyforge_project:
76
+ rubygems_version: 2.1.9
77
+ signing_key:
78
+ specification_version: 4
85
79
  summary: A gem that provides a lightweight responsive grid
86
80
  test_files: []