halvsies 0.0.1

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.
@@ -0,0 +1 @@
1
+ Halvsies is for making split divs with information maintained on both sides.
@@ -0,0 +1 @@
1
+ Compass::Frameworks.register("halvsies", :path => "#{File.dirname(__FILE__)}/..")
@@ -0,0 +1,103 @@
1
+ @mixin side( $FLOAT ) {
2
+ position: relative;
3
+ width: 50%;
4
+ height: auto;
5
+ float: $FLOAT;
6
+ }
7
+ @mixin no-side() {
8
+ float: none;
9
+ width: 100%;
10
+ }
11
+
12
+
13
+ // This simple mixin is given to a div to split it in half.
14
+ // When there isn't enough room to display side-by-side,
15
+ // then it reverts to above and below
16
+
17
+ // $WIDTH: The width of the div - %, px
18
+ // $MIN_WIDTH: Point at which the display is over-under
19
+ @mixin halvsies( $WIDTH, $MIN_WIDTH ) {
20
+ display: inline-block;
21
+ width: $WIDTH;
22
+ height: auto;
23
+ .left {
24
+ @include side( left );
25
+ }
26
+ .right {
27
+ @include side( right );
28
+ }
29
+ @media screen and ( max-width: $MIN_WIDTH ) {
30
+ display: block;
31
+ width: auto;
32
+ .left {
33
+ @include no-side();
34
+ }
35
+ .right {
36
+ @include no-side();
37
+ }
38
+ }
39
+ }
40
+
41
+ // Create a div with class halvsies. Within halvsies, create two more divs
42
+ // with class left and class right, respectfully.
43
+
44
+ // # HTML
45
+
46
+ // <div class='halvsies'>
47
+ // <div class='left'>
48
+ // # left side content here
49
+ // </div>
50
+ // <div class='right'>
51
+ // # right side content here
52
+ // </div>
53
+ // </div>
54
+
55
+ // # SCSS
56
+
57
+ // $WIDTH: 100%;
58
+ // $MIN_WIDTH: 400px;
59
+
60
+ // .halvsies {
61
+ // @include halvsies( $WIDTH, $MIN_WIDTH );
62
+ // }
63
+
64
+ // You can even nest halvsies inside other halvsies.
65
+ // For best results when nesting, in the stylesheet make sure to set the
66
+ // $MAX_WIDTH to 100% for all nested halvsies.
67
+
68
+ // # HTML
69
+
70
+ // <div class='halvsies'; id='one'>
71
+ // <div class='left'>
72
+ // <div class='halvsies'; id='two'
73
+ // <div class='left'>
74
+ // # nested left content here
75
+ // </div>
76
+ // <div class='right'>
77
+ // # nested right content here
78
+ // </div>
79
+ // </div>
80
+ // <div class='right'>
81
+ // # right side content here
82
+ // </div>
83
+ // </div>
84
+
85
+ // # SCSS
86
+
87
+ // #one {
88
+ // .left {
89
+ // background: green;
90
+ // }
91
+ // .right {
92
+ // background: blue;
93
+ // }
94
+ // #two {
95
+ // @include halvsies( $WIDTH, $MIN_WIDTH )
96
+ // .left {
97
+ // background: orange;
98
+ // }
99
+ // .right {
100
+ // background: yellow;
101
+ // }
102
+ // }
103
+ // }
@@ -0,0 +1,16 @@
1
+ description "Halvsies half-page/half-div mixin."
2
+
3
+ stylesheet 'halvsies.scss', :media => 'screen, projection'
4
+
5
+ html 'welcome.html.haml', :erb => true
6
+ file 'README'
7
+
8
+ discover: all
9
+
10
+ help %Q{
11
+ See the _halvsies.scss file for an example on how to use halvsies.
12
+ }
13
+
14
+ welcome_message %Q{
15
+ Thanks for using halvsies! The most simple split page mixin.
16
+ }
@@ -0,0 +1,4 @@
1
+ // This is where you put the contents of the main stylesheet for the user's project.
2
+ // It should import your sass stylesheets and demonstrate how to use them.
3
+
4
+ @import "/stylesheets/halvsies";
metadata ADDED
@@ -0,0 +1,65 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: halvsies
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Taylor Stackpole
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-06-23 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: compass
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0.11'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0.11'
30
+ description: a half-page/half-div mixin.
31
+ email: tay.stack@gmail.com
32
+ executables: []
33
+ extensions: []
34
+ extra_rdoc_files: []
35
+ files:
36
+ - README.mkdn
37
+ - lib/halvsies.rb
38
+ - stylesheets/_halvsies.scss
39
+ - templates/project/manifest.rb
40
+ - templates/project/screen.scss
41
+ homepage:
42
+ licenses: []
43
+ post_install_message:
44
+ rdoc_options: []
45
+ require_paths:
46
+ - lib
47
+ required_ruby_version: !ruby/object:Gem::Requirement
48
+ none: false
49
+ requirements:
50
+ - - ! '>='
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
53
+ required_rubygems_version: !ruby/object:Gem::Requirement
54
+ none: false
55
+ requirements:
56
+ - - ! '>='
57
+ - !ruby/object:Gem::Version
58
+ version: '0'
59
+ requirements: []
60
+ rubyforge_project:
61
+ rubygems_version: 1.8.23
62
+ signing_key:
63
+ specification_version: 3
64
+ summary: scss half-page/half-div
65
+ test_files: []