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 +4 -4
- data/VERSION +1 -1
- data/stylesheets/_accoutrement.scss +0 -1
- data/stylesheets/accoutrement/_arrows.scss +10 -11
- data/stylesheets/accoutrement/_color.scss +79 -74
- data/stylesheets/accoutrement/_fluid-media.scss +58 -33
- data/stylesheets/accoutrement/_fonts.scss +24 -26
- data/stylesheets/accoutrement/_icons.scss +9 -6
- data/stylesheets/accoutrement/_maps.scss +12 -6
- data/stylesheets/accoutrement/_pseudo-elements.scss +4 -4
- data/stylesheets/accoutrement/_scale.scss +77 -40
- data/stylesheets/accoutrement/_strings.scss +10 -3
- data/stylesheets/accoutrement/_tooltips.scss +10 -10
- metadata +5 -6
- data/stylesheets/accoutrement/_settings.scss +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f7ec922958c4a73010063711ab7ca6138ceb9b9
|
4
|
+
data.tar.gz: 9fe85d88b1734cd03ea6a63e29af13822934feba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ccaa7d21b78efa2c29ab28d901e8942500490638ef44037e56f9cd402f2ef5734a9d77395e927f434ddcda3d55d3c80ad882e79158d826cd93adc8abe0ed051
|
7
|
+
data.tar.gz: 0a2dc36aa72af4c70719d9bd8c34ffe92531dd3d3d107d1b23ce037da0cd2950c1ab8bf99cc449c5dcd4ee9f33c293765f1ee5e94cc5cca342917ec14741e442
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
1.0.0.beta.0
|
@@ -1,12 +1,12 @@
|
|
1
1
|
// Arrows
|
2
2
|
// ======
|
3
3
|
|
4
|
-
|
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:
|
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
|
-
&#{'
|
40
|
+
&#{':' + $place} {
|
41
41
|
@if $extend {
|
42
42
|
@extend %_arrow-base;
|
43
43
|
} @else {
|
44
44
|
@include _arrow-base;
|
45
45
|
}
|
46
|
-
@include
|
46
|
+
@include render($arrow);
|
47
47
|
@content;
|
48
48
|
}
|
49
49
|
}
|
50
50
|
|
51
|
-
|
52
|
-
//
|
53
|
-
// -----------
|
51
|
+
// PRIVATE: Parse Arrow
|
52
|
+
// --------------------
|
54
53
|
@function _parse-arrow(
|
55
54
|
$arrow: null
|
56
55
|
) {
|
57
|
-
$_return:
|
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
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
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
|
-
$
|
14
|
-
$
|
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
|
-
$
|
21
|
-
$alpha: 1
|
32
|
+
$name
|
22
33
|
) {
|
23
|
-
$
|
24
|
-
|
25
|
-
|
26
|
-
|
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 $
|
37
|
-
$
|
40
|
+
@if type-of($_return) != color {
|
41
|
+
@warn "#{$name} is not a valid color option."
|
38
42
|
}
|
39
43
|
|
40
|
-
@return
|
44
|
+
@return $_return;
|
41
45
|
}
|
42
46
|
|
43
47
|
|
44
|
-
//
|
45
|
-
//
|
46
|
-
|
47
|
-
|
48
|
-
$
|
48
|
+
// Make Color
|
49
|
+
// ----------
|
50
|
+
// Create new colors based on existing colors
|
51
|
+
@function make-color(
|
52
|
+
$color
|
49
53
|
) {
|
50
|
-
$
|
51
|
-
$
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
$
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
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
|
-
|
63
|
-
|
64
|
-
|
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
|
-
|
67
|
-
|
75
|
+
$_return: _color-adjustments($_base, $_adjustments);
|
76
|
+
}
|
68
77
|
|
69
|
-
@return
|
78
|
+
@return $_return;
|
70
79
|
}
|
71
80
|
|
72
81
|
|
73
|
-
//
|
74
|
-
//
|
75
|
-
@function
|
76
|
-
$
|
82
|
+
// Color Get
|
83
|
+
// ---------
|
84
|
+
@function color-get(
|
85
|
+
$key
|
77
86
|
) {
|
78
|
-
$
|
79
|
-
|
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
|
-
|
92
|
-
|
93
|
-
|
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
|
-
$
|
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 $
|
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
|
11
|
+
// Fluid Media
|
13
12
|
// -----------
|
14
|
-
@mixin fluid-
|
15
|
-
$args:
|
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
|
-
$
|
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
|
-
$
|
65
|
+
$_return: map-merge($fluid-media, $args);
|
21
66
|
} @else {
|
22
67
|
@each $arg in $args {
|
23
68
|
@if type-of($arg) == map {
|
24
|
-
$
|
69
|
+
$_return: map-merge($_return, $arg);
|
25
70
|
} @else if type-of($arg) == string {
|
26
|
-
$
|
71
|
+
$_return: map-merge($_return, (children: $arg));
|
27
72
|
} @else if type-of($arg) == number {
|
28
73
|
@if unitless($arg) {
|
29
|
-
$
|
74
|
+
$_return: map-merge($_return, (ratio: $arg));
|
30
75
|
} @else {
|
31
|
-
$
|
76
|
+
$_return: map-merge($_return, (width: $arg));
|
32
77
|
}
|
33
78
|
}
|
34
79
|
}
|
35
80
|
}
|
36
81
|
|
37
|
-
|
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
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
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:
|
16
|
-
$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:
|
28
|
-
$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
|
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:
|
46
|
+
$fonts: $fonts
|
45
47
|
) {
|
46
48
|
$_output: _get-font-placeholders($fonts);
|
47
49
|
|
48
|
-
@
|
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:
|
61
|
-
$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(
|
101
|
-
$_weights: get(
|
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
|
-
$
|
138
|
-
$
|
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($
|
143
|
+
@if index($_styles, $item) {
|
146
144
|
$return: map-merge($return, (style: $item));
|
147
|
-
} @else if index($
|
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:
|
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:
|
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:
|
34
|
+
$icons: $icons
|
32
35
|
) {
|
33
36
|
@each $name, $value in $icons {
|
34
|
-
@if map-has-key(
|
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:
|
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
|
-
//
|
93
|
-
//
|
94
|
-
@mixin
|
95
|
-
$
|
92
|
+
// Render
|
93
|
+
// ------
|
94
|
+
@mixin render(
|
95
|
+
$css
|
96
96
|
) {
|
97
|
-
@each $
|
98
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
36
|
+
&:before, &:after {
|
37
37
|
content: $_before;
|
38
38
|
@content;
|
39
39
|
}
|
40
40
|
|
41
41
|
@if length($content) > 1 {
|
42
|
-
|
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
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
fourth
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
)
|
32
|
-
|
33
|
-
|
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
|
-
$
|
40
|
-
$
|
41
|
-
$ratio: get(ratio)
|
66
|
+
$size,
|
67
|
+
$unit: $rhythm-unit
|
42
68
|
) {
|
43
|
-
$
|
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
|
50
|
-
$
|
73
|
+
@if $unit == rem {
|
74
|
+
$size: rem($size);
|
51
75
|
}
|
52
76
|
|
53
|
-
@
|
54
|
-
|
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
|
-
|
18
|
-
|
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 $
|
27
|
+
@return $_return;
|
21
28
|
}
|
22
29
|
|
23
30
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
// Tooltips
|
2
2
|
// ========
|
3
3
|
|
4
|
-
|
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
|
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
|
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
|
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
|
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
|
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:
|
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
|
-
}
|