r_kit 1.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/r_kit/core/loader/load_path.rb +6 -0
- data/lib/r_kit/grid/lib/assets/stylesheets/r_kit/base/grid.scss +4 -4
- data/lib/r_kit/grid/lib/assets/stylesheets/r_kit/base/grid_flex.scss +2 -2
- data/lib/r_kit/grid/lib/assets/stylesheets/r_kit/grid.scss +0 -60
- data/lib/r_kit/grid/lib/assets/stylesheets/r_kit/variables/grid.scss +1 -1
- data/lib/r_kit/grid/sass_extend.rb +3 -3
- data/lib/r_kit/utility/symbol_extend.rb +8 -1
- data/lib/r_kit/version.rb +1 -1
- metadata +2 -3
- data/lib/r_kit/grid/lib/assets/stylesheets/r_kit/mixins/grid.scss +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b01e526f53b26de981b624763cf19b06146a6f09
|
4
|
+
data.tar.gz: 46c1a3b5a46417db6b4563a0a5cdf257fd904303
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d223ae567ab99e60608b6c877ef5d473756100edae156a113bed054765a93675d8083c0a4e5d5f277cec086165273755047dfa176e0e8ba581cad0e2e43fa975
|
7
|
+
data.tar.gz: 5aed1fab313013d60ee4a31afdddce9aff87ed864f4cd32a250c09749fbec67f6b7d14e64e8fbfe951479b1a048b73da4e19e75bab273fcc0b1833f53f814d31
|
@@ -31,6 +31,12 @@ class LoadPath
|
|
31
31
|
|
32
32
|
def load_path!
|
33
33
|
require fullpath
|
34
|
+
rescue NameError => e
|
35
|
+
warn %Q{
|
36
|
+
WARNING - An error occur during `RKit' initialization
|
37
|
+
The file #{ fullpath } could not be loaded.
|
38
|
+
Ruby stack says: #{ e.message }.
|
39
|
+
}
|
34
40
|
end
|
35
41
|
|
36
42
|
def load!
|
@@ -1,6 +1,6 @@
|
|
1
1
|
.grid {
|
2
2
|
margin: auto;
|
3
|
-
width:
|
3
|
+
width: grid-base-width() * 96;
|
4
4
|
|
5
5
|
display: flex;
|
6
6
|
flex-wrap: wrap;
|
@@ -8,8 +8,8 @@
|
|
8
8
|
|
9
9
|
@for $col_size from 1 through 12 {
|
10
10
|
.grid-col-#{ $col_size } {
|
11
|
-
padding: 0
|
12
|
-
width:
|
11
|
+
padding: 0 grid-base-width();
|
12
|
+
width: grid-base-width() * 8 * $col_size;
|
13
13
|
box-sizing: border-box;
|
14
14
|
flex-shrink: 0;
|
15
15
|
}
|
@@ -17,7 +17,7 @@
|
|
17
17
|
@for $off_size from 1 through 12-$col_size {
|
18
18
|
.grid-col-#{ $col_size }-off-#{ $off_size } {
|
19
19
|
@extend .grid-col-#{ $col_size };
|
20
|
-
margin-left:
|
20
|
+
margin-left: grid-base-width() * (8 * $off_size + 1);
|
21
21
|
}
|
22
22
|
}
|
23
23
|
}
|
@@ -1,12 +1,12 @@
|
|
1
1
|
.grid.grid-flex{
|
2
2
|
margin: 0;
|
3
3
|
width: auto;
|
4
|
-
min-width:
|
4
|
+
min-width: grid-base-width() * 96;
|
5
5
|
|
6
6
|
@for $col_size from 1 through 12 {
|
7
7
|
.grid-col-#{ $col_size } {
|
8
8
|
width: $col_size * 100 / 12#{'%'};
|
9
|
-
min-width:
|
9
|
+
min-width: grid-base-width() * 8 * $col_size;
|
10
10
|
}
|
11
11
|
|
12
12
|
@for $off_size from 1 through 12-$col_size {
|
@@ -2,63 +2,3 @@
|
|
2
2
|
@import "base/grid";
|
3
3
|
@import "base/grid_flex";
|
4
4
|
@import "base/grid_items";
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
// reorganize assets in 'css' for basic grid css, then mixin, variables ... (like css base folders)
|
9
|
-
// create a mixin 'col_prop' to add some css for all col and avoid '[class*=col-]' selector
|
10
|
-
|
11
|
-
// add the folowing properties at row level then grid level (for the grid extend to encapsulate row extend)
|
12
|
-
/*
|
13
|
-
grid
|
14
|
-
grid-row
|
15
|
-
grid-col-x
|
16
|
-
|
17
|
-
grid-items-center
|
18
|
-
grid-items-top
|
19
|
-
(default is baseline)
|
20
|
-
|
21
|
-
grid-center (handle align)@
|
22
|
-
(default is left)
|
23
|
-
(this is the flex, not the text-align)
|
24
|
-
*/
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
@mixin col($base_width, $col_size){
|
34
|
-
margin: 0 $base_width;
|
35
|
-
width: $base_width * 8 * $col_size - 2 * $base_width;
|
36
|
-
flex-shrink: 0;
|
37
|
-
}
|
38
|
-
|
39
|
-
@mixin off($base_width, $off_size){
|
40
|
-
margin-left: $base_width * 8 * $off_size + 1 * $base_width;
|
41
|
-
}
|
42
|
-
|
43
|
-
@mixin grid($base_width: 12px){
|
44
|
-
|
45
|
-
.container{
|
46
|
-
margin: auto;
|
47
|
-
width: $base_width * 8 * 12 - 2 * $base_width;
|
48
|
-
|
49
|
-
.row{
|
50
|
-
display: flex;
|
51
|
-
flex-wrap: wrap;
|
52
|
-
align-items: baseline;
|
53
|
-
|
54
|
-
margin: 0 -#{$base_width};
|
55
|
-
|
56
|
-
@for $i from 1 through 12 {
|
57
|
-
.col-#{$i} { @include col($base_width, $i); }
|
58
|
-
[class*=col-].off-#{$i} { @include off($base_width, $i); }
|
59
|
-
}
|
60
|
-
}
|
61
|
-
}
|
62
|
-
}
|
63
|
-
|
64
|
-
@include grid();
|
@@ -1 +1 @@
|
|
1
|
-
$
|
1
|
+
$grid-base-width: grid-base-width();
|
@@ -1,13 +1,13 @@
|
|
1
1
|
module Sass::Script::Functions
|
2
2
|
|
3
|
-
|
3
|
+
grid_base_width = if RKit::Grid.config.full_width
|
4
4
|
value, unit = RKit::Grid.config.full_width
|
5
5
|
Sass::Script::Number.new value / 94, unit
|
6
6
|
else
|
7
7
|
Sass::Script::Number.new *RKit::Grid.config.base_width
|
8
8
|
end
|
9
9
|
|
10
|
-
define_method '
|
11
|
-
|
10
|
+
define_method 'grid_base_width' do
|
11
|
+
grid_base_width
|
12
12
|
end
|
13
13
|
end
|
data/lib/r_kit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: r_kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Petrachi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Rails tools box
|
14
14
|
email:
|
@@ -101,7 +101,6 @@ files:
|
|
101
101
|
- lib/r_kit/grid/lib/assets/stylesheets/r_kit/base/grid_flex.scss
|
102
102
|
- lib/r_kit/grid/lib/assets/stylesheets/r_kit/base/grid_items.scss
|
103
103
|
- lib/r_kit/grid/lib/assets/stylesheets/r_kit/grid.scss
|
104
|
-
- lib/r_kit/grid/lib/assets/stylesheets/r_kit/mixins/grid.scss
|
105
104
|
- lib/r_kit/grid/lib/assets/stylesheets/r_kit/variables/grid.scss
|
106
105
|
- lib/r_kit/grid/sass_extend.rb
|
107
106
|
- lib/r_kit/override.rb
|
File without changes
|