grids-overlay 0.1.0 → 0.2.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.
data/lib/grids-overlay.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'spaceless'
|
2
2
|
require 'grids-overlay/version'
|
3
|
+
require 'grids-overlay/importer'
|
3
4
|
|
4
5
|
module Grids
|
5
6
|
module Overlay
|
@@ -14,5 +15,7 @@ module Grids
|
|
14
15
|
class Engine < ::Rails::Engine
|
15
16
|
end
|
16
17
|
end
|
18
|
+
|
19
|
+
Sass.load_paths << Importer.new('.')
|
17
20
|
end
|
18
21
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'grids'
|
2
|
+
module Grids
|
3
|
+
module Overlay
|
4
|
+
class Importer < Grids::Importer
|
5
|
+
private
|
6
|
+
def extension_regex
|
7
|
+
/\.overlay$/
|
8
|
+
end
|
9
|
+
|
10
|
+
def template_path
|
11
|
+
File.join(File.expand_path('../', __FILE__), 'overlay.scss.erb')
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
@import 'spaceless';
|
2
|
+
|
3
|
+
$overlay-full-page-width: <%= name %>-full-page-width()!default;
|
4
|
+
|
5
|
+
#<%= name %>-grid-overlay {
|
6
|
+
width: $overlay-full-page-width;
|
7
|
+
position: absolute;
|
8
|
+
top: 0;
|
9
|
+
left: 0;
|
10
|
+
overflow: hidden;
|
11
|
+
|
12
|
+
&%centered-grid {
|
13
|
+
left: 50%;
|
14
|
+
margin-left: -$overlay-full-page-width / 2;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
18
|
+
.vert-container {
|
19
|
+
@include spaceless;
|
20
|
+
margin-right: <%= name %>-gutter-x(1);
|
21
|
+
}
|
22
|
+
|
23
|
+
.vert{
|
24
|
+
display: inline-block;
|
25
|
+
width: <%= name %>-modules-x(1);
|
26
|
+
box-sizing: border-box;
|
27
|
+
-moz-box-sizing: border-box;
|
28
|
+
background: rgba(0, 0, 255, 0.1);
|
29
|
+
margin-right: <%= name %>-gutter-x();
|
30
|
+
}
|
31
|
+
|
32
|
+
.horiz{
|
33
|
+
height: <%= name %>-y();
|
34
|
+
box-sizing: border-box;
|
35
|
+
-moz-box-sizing: border-box;
|
36
|
+
background: rgba(0, 0, 255, 0.1);
|
37
|
+
margin-bottom: <%= name %>-gutter-y();
|
38
|
+
}
|
39
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grids-overlay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -57,9 +57,10 @@ files:
|
|
57
57
|
- Rakefile
|
58
58
|
- app/assets/javascripts/grids/overlay.js.coffee
|
59
59
|
- app/assets/javascripts/grids/overlay/hashgrid.js
|
60
|
-
- app/assets/stylesheets/grids/overlay.css.scss
|
61
60
|
- grids-overlay.gemspec
|
62
61
|
- lib/grids-overlay.rb
|
62
|
+
- lib/grids-overlay/importer.rb
|
63
|
+
- lib/grids-overlay/overlay.scss.erb
|
63
64
|
- lib/grids-overlay/version.rb
|
64
65
|
homepage: https://github.com/whitescape/grids-overlay
|
65
66
|
licenses: []
|
@@ -1,40 +0,0 @@
|
|
1
|
-
@import 'spaceless';
|
2
|
-
|
3
|
-
@mixin grids-overlay($name) {
|
4
|
-
##{$name}-grid-overlay {
|
5
|
-
width: $overlay-full-page-width; // width: full-page-width($name);
|
6
|
-
position: absolute;
|
7
|
-
top: 0;
|
8
|
-
left: 0;
|
9
|
-
overflow: hidden;
|
10
|
-
|
11
|
-
&%centered-grid {
|
12
|
-
left: 50%;
|
13
|
-
margin-left: -$overlay-full-page-width / 2;
|
14
|
-
}
|
15
|
-
|
16
|
-
@content;
|
17
|
-
}
|
18
|
-
|
19
|
-
.vert-container {
|
20
|
-
@include spaceless;
|
21
|
-
margin-right: $overlay-gutter-x; // margin-right: gutter-x($name, 1);
|
22
|
-
}
|
23
|
-
|
24
|
-
.vert{
|
25
|
-
display: inline-block;
|
26
|
-
width: $overlay-modules-x; // width: modules-x($name, 1);
|
27
|
-
box-sizing: border-box;
|
28
|
-
-moz-box-sizing: border-box;
|
29
|
-
background: rgba(0, 0, 255, 0.1);
|
30
|
-
margin-right: $overlay-gutter-x;
|
31
|
-
}
|
32
|
-
|
33
|
-
.horiz{
|
34
|
-
height: $overlay-y; // height: y($name, 1);
|
35
|
-
box-sizing: border-box;
|
36
|
-
-moz-box-sizing: border-box;
|
37
|
-
background: rgba(0, 0, 255, 0.1);
|
38
|
-
margin-bottom: $overlay-gutter-y; // margin-bottom: gutter-y($name, 1);
|
39
|
-
}
|
40
|
-
}
|