breakpoint-slicer 0.1 → 1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 3d0bc9155f29e98a703c1fe58a74cf6bfce98006
4
- data.tar.gz: 799ddefb59a46becf3283007bf50e6b653e2779e
5
- SHA512:
6
- metadata.gz: db6c4c6467742193ded257ba01a543cdb62366bbe2333c2d2c10a2375cd7a642fcaf41b3de7f0cd11befdc4fa27462c37f4424acf8cde71059e40451c8de673b
7
- data.tar.gz: 7c560cb06402939b578ee4612a70a68a4c6d1aa7edd5eaca220ac2c5fef0a2440caaf6a4ba6f3803bd81b720b93f3b2c06e8980b9fe28813e12bba96d2c96710
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ZDUwYjJlZjYxMzA4N2IzMjFlZGI0NDUxZWQ3OGY3MWY5YTk2NjUwZA==
5
+ data.tar.gz: !binary |-
6
+ ZjM5ZGUzM2I5ODA5Yzk5OTA5OTIxMTgzNDM4OWU5MzY1MWJmMzFlMQ==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ MGEzOTI2NmMwZWEwMjZmZDczOWUzOWZiNjg0MGRhMjI0MjhmZGM1MTEyNGVk
10
+ NjJhOTQ1NmY4N2E5MjQ0NDdiOWQxNjczYWYwMzBmNTNhYjliMjFlMzNjZjU3
11
+ MjliMzJkODkyODMxODg0N2E0OGM0ZjRiM2U5ZTU1ZGE2OGRkMDM=
12
+ data.tar.gz: !binary |-
13
+ Y2ViZDNlM2Q5ZTgwNGMxZWRiMDVmMjRlOWZiZTgyNzkxYzdlNTE0MjYzYWJj
14
+ MjlkNmYzMDA1Mzc3ZWQ3MzMyYTc4NWRkZWZiODBlOGQ1NDU3YWI2NjlkYzU1
15
+ YzI5ZGE4YTA0YjRkZWUwZjBhNTcxYTE3ZWJlODNjYWU4MDBhMzk=
@@ -4,6 +4,6 @@ require 'breakpoint'
4
4
  Compass::Frameworks.register("breakpoint-slicer", :path => "#{File.dirname(__FILE__)}/..")
5
5
 
6
6
  module BreakpointSlicer
7
- VERSION = "0.1"
7
+ VERSION = "1.0"
8
8
  DATE = "2013-04-09"
9
9
  end
@@ -1,7 +1,6 @@
1
1
  // The dependency
2
2
  @import breakpoint
3
3
 
4
-
5
4
  // Default values
6
5
  @import breakpoint-slicer/variables
7
6
 
File without changes
@@ -4,95 +4,70 @@
4
4
  ////////////////////////////////////////////////
5
5
 
6
6
  // Wraps the content block provided with a media query
7
- // with min-width and max-width equal to the edges of a slice
7
+ // with min-width equal to the left edge of the left slice
8
+ // and max-width equal to the right edge of the right slice
8
9
  //
9
- // at($slice)
10
- // - $slice : <slice number> A number of a slice. Should be a positive integer.
11
- =at($slice)
12
-
13
- // Retrieving the left edge of the slice
14
- $context: left-bp-of-slice($slice)
15
-
16
- // Retrieving the right edge of the slice
17
- // unless the slice is the last one
18
- @if $slice < total-slices()
19
- $right: right-bp-of-slice($slice)
20
- $context: append($context, $right)
10
+ // between($slice-left, $slice-right, $no-query: false)
11
+ // - $slice-left : <slice number> A number of the left slice. Should be a positive integer.
12
+ // - $slice-right : <slice number> A number of the left slice. Should be a positive integer.
13
+ // - $no-query : [<.class>] A class to provide the no-query fallback (see Breakpoint docs).
14
+ =between($slice-left, $slice-right, $no-query: false)
21
15
 
22
- // Setting the breakpoint
23
- +breakpoint($context)
16
+ // If the slices provided are the first and the last one,
17
+ // the breakpoint becomes meaningless
18
+ @if ($slice-left == 1) and ($slice-right == total-slices())
19
+ //Thus, don't wrap the code block with a media query
24
20
  @content
25
21
 
22
+ @else
26
23
 
27
- // Wraps the content block provided with a media query
28
- // with min-width equal to the right edge of a slice
29
- //
30
- // from($slice)
31
- // - $slice : <slice number> A number of a slice. Should be a positive integer.
32
- =from($slice)
33
-
34
- // If the slice is the first one, the breakpoint becomes meaningless
35
- @if $slice == 1
36
- // Thus, don't wrap the code block with a media query
37
- @content
24
+ // Retrieving the left edge of the left slice
25
+ $context: left-bp-of-slice($slice-left)
38
26
 
39
- @else
40
- // Retrieving the left edge of the slice
41
- $context: left-bp-of-slice($slice)
27
+ // Retrieving the right edge of the slice
28
+ // unless the slice is the last one
29
+ @if $slice-right < total-slices()
30
+ $right: right-bp-of-slice($slice-right)
31
+ $context: append($context, $right)
42
32
 
43
33
  // Setting the breakpoint
44
- +breakpoint($context)
34
+ +breakpoint($context, $no-query)
45
35
  @content
46
36
 
47
37
 
48
38
  // Wraps the content block provided with a media query
49
- // with max-width equal to the right edge of a slice
39
+ // with min-width and max-width equal to the edges of a slice
50
40
  //
51
- // to($slice)
41
+ // at($slice, $no-query: false)
52
42
  // - $slice : <slice number> A number of a slice. Should be a positive integer.
53
- =to($slice)
43
+ // - $no-query : [<.class>] A class to provide the no-query fallback (see Breakpoint docs).
44
+ =at($slice, $no-query: false)
54
45
 
55
- // If the slice is the last one, the breakpoint becomes meaningless
56
- @if $slice == total-slices()
57
- // Thus, don't wrap the code block with a media query
46
+ +between($slice, $slice, $no-query)
58
47
  @content
59
48
 
60
- @else
61
- // Retrieving the right edge of the slice
62
- $right: right-bp-of-slice($slice)
63
- $context: max-width $right
64
-
65
- // Setting the breakpoint
66
- +breakpoint($context)
67
- @content
68
-
69
49
 
70
50
  // Wraps the content block provided with a media query
71
- // with min-width equal to the left edge of the left slice
72
- // and max-width equal to the right edge of the right slice
51
+ // with min-width equal to the right edge of a slice
73
52
  //
74
- // between($slice-left, $slice-right)
75
- // - $slice-left : <slice number> A number of the left slice. Should be a positive integer.
76
- // - $slice-right : <slice number> A number of the left slice. Should be a positive integer.
77
- =between($slice-left, $slice-right)
53
+ // from($slice, $no-query: false)
54
+ // - $slice : <slice number> A number of a slice. Should be a positive integer.
55
+ // - $no-query : [<.class>] A class to provide the no-query fallback (see Breakpoint docs).
56
+ =from($slice, $no-query: false)
78
57
 
79
- // If the slices provided are the first and the last one,
80
- // the breakpoint becomes meaningless
81
- @if ($slice-left == 1) and ($slice-right == total-slices())
82
- //Thus, don't wrap the code block with a media query
58
+ +between(1, $slice, $no-query)
83
59
  @content
84
60
 
85
- @else
86
61
 
87
- // Retrieving the left edge of the left slice
88
- $context: left-bp-of-slice($slice-left)
62
+ // Wraps the content block provided with a media query
63
+ // with max-width equal to the right edge of a slice
64
+ //
65
+ // to($slice, $no-query: false)
66
+ // - $slice : <slice number> A number of a slice. Should be a positive integer.
67
+ // - $no-query : [<.class>] A class to provide the no-query fallback (see Breakpoint docs).
68
+ =to($slice, $no-query: false)
69
+
70
+ +between($slice, total-slices(), $no-query)
71
+ @content
89
72
 
90
- // Retrieving the right edge of the slice
91
- // unless the slice is the last one
92
- @if $slice-right < total-slices()
93
- $right: right-bp-of-slice($slice-right)
94
- $context: append($context, $right)
95
73
 
96
- // Setting the breakpoint
97
- +breakpoint($context)
98
- @content
@@ -1 +1,2 @@
1
+ // The defaults
1
2
  $slicer-breakpoints: 0 400px 600px 800px 1010px !default
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: breakpoint-slicer
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: '1.0'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey 'lolmaus' Mikhaylov
@@ -14,42 +14,42 @@ dependencies:
14
14
  name: sass
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ! '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: 3.2.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ! '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: 3.2.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: compass
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ! '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: 0.12.2
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ! '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.12.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: breakpoint
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ! '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: 2.0.1
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ! '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: 2.0.1
55
55
  description: A very quick and efficient syntax for Breakpoint
@@ -61,12 +61,9 @@ extra_rdoc_files: []
61
61
  files:
62
62
  - lib/breakpoint-slicer.rb
63
63
  - stylesheets/breakpoint-slicer/_helper-functions.sass
64
- - stylesheets/breakpoint-slicer/_variables.sass
65
64
  - stylesheets/breakpoint-slicer/_mixins.sass
65
+ - stylesheets/breakpoint-slicer/_variables.sass
66
66
  - stylesheets/_breakpoint-slicer.sass
67
- - demo/config.rb
68
- - demo/test.html
69
- - demo/sass/screen.sass
70
67
  homepage: https://github.com/lolmaus/breakpoint-slicer
71
68
  licenses: []
72
69
  metadata: {}
@@ -76,17 +73,17 @@ require_paths:
76
73
  - lib
77
74
  required_ruby_version: !ruby/object:Gem::Requirement
78
75
  requirements:
79
- - - '>='
76
+ - - ! '>='
80
77
  - !ruby/object:Gem::Version
81
78
  version: '0'
82
79
  required_rubygems_version: !ruby/object:Gem::Requirement
83
80
  requirements:
84
- - - '>='
81
+ - - ! '>='
85
82
  - !ruby/object:Gem::Version
86
83
  version: '1.2'
87
84
  requirements: []
88
85
  rubyforge_project: singularitygs
89
- rubygems_version: 2.0.0.rc.2
86
+ rubygems_version: 2.0.3
90
87
  signing_key:
91
88
  specification_version: 4
92
89
  summary: Along with Respond To, Breakpoint Slicer is an alternative syntax for Breakpoint.
data/demo/config.rb DELETED
@@ -1,5 +0,0 @@
1
- require 'breakpoint'
2
- require 'singularitygs'
3
-
4
- css_dir = "css"
5
- sass_dir = "sass"
@@ -1,127 +0,0 @@
1
- @import breakpoint
2
- @import ../../stylesheets/breakpoint-slicer
3
-
4
- /////////////////////////////////////////
5
- // Showing the info
6
- /////////////////////////////////////////
7
-
8
- // Showing the breakpoints
9
- #info-1:after
10
- content: "$slicer-breakpoints: #{$slicer-breakpoints}"
11
-
12
- // Showing the number of slices
13
- #info-2:after
14
- @for $i from 1 through total-slices()
15
- +at($i)
16
- content: "This window currently fits #{$i} slices."
17
-
18
-
19
- /////////////////////////////////////////
20
- // Testing +at
21
- /////////////////////////////////////////
22
-
23
- #at
24
- +at(3)
25
- background-color: black
26
- color: white
27
-
28
-
29
- /////////////////////////////////////////
30
- // Testing +from
31
- /////////////////////////////////////////
32
-
33
- #from
34
- +from(3)
35
- background-color: black
36
- color: white
37
-
38
-
39
-
40
- /////////////////////////////////////////
41
- // Testing +to
42
- /////////////////////////////////////////
43
-
44
- #to
45
- +to(3)
46
- background-color: black
47
- color: white
48
-
49
-
50
- /////////////////////////////////////////
51
- // Testing +between
52
- /////////////////////////////////////////
53
-
54
- #between
55
- +between(2,4)
56
- background-color: black
57
- color: white
58
-
59
-
60
-
61
- /////////////////////////////////////////
62
- // Breakpoint Slicer with Singularity
63
- /////////////////////////////////////////
64
-
65
- // Importing Singularity
66
- @import compass
67
- @import singularitygs
68
-
69
- // Configuring Singularity with Breakpoint Slicer
70
- $grids: 1
71
- @for $i from 2 through total-slices()
72
- $grids: add-grid($i at bp($i))
73
-
74
- $gutters: 0.2
75
-
76
-
77
- // Enabling the grid background
78
- #singularity
79
- +background-grid
80
- +pie-clearfix
81
-
82
-
83
- // Spanning the column
84
- #singularity .column
85
-
86
- // Showing the text.
87
- span:after
88
- content: "This column is not spanned."
89
-
90
- // Cycling through slices
91
- @for $i from 2 through total-slices()
92
-
93
- // Setting a media query per slice
94
- +at($i)
95
-
96
- // Setting the position to be the last-but-one column
97
- $position: $i - 1
98
-
99
- // Spanning
100
- +grid-span(1, $position)
101
-
102
- // Showing the text.
103
- span:after
104
- content: "+at(#{$i})\A +grid-span(1, #{$position})"
105
-
106
-
107
-
108
- /////////////////////////////////////////
109
- // Styling
110
- /////////////////////////////////////////
111
- *
112
- +box-sizing(border-box)
113
-
114
- p
115
- margin-bottom: 1em
116
-
117
- h2
118
- margin-top: 2em
119
-
120
- .demo
121
- p, .column
122
- font-family: monospace
123
- border: 1px solid black
124
- background-color: lightgrey
125
- padding: 1em
126
-
127
-
data/demo/test.html DELETED
@@ -1,40 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Breakpoint Slicer test</title>
5
- <link rel=stylesheet href=css/screen.css>
6
- </head>
7
- <body>
8
-
9
- <h1>Breakpoint Slicer demo</h1>
10
-
11
- <p>Please play with browser window width.</p>
12
- <p id=info-1></p>
13
- <p id=info-2></p>
14
-
15
-
16
- <h2>Testing mixins</h2>
17
-
18
- <p>The default color of each paragraph is light grey.
19
- Breakpoint Slicer is used to change the color to black at certain window widths.</p>
20
-
21
- <section class=demo>
22
- <p id=at>+at(3)<br>&nbsp;&nbsp;background-color: black</p>
23
- <p id=from>+from(3)<br>&nbsp;&nbsp;background-color: black</p>
24
- <p id=to>+to(3)<br>&nbsp;&nbsp;background-color: black</p>
25
- <p id=between>+between(2, 4)<br>&nbsp;&nbsp;background-color: black</p>
26
- </section>
27
-
28
- <h2>Testing Breakpoint Slicer with Singularity</h2>
29
-
30
- <p>Breakpoint Slicer is used to set Singularity's breakpoints and to span the column.</p>
31
-
32
- <section class=demo>
33
- <div id=singularity>
34
- <div class=column><pre><span></span></pre></div>
35
- </div>
36
- </section>
37
-
38
-
39
- </body>
40
- </html>