breakpoint 2.0.7 → 2.2.0.alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +2 -0
- data/lib/breakpoint.rb +3 -35
- data/stylesheets/_breakpoint.scss +1 -1
- data/stylesheets/breakpoint/_context.scss +4 -4
- data/stylesheets/breakpoint/_parsers.scss +1 -1
- metadata +16 -11
data/README.markdown
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Breakpoint #
|
2
2
|
|
3
|
+
[![Build Status](https://travis-ci.org/Team-Sass/breakpoint.png)](https://travis-ci.org/Team-Sass/ breakpoint)
|
4
|
+
|
3
5
|
**Really Simple Media Queries with Sass**
|
4
6
|
|
5
7
|
Breakpoint makes writing media queries in Sass super simple. Create a variable using a simplified syntax based on most commonly used media queries, then call it using the `breakpoint` mixin. Breakpoint handles all of the heavy lifting, from writing the media query itself, to handling cross-browser compatibility issues, so you can focus on what's important: making sure your website looks its best.
|
data/lib/breakpoint.rb
CHANGED
@@ -3,38 +3,6 @@ require 'compass'
|
|
3
3
|
Compass::Frameworks.register("breakpoint", :path => "#{File.dirname(__FILE__)}/..")
|
4
4
|
|
5
5
|
module Breakpoint
|
6
|
-
VERSION = "2.0.
|
7
|
-
DATE = "2013-
|
8
|
-
end
|
9
|
-
|
10
|
-
module Sass::Script::Functions
|
11
|
-
def is_breakpoint_list(breakpoint)
|
12
|
-
result = false unless breakpoint.class == Sass::Script::List && breakpoint.separator.to_s == 'comma'
|
13
|
-
Sass::Script::Bool.new(result)
|
14
|
-
end
|
15
|
-
def featureExists(feature, list)
|
16
|
-
testList = Array.new
|
17
|
-
listLength = list.to_a.length - 1
|
18
|
-
|
19
|
-
# Only check if length greater than zero
|
20
|
-
# Was throwing errors for floats (but strangely, not for ints)
|
21
|
-
if listLength > 0
|
22
|
-
for i in 0..listLength
|
23
|
-
if list.value[i].class == Sass::Script::List
|
24
|
-
subList = list.value[i].to_a.length - 1
|
25
|
-
|
26
|
-
for j in 0..subList
|
27
|
-
testList << list.value[i].value[j]
|
28
|
-
end
|
29
|
-
else
|
30
|
-
testList << list.value[i]
|
31
|
-
end
|
32
|
-
end
|
33
|
-
result = testList.include?(feature)
|
34
|
-
else
|
35
|
-
result = false
|
36
|
-
end
|
37
|
-
|
38
|
-
Sass::Script::Bool.new(result)
|
39
|
-
end
|
40
|
-
end
|
6
|
+
VERSION = "2.2.0.alpha.1"
|
7
|
+
DATE = "2013-10-20"
|
8
|
+
end
|
@@ -43,7 +43,7 @@ $breakpoint-legacy-syntax: false !default;
|
|
43
43
|
@include private-breakpoint-reset-contexts();
|
44
44
|
|
45
45
|
// Test to see if it's a comma-separated list
|
46
|
-
$or-list:
|
46
|
+
$or-list: if(list-separator($query) == 'comma', true, false);
|
47
47
|
$query-fallback: false;
|
48
48
|
|
49
49
|
|
@@ -63,7 +63,7 @@ $private-breakpoint-context-placeholder: 0;
|
|
63
63
|
|
64
64
|
@if $private-breakpoint-context-placeholder == 1 {
|
65
65
|
$holder: ($feature $value);
|
66
|
-
$private-breakpoint-context-holder: append($private-breakpoint-context-holder, $holder, comma);
|
66
|
+
$private-breakpoint-context-holder: append($private-breakpoint-context-holder, $holder, comma) !global;
|
67
67
|
@return true;
|
68
68
|
|
69
69
|
} @else {
|
@@ -118,7 +118,7 @@ $private-breakpoint-context-placeholder: 0;
|
|
118
118
|
} @else {
|
119
119
|
$rebuild: append($private-breakpoint-context-holder, $holder, comma);
|
120
120
|
}
|
121
|
-
$private-breakpoint-context-holder: $rebuild;
|
121
|
+
$private-breakpoint-context-holder: $rebuild !global;
|
122
122
|
}
|
123
123
|
|
124
124
|
@return true;
|
@@ -128,6 +128,6 @@ $private-breakpoint-context-placeholder: 0;
|
|
128
128
|
// Private function to reset context
|
129
129
|
//////////////////////////////
|
130
130
|
@mixin private-breakpoint-reset-contexts {
|
131
|
-
$private-breakpoint-context-holder: ();
|
132
|
-
$private-breakpoint-context-placeholder: 0;
|
131
|
+
$private-breakpoint-context-holder: () !global;
|
132
|
+
$private-breakpoint-context-placeholder: 0 !global;
|
133
133
|
}
|
@@ -11,7 +11,7 @@
|
|
11
11
|
// General Breakpoint Parser
|
12
12
|
//////////////////////////////
|
13
13
|
@function breakpoint-parse($query) {
|
14
|
-
$private-breakpoint-context-placeholder: $private-breakpoint-context-placeholder + 1;
|
14
|
+
$private-breakpoint-context-placeholder: $private-breakpoint-context-placeholder + 1 !global;
|
15
15
|
|
16
16
|
// Set up Media Type
|
17
17
|
$query-print: '';
|
metadata
CHANGED
@@ -1,12 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: breakpoint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
4
|
+
prerelease: true
|
5
5
|
segments:
|
6
6
|
- 2
|
7
|
+
- 2
|
7
8
|
- 0
|
8
|
-
-
|
9
|
-
|
9
|
+
- alpha
|
10
|
+
- 1
|
11
|
+
version: 2.2.0.alpha.1
|
10
12
|
platform: ruby
|
11
13
|
authors:
|
12
14
|
- Mason Wendell
|
@@ -15,7 +17,7 @@ autorequire:
|
|
15
17
|
bindir: bin
|
16
18
|
cert_chain: []
|
17
19
|
|
18
|
-
date: 2013-
|
20
|
+
date: 2013-10-20 00:00:00 -06:00
|
19
21
|
default_executable:
|
20
22
|
dependencies:
|
21
23
|
- !ruby/object:Gem::Dependency
|
@@ -23,13 +25,15 @@ dependencies:
|
|
23
25
|
prerelease: false
|
24
26
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
27
|
requirements:
|
26
|
-
- -
|
28
|
+
- - ~>
|
27
29
|
- !ruby/object:Gem::Version
|
28
30
|
segments:
|
29
31
|
- 3
|
30
|
-
-
|
32
|
+
- 3
|
31
33
|
- 0
|
32
|
-
|
34
|
+
- rc
|
35
|
+
- 1
|
36
|
+
version: 3.3.0.rc.1
|
33
37
|
type: :runtime
|
34
38
|
version_requirements: *id001
|
35
39
|
- !ruby/object:Gem::Dependency
|
@@ -37,13 +41,14 @@ dependencies:
|
|
37
41
|
prerelease: false
|
38
42
|
requirement: &id002 !ruby/object:Gem::Requirement
|
39
43
|
requirements:
|
40
|
-
- -
|
44
|
+
- - ~>
|
41
45
|
- !ruby/object:Gem::Version
|
42
46
|
segments:
|
43
47
|
- 0
|
44
|
-
-
|
45
|
-
-
|
46
|
-
|
48
|
+
- 13
|
49
|
+
- alpha
|
50
|
+
- 7
|
51
|
+
version: 0.13.alpha.7
|
47
52
|
type: :runtime
|
48
53
|
version_requirements: *id002
|
49
54
|
description: Really simple media queries in Sass
|