accoutrement 0.1.10 → 1.0.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1f3438106db46419c0fcef5323d4b544f96e9d59
4
- data.tar.gz: 1907ebcfa580a38d7e775466ce719b505fc2a17d
3
+ metadata.gz: 8f7ec922958c4a73010063711ab7ca6138ceb9b9
4
+ data.tar.gz: 9fe85d88b1734cd03ea6a63e29af13822934feba
5
5
  SHA512:
6
- metadata.gz: 92b2d1e926d5a3f48e84fc641f49929ca8787d0f03b0f120e0a975fcaea6ff47a1b221e5416adfb1c3cb8d426ed7b97fb130ac0557a0501e953e24f213cb57b9
7
- data.tar.gz: d74e5b60d1f5b4a319e5291708eab400fdb95a5c42b619025bc9459672a94abd7fe0cf0eedd7000424337d0e680c61a8c84c87ebbfa62351fa0a34db8f5b81ea
6
+ metadata.gz: 0ccaa7d21b78efa2c29ab28d901e8942500490638ef44037e56f9cd402f2ef5734a9d77395e927f434ddcda3d55d3c80ad882e79158d826cd93adc8abe0ed051
7
+ data.tar.gz: 0a2dc36aa72af4c70719d9bd8c34ffe92531dd3d3d107d1b23ce037da0cd2950c1ab8bf99cc449c5dcd4ee9f33c293765f1ee5e94cc5cca342917ec14741e442
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.9
1
+ 1.0.0.beta.0
@@ -8,7 +8,6 @@
8
8
  // Utilities
9
9
  // ---------
10
10
 
11
- @import 'accoutrement/settings';
12
11
  @import 'accoutrement/scale';
13
12
  @import 'accoutrement/fonts';
14
13
  @import 'accoutrement/color';
@@ -1,12 +1,12 @@
1
1
  // Arrows
2
2
  // ======
3
3
 
4
- @include set(arrows, (
4
+ $arrows: (
5
5
  direction: down,
6
6
  size: 1em,
7
7
  spread: auto,
8
8
  color: black,
9
- ));
9
+ );
10
10
 
11
11
 
12
12
  // Arrow Base
@@ -28,7 +28,7 @@
28
28
  // Arrow
29
29
  // -----
30
30
  @mixin arrow(
31
- $arrow: get(arrows),
31
+ $arrow: $arrows,
32
32
  $place: before,
33
33
  $extend: true,
34
34
  $root: relative
@@ -37,24 +37,23 @@
37
37
 
38
38
  position: $root;
39
39
 
40
- &#{'::' + $place} {
40
+ &#{':' + $place} {
41
41
  @if $extend {
42
42
  @extend %_arrow-base;
43
43
  } @else {
44
44
  @include _arrow-base;
45
45
  }
46
- @include output-map($arrow);
46
+ @include render($arrow);
47
47
  @content;
48
48
  }
49
49
  }
50
50
 
51
-
52
- // Parse Arrow
53
- // -----------
51
+ // PRIVATE: Parse Arrow
52
+ // --------------------
54
53
  @function _parse-arrow(
55
54
  $arrow: null
56
55
  ) {
57
- $_return: get(arrows);
56
+ $_return: $arrows;
58
57
  $_numbers: ();
59
58
 
60
59
  @if type-of($arrow) == map {
@@ -89,8 +88,8 @@
89
88
  }
90
89
 
91
90
 
92
- // Build Arrow
93
- // -----------
91
+ // PRIVATE: Build Arrow
92
+ // --------------------
94
93
  @function _build-arrow(
95
94
  $arrow
96
95
  ) {
@@ -1,106 +1,111 @@
1
1
  // Color Toolkit
2
2
  // =============
3
3
 
4
- @include set(color-keywords, (
5
- lightest: 80%,
6
- lighter: 50%,
7
- light: 20%,
8
- dark: -20%,
9
- darker: -50%,
10
- darkest: -80%,
11
- ));
4
+ $color-functions: (
5
+ hue: adjust-hue,
6
+ lightness: scale-lightness,
7
+ saturation: scale-saturation,
8
+ alpha: rgba,
9
+ ) !default;
12
10
 
13
- $contrasted-dark-default : black !default;
14
- $contrasted-light-default : white !default;
11
+ $base-colors: () !default;
12
+ $colors: () !default;
13
+
14
+ $contrasted-dark-default: #000 !default;
15
+ $contrasted-light-default: #fff !default;
16
+
17
+
18
+ // Colors
19
+ // ------
20
+ // Add colors to a pallette
21
+ @mixin colors(
22
+ $map
23
+ ) {
24
+ $colors: map-merge($colors, $map) !global;
25
+ }
15
26
 
16
27
 
17
28
  // Color
18
29
  // -----
30
+ // Access your color pallette
19
31
  @function color(
20
- $args,
21
- $alpha: 1
32
+ $name
22
33
  ) {
23
- $args: _parse-color($args);
24
- $_color: map-get($args, color);
25
- $_lightness: map-get($args, lightness);
26
- $_saturation: map-get($args, saturation);
27
-
28
- @if $_lightness {
29
- @if $_lightness > 0 {
30
- $_color: tint($_color, $_lightness);
31
- } @else if $_lightness < 0 {
32
- $_color: shade($_color, abs($_lightness));
33
- }
34
+ $_return: $name;
35
+
36
+ @if color-get($name) {
37
+ $_return: make-color($name);
34
38
  }
35
39
 
36
- @if $_saturation {
37
- $_color: scale-color($_color, $saturation: $_saturation);
40
+ @if type-of($_return) != color {
41
+ @warn "#{$name} is not a valid color option."
38
42
  }
39
43
 
40
- @return rgba($_color, $alpha);
44
+ @return $_return;
41
45
  }
42
46
 
43
47
 
44
- // Contrast
45
- // --------
46
- @function contrast(
47
- $color,
48
- $contrast: $contrasted-dark-default $contrasted-light-default
48
+ // Make Color
49
+ // ----------
50
+ // Create new colors based on existing colors
51
+ @function make-color(
52
+ $color
49
53
  ) {
50
- $contrasted-light: false;
51
- $contrasted-dark: false;
52
-
53
- @if length($contrast) == 2 {
54
- $light1: brightness(nth($contrast,1));
55
- $light2: brightness(nth($contrast,2));
56
- $contrasted-light: if($light1 > $light2, nth($contrast,1), nth($contrast,2));
57
- $contrasted-dark: if($light1 < $light2, nth($contrast,1), nth($contrast,2));
58
- } @else {
59
- @warn "Contrast takes two colors (light & dark) for the second argument.";
60
- }
54
+ $_base: null;
55
+ $_adjustments: ();
56
+ $_return: $color;
57
+
58
+ @if type-of($_return) != color {
59
+ @each $arg in $color {
60
+ @if type-of($arg) == map {
61
+ $_adjustments: $arg;
62
+ } @else {
63
+ $_base: if($_base, join($_base, $arg), $arg);
64
+ }
65
+ }
61
66
 
62
- $color-brightness: brightness($color);
63
- $light-contrast-brightness: brightness($contrasted-light);
64
- $dark-contrast-brightness: brightness($contrasted-dark);
67
+ @if type-of($_base) != color {
68
+ @if color-get($_base) {
69
+ $_base: make-color(color-get($_base));
70
+ } @else {
71
+ @warn "#{$_base} is not a valid color."
72
+ }
73
+ }
65
74
 
66
- $light-diff: abs($color-brightness - $light-contrast-brightness);
67
- $dark-diff: abs($color-brightness - $dark-contrast-brightness);
75
+ $_return: _color-adjustments($_base, $_adjustments);
76
+ }
68
77
 
69
- @return if($light-diff > $dark-diff, $contrasted-light, $contrasted-dark);
78
+ @return $_return;
70
79
  }
71
80
 
72
81
 
73
- // Parse Color
74
- // -----------
75
- @function _parse-color(
76
- $args
82
+ // Color Get
83
+ // ---------
84
+ @function color-get(
85
+ $key
77
86
  ) {
78
- $_has-color: false;
79
- $_return: (
80
- color: gray,
81
- lightness: null,
82
- saturation: null,
83
- );
84
-
85
- @each $arg in $args {
86
- @if type-of($arg) == color {
87
- $_return: map-merge($_return, (color: $arg));
88
- $_has-color: true;
89
- }
87
+ @return map-get($colors, $key) or map-get($base-colors, $key);
88
+ }
90
89
 
91
- @else if type-of($arg) == number {
92
- @if $_has-color or length($args) == 1 {
93
- $_return: map-merge($_return, (lightness: $arg));
90
+
91
+ // Color Adjustments
92
+ // -----------------
93
+ @function _color-adjustments(
94
+ $color,
95
+ $adjustments
96
+ ) {
97
+ @each $function, $value in $adjustments {
98
+ $function: map-get($color-functions, $function) or $function;
99
+ @if function-exists($function) {
100
+ @if $value {
101
+ $color: call($function, $color, $value...);
94
102
  } @else {
95
- $_return: map-merge($_return, (saturation: $arg));
103
+ $color: call($function, $color);
96
104
  }
97
- }
98
-
99
- @else if type-of($arg) == string {
100
- $arg: get(color-keywords, $arg);
101
- $_return: map-merge($_return, (lightness: $arg));
105
+ } @else {
106
+ @warn "#{$function}() is not a valid function."
102
107
  }
103
108
  }
104
109
 
105
- @return $_return;
110
+ @return $color;
106
111
  }
@@ -1,58 +1,83 @@
1
1
  // Fluid Media
2
2
  // ===========
3
3
 
4
-
5
- @include set(fluid-media, (
4
+ $fluid-media: (
6
5
  ratio: 16/9,
7
6
  width: 100%,
8
7
  children: '*',
9
- ));
8
+ );
10
9
 
11
10
 
12
- // Fluid Ratio
11
+ // Fluid Media
13
12
  // -----------
14
- @mixin fluid-ratio(
15
- $args: get(fluid-media)
13
+ @mixin fluid-media(
14
+ $args: $fluid-media
15
+ ) {
16
+ @include render(_get-fluid-media($args));
17
+ }
18
+
19
+
20
+ // PRIVATE: Get Fluid Media
21
+ // ------------------------
22
+ @function _get-fluid-media(
23
+ $args: $fluid-media
16
24
  ) {
17
- $_map: ();
25
+ $_settings: _parse-fluid-media($args);
26
+ $_ratio: map-get($_settings, ratio);
27
+ $_width: map-get($_settings, width);
28
+ $_children: map-get($_settings, children);
29
+
30
+ $_return: (
31
+ height: 0,
32
+ padding-top: (1 / $_ratio) * $_width,
33
+ position: relative,
34
+ width: $_width,
35
+ );
36
+
37
+ $_inner: (
38
+ display: block,
39
+ position: absolute,
40
+ height: 100%,
41
+ width: 100%,
42
+ top: 0,
43
+ right: 0,
44
+ bottom: 0,
45
+ left: 0,
46
+ );
47
+
48
+ @if $_children {
49
+ $_children: ('> #{$_children}': $_inner);
50
+ $_return: map-merge($_return, $_children);
51
+ }
52
+
53
+ @return $_return;
54
+ }
55
+
56
+
57
+ // PRIVATE: Parse Fluid Media
58
+ // --------------------------
59
+ @function _parse-fluid-media(
60
+ $args: $fluid-media
61
+ ) {
62
+ $_return: $fluid-media;
18
63
 
19
64
  @if type-of($args) == map {
20
- $_map: $args;
65
+ $_return: map-merge($fluid-media, $args);
21
66
  } @else {
22
67
  @each $arg in $args {
23
68
  @if type-of($arg) == map {
24
- $_map: map-merge($_map, $arg);
69
+ $_return: map-merge($_return, $arg);
25
70
  } @else if type-of($arg) == string {
26
- $_map: map-merge($_map, (children: $arg));
71
+ $_return: map-merge($_return, (children: $arg));
27
72
  } @else if type-of($arg) == number {
28
73
  @if unitless($arg) {
29
- $_map: map-merge($_map, (ratio: $arg));
74
+ $_return: map-merge($_return, (ratio: $arg));
30
75
  } @else {
31
- $_map: map-merge($_map, (width: $arg));
76
+ $_return: map-merge($_return, (width: $arg));
32
77
  }
33
78
  }
34
79
  }
35
80
  }
36
81
 
37
- $_ratio: map-get($_map, ratio);
38
- $_width: map-get($_map, width);
39
- $_children: map-get($_map, children);
40
-
41
- position: relative;
42
- height: 0;
43
- padding-top: (1 / $_ratio) * $_width;
44
- width: $_width;
45
-
46
- @if $_children {
47
- > #{$_children} {
48
- display: block;
49
- position: absolute;
50
- height: 100%;
51
- width: 100%;
52
- top: 0;
53
- right: 0;
54
- bottom: 0;
55
- left: 0;
56
- }
57
- }
82
+ @return $_return;
58
83
  }
@@ -1,19 +1,21 @@
1
1
  // Fontface Tools
2
2
  // ==============
3
3
 
4
- @include set(fontface, (
5
- formats: woff ttf,
6
- valid-styles: italic oblique,
7
- valid-weights: 100 200 300 400 500 600 700 800 900 bold bolder lighter,
8
- ));
4
+ $font-formats: woff ttf;
5
+ $fonts: ();
6
+
7
+ $_font-setting-options: (
8
+ styles: italic oblique,
9
+ weights: 100 200 300 400 500 600 700 800 900 bold bolder lighter,
10
+ );
9
11
 
10
12
 
11
13
  // Fonts
12
14
  // -----
13
15
  // Establish fonts
14
16
  @mixin fonts(
15
- $fonts: get(fonts),
16
- $formats: get(fontface, formats)
17
+ $fonts: $fonts,
18
+ $formats: $font-formats
17
19
  ) {
18
20
  @include import-fonts($fonts, $formats);
19
21
  @include font-placeholders($fonts);
@@ -24,14 +26,14 @@
24
26
  // ------------
25
27
  // Create font-face css
26
28
  @mixin import-fonts(
27
- $fonts: get(fonts),
28
- $formats: get(fontface, formats)
29
+ $fonts: $fonts,
30
+ $formats: $font-formats
29
31
  ) {
30
32
  $_output: _get-font-face($fonts, $formats);
31
33
 
32
34
  @each $font in $_output {
33
35
  @font-face {
34
- @include output-map($font);
36
+ @include render($font);
35
37
  }
36
38
  }
37
39
  }
@@ -41,15 +43,11 @@
41
43
  // -----------------
42
44
  // Create font-family placeholders
43
45
  @mixin font-placeholders(
44
- $fonts: get(fonts)
46
+ $fonts: $fonts
45
47
  ) {
46
48
  $_output: _get-font-placeholders($fonts);
47
49
 
48
- @each $font, $map in $_output {
49
- #{$font} {
50
- @include output-map($map);
51
- }
52
- }
50
+ @include render($_output);
53
51
  }
54
52
 
55
53
 
@@ -57,8 +55,8 @@
57
55
  // -------------
58
56
  // PRIVATE: Return a list of font-face output maps
59
57
  @function _get-font-face(
60
- $fonts: get(fonts),
61
- $formats: get(fontface, formats)
58
+ $fonts: $fonts,
59
+ $formats: $font-formats
62
60
  ) {
63
61
  $_return: ();
64
62
 
@@ -97,8 +95,8 @@
97
95
  $path,
98
96
  $variants: regular
99
97
  ) {
100
- $_styles: get(fontface, valid-styles);
101
- $_weights: get(fontface, valid-weights);
98
+ $_styles: map-get($_font-setting-options, styles);
99
+ $_weights: map-get($_font-setting-options, weights);
102
100
  $_return: ();
103
101
 
104
102
  @each $v in $variants {
@@ -134,17 +132,17 @@
134
132
  @function _parse-font-styles(
135
133
  $face
136
134
  ) {
137
- $styles: get(fontface, valid-styles);
138
- $weights: get(fontface, valid-weights);
135
+ $_styles: map-get($_font-setting-options, styles);
136
+ $_weights: map-get($_font-setting-options, weights);
139
137
  $return: (
140
138
  weight: normal,
141
139
  style: normal,
142
140
  );
143
141
 
144
142
  @each $item in $face {
145
- @if index($styles, $item) {
143
+ @if index($_styles, $item) {
146
144
  $return: map-merge($return, (style: $item));
147
- } @else if index($weights, $item) {
145
+ } @else if index($_weights, $item) {
148
146
  $return: map-merge($return, (weight: $item));
149
147
  }
150
148
  }
@@ -158,7 +156,7 @@
158
156
  // PRIVATE: Return src attribute based on path and formats
159
157
  @function _build-font-src(
160
158
  $path,
161
- $formats: get(fontface, formats)
159
+ $formats: $font-formats
162
160
  ) {
163
161
  $options: (
164
162
  woff: 'woff',
@@ -183,7 +181,7 @@
183
181
  // ---------------------
184
182
  // PRIVATE: Return a list of font-placeholder maps ready for output
185
183
  @function _get-font-placeholders(
186
- $fonts: get(fonts)
184
+ $fonts: $fonts
187
185
  ) {
188
186
  $_return: ();
189
187
 
@@ -1,6 +1,9 @@
1
1
  // Icon Toolkit
2
2
  // ============
3
3
 
4
+ $icon-font: 'icons';
5
+ $icons: ();
6
+
4
7
 
5
8
  // Icon
6
9
  // ----
@@ -10,7 +13,7 @@
10
13
  ) {
11
14
  &::#{$location} {
12
15
  @extend %icon;
13
- content: get(icons, $name);
16
+ content: map-get($icons, $name);
14
17
  @content;
15
18
  }
16
19
  }
@@ -21,18 +24,18 @@
21
24
  @function icon(
22
25
  $name
23
26
  ) {
24
- @return get(icons, $name),
27
+ @return map-get($icons, $name),
25
28
  }
26
29
 
27
30
 
28
31
  // Data Icons
29
32
  // ----------
30
33
  @mixin data-icons(
31
- $icons: get(icons)
34
+ $icons: $icons
32
35
  ) {
33
36
  @each $name, $value in $icons {
34
- @if map-has-key(get(icons), $value) {
35
- $value: get(icons, $value);
37
+ @if map-has-key($icons, $value) {
38
+ $value: map-get($icons, $value);
36
39
  }
37
40
  [data-icon='#{$name}']:before { content: $value; }
38
41
  }
@@ -43,7 +46,7 @@
43
46
  // ------------
44
47
 
45
48
  @mixin icon-placeholder(
46
- $name: get(icon-font)
49
+ $name: $icon-font
47
50
  ) {
48
51
  %icon {
49
52
  font-family: $name;
@@ -89,12 +89,18 @@
89
89
  }
90
90
 
91
91
 
92
- // Output Map
93
- // ----------
94
- @mixin output-map(
95
- $map
92
+ // Render
93
+ // ------
94
+ @mixin render(
95
+ $css
96
96
  ) {
97
- @each $prop, $val in $map {
98
- #{$prop}: $val;
97
+ @each $key, $value in $css {
98
+ @if type-of($value) == map {
99
+ #{$key} {
100
+ @include render($value);
101
+ }
102
+ } @else {
103
+ #{$key}: $value;
104
+ }
99
105
  }
100
106
  }
@@ -7,7 +7,7 @@
7
7
  @mixin before(
8
8
  $content
9
9
  ) {
10
- &::before {
10
+ &:before {
11
11
  content: $content;
12
12
  @content;
13
13
  }
@@ -19,7 +19,7 @@
19
19
  @mixin after(
20
20
  $content
21
21
  ) {
22
- &::after {
22
+ &:after {
23
23
  content: $content;
24
24
  @content;
25
25
  }
@@ -33,12 +33,12 @@
33
33
  ) {
34
34
  $_before: nth($content, 1);
35
35
 
36
- &::before, &::after {
36
+ &:before, &:after {
37
37
  content: $_before;
38
38
  @content;
39
39
  }
40
40
 
41
41
  @if length($content) > 1 {
42
- &::after { content: nth($content, 2); }
42
+ &:after { content: nth($content, 2); }
43
43
  }
44
44
  }
@@ -3,55 +3,92 @@
3
3
 
4
4
  @import "compass/typography/vertical_rhythm";
5
5
 
6
- @include set(ratio-options, (
7
- octave : 2,
8
- major-seventh : 15/8,
9
- minor-seventh : 16/9,
10
- major-sixth : 5/3,
11
- minor-sixth : 8/5,
12
- fifth : 3/2,
13
- augmented-fourth : 45/32,
14
- fourth : 4/3,
15
- major-third : 5/4,
16
- minor-third : 6/5,
17
- major-second : 9/8,
18
- minor-second : 16/15,
19
- ));
20
-
21
- @include set(scale, (
22
- xxxlarge : 4,
23
- xxlarge : 3,
24
- xlarge : 2,
25
- large : 1,
26
- normal : 0,
27
- small : -1,
28
- xsmall : -2,
29
- xxsmall : -3,
30
- xxxsmall : -4,
31
- ));
32
-
33
- @include set(ratio, fifth);
6
+ $_ratio-options: (
7
+ linear : linear,
8
+ octave : 2,
9
+ major-seventh : 15/8,
10
+ minor-seventh : 16/9,
11
+ major-sixth : 5/3,
12
+ minor-sixth : 8/5,
13
+ fifth : 3/2,
14
+ augmented-fourth : 45/32,
15
+ fourth : 4/3,
16
+ major-third : 5/4,
17
+ minor-third : 6/5,
18
+ major-second : 9/8,
19
+ minor-second : 16/15,
20
+ );
21
+
22
+ $ratio: fifth !default;
23
+
24
+
25
+ // Scale
26
+ // -----
27
+ @function scale(
28
+ $size,
29
+ $root: $base-font-size,
30
+ $ratio: $ratio
31
+ ) {
32
+ $_return: false;
33
+
34
+ @if type-of($ratio) == string {
35
+ $ratio: map-get($_ratio-options, $ratio);
36
+ }
37
+
38
+ @if $ratio == linear {
39
+ $_return: round($root * $size);
40
+ } @else {
41
+ $_return: round($root * pow($ratio, $size));
42
+ }
43
+
44
+ @return $_return;
45
+ }
46
+
47
+
48
+ // Sizes
49
+ // -----
50
+ $sizes: (
51
+ xxxlarge : scale(4),
52
+ xxlarge : scale(3),
53
+ xlarge : scale(2),
54
+ large : scale(1),
55
+ normal : scale(0),
56
+ small : scale(-1),
57
+ xsmall : scale(-2),
58
+ xxsmall : scale(-3),
59
+ xxxsmall : scale(-4),
60
+ );
34
61
 
35
62
 
36
63
  // Size
37
64
  // ----
38
65
  @function size(
39
- $multiplier: normal,
40
- $root: $base-font-size,
41
- $ratio: get(ratio)
66
+ $size,
67
+ $unit: $rhythm-unit
42
68
  ) {
43
- $_return: $multiplier;
44
-
45
- @if type-of($multiplier) == string {
46
- $multiplier: get(scale, $multiplier);
69
+ @if type-of($size) == string {
70
+ $size: map-get($sizes, $size);
47
71
  }
48
72
 
49
- @if type-of($ratio) == string {
50
- $ratio: get(ratio-options, $ratio);
73
+ @if $unit == rem {
74
+ $size: rem($size);
51
75
  }
52
76
 
53
- @if unit($multiplier) == '' {
54
- $_return: round($root * pow($ratio, $multiplier));
77
+ @return $size;
78
+ }
79
+
80
+
81
+ // Rem
82
+ // ---
83
+ @function rem(
84
+ $size
85
+ ) {
86
+ $_return: $size;
87
+
88
+ @if type-of($size) == number
89
+ and not unitless($size)
90
+ and unit($size) != rem {
91
+ $_return: convert-length($size, rem);
55
92
  }
56
93
 
57
94
  @return $_return;
@@ -76,7 +113,7 @@
76
113
  $lines: false
77
114
  ) {
78
115
  $_return: if($lines, (lines: $lines), ());
79
- $size: size($size);
116
+ $size: size($size, px);
80
117
 
81
118
  @return map-merge($_return, (to_size: $size));
82
119
  }
@@ -3,6 +3,7 @@
3
3
 
4
4
  $interpolation-format-string: '%s';
5
5
 
6
+
6
7
  // String Replace
7
8
  // --------------
8
9
  // Return a string, with a substring replaced
@@ -11,13 +12,19 @@ $interpolation-format-string: '%s';
11
12
  $old,
12
13
  $new: ''
13
14
  ) {
15
+ $_return: $string;
14
16
  $_i: str-index($string, $old);
15
17
  $_n: str-length($old);
16
18
 
17
- $_a: str-slice($string, 1, $_i - 1);
18
- $_z: str-slice($string, $_i + $_n);
19
+ @if $string == $old {
20
+ $_return: $new;
21
+ } @else if $_i {
22
+ $_a: str-slice($string, 1, $_i - 1);
23
+ $_z: str-slice($string, $_i + $_n);
24
+ $_return: $_a + $new + $_z;
25
+ }
19
26
 
20
- @return $_a + $new + $_z;
27
+ @return $_return;
21
28
  }
22
29
 
23
30
 
@@ -1,7 +1,7 @@
1
1
  // Tooltips
2
2
  // ========
3
3
 
4
- @include set(tooltips, (
4
+ $tooltips: (
5
5
  position: top right,
6
6
  container: '.tooltip',
7
7
  content: '.tooltip-text',
@@ -12,17 +12,17 @@
12
12
  display: block,
13
13
  z-index: 900,
14
14
  ),
15
- ));
15
+ );
16
16
 
17
17
 
18
18
  // Tooltip
19
19
  // -------
20
20
  @mixin tooltip(
21
- $pos: get(tooltips, position)
21
+ $pos: map-get($tooltips, position)
22
22
  ) {
23
23
  $extends: _tooltip($pos);
24
24
 
25
- #{get(tooltips, content)} {
25
+ #{map-get($tooltips, content)} {
26
26
  @extend #{$extends};
27
27
  @content;
28
28
  }
@@ -30,7 +30,7 @@
30
30
 
31
31
 
32
32
  @function _tooltip(
33
- $pos: get(tooltips, position)
33
+ $pos: map-get($tooltips, position)
34
34
  ) {
35
35
  $x: null;
36
36
  $y: null;
@@ -49,17 +49,17 @@
49
49
  // Tooltips
50
50
  // --------
51
51
  @mixin tooltips {
52
- #{get(tooltips, container)} {
52
+ #{map-get($tooltips, container)} {
53
53
  display: inline-block;
54
54
  position: relative;
55
55
  text-decoration: none;
56
- &:hover #{get(tooltips, content)} {
57
- @include output-map(get(tooltips, show));
56
+ &:hover #{map-get($tooltips, content)} {
57
+ @include render(map-get($tooltips, show));
58
58
  }
59
59
  }
60
60
 
61
- #{get(tooltips, content)} {
62
- @include output-map(get(tooltips, hide));
61
+ #{map-get($tooltips, content)} {
62
+ @include render(map-get($tooltips, hide));
63
63
  position: absolute;
64
64
  white-space: nowrap;
65
65
  pointer-events: none;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: accoutrement
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 1.0.0.beta.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric M. Suzanne
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: 3.3.0.rc.1
19
+ version: '3.3'
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
- version: 3.3.0.rc.1
26
+ version: '3.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: compass
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -60,7 +60,6 @@ files:
60
60
  - stylesheets/accoutrement/_maps.scss
61
61
  - stylesheets/accoutrement/_pseudo-elements.scss
62
62
  - stylesheets/accoutrement/_scale.scss
63
- - stylesheets/accoutrement/_settings.scss
64
63
  - stylesheets/accoutrement/_strings.scss
65
64
  - stylesheets/accoutrement/_tooltips.scss
66
65
  - README.md
@@ -86,9 +85,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
86
85
  version: '0'
87
86
  required_rubygems_version: !ruby/object:Gem::Requirement
88
87
  requirements:
89
- - - '>='
88
+ - - '>'
90
89
  - !ruby/object:Gem::Version
91
- version: '1.2'
90
+ version: 1.3.1
92
91
  requirements: []
93
92
  rubyforge_project: accoutrement
94
93
  rubygems_version: 2.1.10
@@ -1,23 +0,0 @@
1
- // Settings
2
- // ========
3
-
4
-
5
- $settings: ();
6
-
7
-
8
- // Set
9
- // ---
10
- @mixin set(
11
- $keys-value...
12
- ) {
13
- $settings: deep-set($settings, $keys-value...) !global;
14
- }
15
-
16
-
17
- // Get
18
- // ---
19
- @function get(
20
- $keys...
21
- ) {
22
- @return deep-get($settings, $keys...);
23
- }