archetype 1.0.0.alpha.3 → 1.0.0.alpha.4
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/VERSION +1 -1
- data/lib/archetype/sass_extensions/functions/lists.rb +2 -2
- data/lib/archetype/sass_extensions/functions/numbers.rb +13 -0
- data/lib/archetype/sass_extensions/functions/ui/scopes.rb +1 -1
- data/lib/archetype/sass_extensions/functions/util/images.rb +3 -3
- data/stylesheets/archetype/hacks/_hacks.scss +2 -2
- data/stylesheets/archetype/ui/_accessibility.scss +2 -2
- data/stylesheets/archetype/ui/_layout.scss +2 -2
- data/stylesheets/archetype/util/_styles.scss +4 -4
- data/templates/example/screen.scss +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a245dc348e779929fa42e5d62f39ebc2ff17484
|
4
|
+
data.tar.gz: 5681711ab2e93e68dbde76a83a8fe56647e8bf7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7889dc272f3407af772361bb2767a1da0de7fa25c0b369442a1898b20ca559a1d6c5be2a5afac82b2a70a664440eeb310df726b061b374b835668bdda536cc2
|
7
|
+
data.tar.gz: e7e323e0fb48394518bcf6a6f614c277bd3e169ac6642f6f1ca86afd850889dbbddd6e7ca6d0152583a5271866db7f73265112b84958526e83edaf00cea4d423
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.0.alpha.
|
1
|
+
1.0.0.alpha.4
|
@@ -15,7 +15,7 @@ module Archetype::SassExtensions::Lists
|
|
15
15
|
#
|
16
16
|
def list_replace(list, idx = false, value = nil, separator = nil)
|
17
17
|
# return early if the index is invalid (no operation)
|
18
|
-
return list if (!idx || helpers.is_null(idx) || idx.
|
18
|
+
return list if (!idx || helpers.is_null(idx) || !idx.to_bool)
|
19
19
|
separator ||= list.separator if list.is_a?(Sass::Script::Value::List)
|
20
20
|
# cast and zero-index $idx
|
21
21
|
idx = (idx.value) - 1
|
@@ -249,7 +249,7 @@ module Archetype::SassExtensions::Lists
|
|
249
249
|
# - {List} formatted collection
|
250
250
|
#
|
251
251
|
def get_collection(list = bool(false), components = [], min = number(1))
|
252
|
-
list = list.
|
252
|
+
list = list.to_bool ? list.to_a : components.to_a
|
253
253
|
while(list.length < min.value)
|
254
254
|
list = list.concat(list)
|
255
255
|
end
|
@@ -24,6 +24,19 @@ module Archetype::SassExtensions::Numbers
|
|
24
24
|
return number(value)
|
25
25
|
end
|
26
26
|
|
27
|
+
#
|
28
|
+
# Return 1 of the same dimensions of the number passed in.
|
29
|
+
#
|
30
|
+
# *Parameters*:
|
31
|
+
# - <tt>$number</tt> {Number} the number with dimensions to use.
|
32
|
+
# *Returns*:
|
33
|
+
# - {Number} 1 with the same dimensions as the number passed in.
|
34
|
+
#
|
35
|
+
def units(n)
|
36
|
+
assert_type n, :Number
|
37
|
+
return number(1, n.unit_str)
|
38
|
+
end
|
39
|
+
|
27
40
|
#
|
28
41
|
# converts a decimal number into a fraction
|
29
42
|
# credit goes to Christopher Lord (https://github.com/clord/fraction)
|
@@ -13,7 +13,7 @@ module Archetype::SassExtensions::UI::Scopes
|
|
13
13
|
def register_breakpoint(key, value, force = nil)
|
14
14
|
# we need a dup as the Hash is frozen
|
15
15
|
breakpoints = registered_breakpoints.dup
|
16
|
-
force = force.nil? ? false : force.
|
16
|
+
force = force.nil? ? false : force.to_bool
|
17
17
|
not_registered = breakpoints[key].nil? || helpers.is_null(breakpoints[key])
|
18
18
|
# if there's no key registered...
|
19
19
|
if force || not_registered
|
@@ -124,12 +124,12 @@ module Archetype::SassExtensions::Util::Images
|
|
124
124
|
private
|
125
125
|
|
126
126
|
def _is_sprite_valid(map)
|
127
|
-
return !global_sprites_disabled? && !(helpers.is_null(map) || !map.
|
127
|
+
return !global_sprites_disabled? && !(helpers.is_null(map) || !map.to_bool)
|
128
128
|
end
|
129
129
|
|
130
130
|
def global_sprites_disabled?
|
131
131
|
sprites_disabled = environment.var('CONFIG_DISABLE_STYLEGUIDE_SPRITES')
|
132
|
-
return sprites_disabled.respond_to?(:
|
132
|
+
return sprites_disabled.respond_to?(:to_bool) ? sprites_disabled.to_bool : false
|
133
133
|
end
|
134
134
|
|
135
|
-
end
|
135
|
+
end
|
@@ -4,9 +4,9 @@ $a-blackhole: require-archetype-modules(archetype/config);
|
|
4
4
|
|
5
5
|
// hack to support negative margins in legacy IE
|
6
6
|
// @mixin hack-negative-margin
|
7
|
-
@mixin hack-negative-margin
|
7
|
+
@mixin hack-negative-margin {
|
8
8
|
@if(support-legacy-browser('ie', '7', $threshold: $critical-usage-threshold)) {
|
9
|
-
@include has-layout
|
9
|
+
@include has-layout;
|
10
10
|
position: relative;
|
11
11
|
}
|
12
12
|
}
|
@@ -7,7 +7,7 @@ $a-blackhole: require-archetype-modules(archetype/ui);
|
|
7
7
|
// @mixin hide-element
|
8
8
|
// @credit Jonathan Snook
|
9
9
|
// @link http://snook.ca/archives/html_and_css/hiding-content-for-accessibility
|
10
|
-
@mixin hide-element
|
10
|
+
@mixin hide-element {
|
11
11
|
position: absolute !important;
|
12
12
|
height: 1px;
|
13
13
|
width: 1px;
|
@@ -33,7 +33,7 @@ $a-blackhole: require-archetype-modules(archetype/ui);
|
|
33
33
|
|
34
34
|
// a method for removing default styling from a button
|
35
35
|
// @mixin unstyled-button
|
36
|
-
@mixin unstyled-button
|
36
|
+
@mixin unstyled-button {
|
37
37
|
background: none;
|
38
38
|
border: none;
|
39
39
|
padding: 0;
|
@@ -8,8 +8,8 @@ $a-blackhole: require-archetype-modules(archetype/ui);
|
|
8
8
|
|
9
9
|
// makes your element centered vertically and horizontally in a parent element
|
10
10
|
// @mixin centered-box
|
11
|
-
@mixin centered-box
|
12
|
-
@include stretch
|
11
|
+
@mixin centered-box {
|
12
|
+
@include stretch;
|
13
13
|
margin: auto;
|
14
14
|
}
|
15
15
|
|
@@ -122,10 +122,10 @@ $a-blackhole: require-archetype-modules(archetype/util);
|
|
122
122
|
// clearfix
|
123
123
|
@else if($property == clearfix) {
|
124
124
|
@if($value == legacy-pie-clearfix) {
|
125
|
-
@include legacy-pie-clearfix
|
125
|
+
@include legacy-pie-clearfix;
|
126
126
|
}
|
127
127
|
@else if($value == pie-clearfix) {
|
128
|
-
@include pie-clearfix
|
128
|
+
@include pie-clearfix;
|
129
129
|
}
|
130
130
|
@else {
|
131
131
|
@include clearfix($value...);
|
@@ -459,13 +459,13 @@ $a-blackhole: require-archetype-modules(archetype/util);
|
|
459
459
|
|
460
460
|
// safely use text-transform:uppercase without localization issues
|
461
461
|
// @mixin uppercase
|
462
|
-
@mixin uppercase
|
462
|
+
@mixin uppercase {
|
463
463
|
@include safe(text-transform, uppercase);
|
464
464
|
}
|
465
465
|
|
466
466
|
// safely use font-variant:small-caps without localization issues
|
467
467
|
// @mixin small-caps
|
468
|
-
@mixin small-caps
|
468
|
+
@mixin small-caps {
|
469
469
|
@include safe(font-variant, small-caps);
|
470
470
|
}
|
471
471
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: archetype
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.alpha.
|
4
|
+
version: 1.0.0.alpha.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eugene ONeill
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-08
|
12
|
+
date: 2014-09-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: compass
|