hanuman 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +21 -21
  3. data/README.md +175 -173
  4. data/_data/authors.yml +16 -0
  5. data/_data/navigation.yml +4 -4
  6. data/_includes/analytics.html +15 -15
  7. data/_includes/footer.html +65 -65
  8. data/_includes/head.html +68 -68
  9. data/_includes/header.html +58 -58
  10. data/_includes/metadata.json +30 -30
  11. data/_includes/styles.scss +727 -727
  12. data/_layouts/default.html +13 -13
  13. data/_layouts/page.html +16 -16
  14. data/_layouts/post.html +157 -153
  15. data/_sass/_syntax-highlighting.scss +65 -65
  16. data/_sass/bourbon/_bourbon-deprecated-upcoming.scss +8 -8
  17. data/_sass/bourbon/_bourbon.scss +79 -79
  18. data/_sass/bourbon/addons/_button.scss +374 -374
  19. data/_sass/bourbon/addons/_clearfix.scss +23 -23
  20. data/_sass/bourbon/addons/_directional-values.scss +111 -111
  21. data/_sass/bourbon/addons/_ellipsis.scss +7 -7
  22. data/_sass/bourbon/addons/_font-family.scss +5 -5
  23. data/_sass/bourbon/addons/_hide-text.scss +10 -10
  24. data/_sass/bourbon/addons/_html5-input-types.scss +86 -86
  25. data/_sass/bourbon/addons/_position.scss +32 -32
  26. data/_sass/bourbon/addons/_prefixer.scss +45 -45
  27. data/_sass/bourbon/addons/_retina-image.scss +31 -31
  28. data/_sass/bourbon/addons/_size.scss +16 -16
  29. data/_sass/bourbon/addons/_timing-functions.scss +32 -32
  30. data/_sass/bourbon/addons/_triangle.scss +83 -83
  31. data/_sass/bourbon/addons/_word-wrap.scss +8 -8
  32. data/_sass/bourbon/css3/_animation.scss +52 -52
  33. data/_sass/bourbon/css3/_appearance.scss +3 -3
  34. data/_sass/bourbon/css3/_backface-visibility.scss +6 -6
  35. data/_sass/bourbon/css3/_background-image.scss +42 -42
  36. data/_sass/bourbon/css3/_background.scss +55 -55
  37. data/_sass/bourbon/css3/_border-image.scss +59 -59
  38. data/_sass/bourbon/css3/_border-radius.scss +22 -22
  39. data/_sass/bourbon/css3/_box-sizing.scss +4 -4
  40. data/_sass/bourbon/css3/_calc.scss +4 -4
  41. data/_sass/bourbon/css3/_columns.scss +47 -47
  42. data/_sass/bourbon/css3/_filter.scss +5 -5
  43. data/_sass/bourbon/css3/_flex-box.scss +321 -321
  44. data/_sass/bourbon/css3/_font-face.scss +23 -23
  45. data/_sass/bourbon/css3/_font-feature-settings.scss +9 -9
  46. data/_sass/bourbon/css3/_hidpi-media-query.scss +10 -10
  47. data/_sass/bourbon/css3/_hyphens.scss +3 -3
  48. data/_sass/bourbon/css3/_image-rendering.scss +14 -14
  49. data/_sass/bourbon/css3/_keyframes.scss +35 -35
  50. data/_sass/bourbon/css3/_linear-gradient.scss +38 -38
  51. data/_sass/bourbon/css3/_perspective.scss +8 -8
  52. data/_sass/bourbon/css3/_placeholder.scss +8 -8
  53. data/_sass/bourbon/css3/_radial-gradient.scss +39 -39
  54. data/_sass/bourbon/css3/_transform.scss +15 -15
  55. data/_sass/bourbon/css3/_transition.scss +77 -77
  56. data/_sass/bourbon/css3/_user-select.scss +3 -3
  57. data/_sass/bourbon/functions/_assign.scss +10 -10
  58. data/_sass/bourbon/functions/_color-lightness.scss +13 -13
  59. data/_sass/bourbon/functions/_flex-grid.scss +38 -38
  60. data/_sass/bourbon/functions/_golden-ratio.scss +3 -3
  61. data/_sass/bourbon/functions/_grid-width.scss +13 -13
  62. data/_sass/bourbon/functions/_modular-scale.scss +66 -66
  63. data/_sass/bourbon/functions/_px-to-em.scss +13 -13
  64. data/_sass/bourbon/functions/_px-to-rem.scss +15 -15
  65. data/_sass/bourbon/functions/_strip-units.scss +5 -5
  66. data/_sass/bourbon/functions/_tint-shade.scss +9 -9
  67. data/_sass/bourbon/functions/_transition-property-name.scss +21 -21
  68. data/_sass/bourbon/functions/_unpack.scss +17 -17
  69. data/_sass/bourbon/helpers/_convert-units.scss +15 -15
  70. data/_sass/bourbon/helpers/_gradient-positions-parser.scss +13 -13
  71. data/_sass/bourbon/helpers/_is-num.scss +8 -8
  72. data/_sass/bourbon/helpers/_linear-angle-parser.scss +25 -25
  73. data/_sass/bourbon/helpers/_linear-gradient-parser.scss +41 -41
  74. data/_sass/bourbon/helpers/_linear-positions-parser.scss +61 -61
  75. data/_sass/bourbon/helpers/_linear-side-corner-parser.scss +31 -31
  76. data/_sass/bourbon/helpers/_radial-arg-parser.scss +69 -69
  77. data/_sass/bourbon/helpers/_radial-gradient-parser.scss +50 -50
  78. data/_sass/bourbon/helpers/_radial-positions-parser.scss +18 -18
  79. data/_sass/bourbon/helpers/_render-gradients.scss +26 -26
  80. data/_sass/bourbon/helpers/_shape-size-stripper.scss +10 -10
  81. data/_sass/bourbon/helpers/_str-to-num.scss +50 -50
  82. data/_sass/bourbon/settings/_asset-pipeline.scss +1 -1
  83. data/_sass/bourbon/settings/_prefixer.scss +6 -6
  84. data/_sass/bourbon/settings/_px-to-em.scss +1 -1
  85. metadata +4 -4
  86. data/_data/author.yml +0 -8
@@ -1,8 +1,8 @@
1
- //************************************************************************//
2
- // These mixins/functions are deprecated
3
- // They will be removed in the next MAJOR version release
4
- //************************************************************************//
5
- @mixin inline-block {
6
- display: inline-block;
7
- @warn "inline-block mixin is deprecated and will be removed in the next major version release";
8
- }
1
+ //************************************************************************//
2
+ // These mixins/functions are deprecated
3
+ // They will be removed in the next MAJOR version release
4
+ //************************************************************************//
5
+ @mixin inline-block {
6
+ display: inline-block;
7
+ @warn "inline-block mixin is deprecated and will be removed in the next major version release";
8
+ }
@@ -1,79 +1,79 @@
1
- // Settings
2
- @import "settings/prefixer";
3
- @import "settings/px-to-em";
4
- @import "settings/asset-pipeline";
5
-
6
- // Custom Helpers
7
- @import "helpers/convert-units";
8
- @import "helpers/gradient-positions-parser";
9
- @import "helpers/is-num";
10
- @import "helpers/linear-angle-parser";
11
- @import "helpers/linear-gradient-parser";
12
- @import "helpers/linear-positions-parser";
13
- @import "helpers/linear-side-corner-parser";
14
- @import "helpers/radial-arg-parser";
15
- @import "helpers/radial-positions-parser";
16
- @import "helpers/radial-gradient-parser";
17
- @import "helpers/render-gradients";
18
- @import "helpers/shape-size-stripper";
19
- @import "helpers/str-to-num";
20
-
21
- // Custom Functions
22
- @import "functions/assign";
23
- @import "functions/color-lightness";
24
- @import "functions/flex-grid";
25
- @import "functions/golden-ratio";
26
- @import "functions/grid-width";
27
- @import "functions/modular-scale";
28
- @import "functions/px-to-em";
29
- @import "functions/px-to-rem";
30
- @import "functions/strip-units";
31
- @import "functions/tint-shade";
32
- @import "functions/transition-property-name";
33
- @import "functions/unpack";
34
-
35
- // CSS3 Mixins
36
- @import "css3/animation";
37
- @import "css3/appearance";
38
- @import "css3/backface-visibility";
39
- @import "css3/background";
40
- @import "css3/background-image";
41
- @import "css3/border-image";
42
- @import "css3/border-radius";
43
- @import "css3/box-sizing";
44
- @import "css3/calc";
45
- @import "css3/columns";
46
- @import "css3/filter";
47
- @import "css3/flex-box";
48
- @import "css3/font-face";
49
- @import "css3/font-feature-settings";
50
- @import "css3/hyphens";
51
- @import "css3/hidpi-media-query";
52
- @import "css3/image-rendering";
53
- @import "css3/keyframes";
54
- @import "css3/linear-gradient";
55
- @import "css3/perspective";
56
- @import "css3/radial-gradient";
57
- @import "css3/transform";
58
- @import "css3/transition";
59
- @import "css3/user-select";
60
- @import "css3/placeholder";
61
-
62
- // Addons & other mixins
63
- @import "addons/button";
64
- @import "addons/clearfix";
65
- @import "addons/directional-values";
66
- @import "addons/ellipsis";
67
- @import "addons/font-family";
68
- @import "addons/hide-text";
69
- @import "addons/html5-input-types";
70
- @import "addons/position";
71
- @import "addons/prefixer";
72
- @import "addons/retina-image";
73
- @import "addons/size";
74
- @import "addons/timing-functions";
75
- @import "addons/triangle";
76
- @import "addons/word-wrap";
77
-
78
- // Soon to be deprecated Mixins
79
- @import "bourbon-deprecated-upcoming";
1
+ // Settings
2
+ @import "settings/prefixer";
3
+ @import "settings/px-to-em";
4
+ @import "settings/asset-pipeline";
5
+
6
+ // Custom Helpers
7
+ @import "helpers/convert-units";
8
+ @import "helpers/gradient-positions-parser";
9
+ @import "helpers/is-num";
10
+ @import "helpers/linear-angle-parser";
11
+ @import "helpers/linear-gradient-parser";
12
+ @import "helpers/linear-positions-parser";
13
+ @import "helpers/linear-side-corner-parser";
14
+ @import "helpers/radial-arg-parser";
15
+ @import "helpers/radial-positions-parser";
16
+ @import "helpers/radial-gradient-parser";
17
+ @import "helpers/render-gradients";
18
+ @import "helpers/shape-size-stripper";
19
+ @import "helpers/str-to-num";
20
+
21
+ // Custom Functions
22
+ @import "functions/assign";
23
+ @import "functions/color-lightness";
24
+ @import "functions/flex-grid";
25
+ @import "functions/golden-ratio";
26
+ @import "functions/grid-width";
27
+ @import "functions/modular-scale";
28
+ @import "functions/px-to-em";
29
+ @import "functions/px-to-rem";
30
+ @import "functions/strip-units";
31
+ @import "functions/tint-shade";
32
+ @import "functions/transition-property-name";
33
+ @import "functions/unpack";
34
+
35
+ // CSS3 Mixins
36
+ @import "css3/animation";
37
+ @import "css3/appearance";
38
+ @import "css3/backface-visibility";
39
+ @import "css3/background";
40
+ @import "css3/background-image";
41
+ @import "css3/border-image";
42
+ @import "css3/border-radius";
43
+ @import "css3/box-sizing";
44
+ @import "css3/calc";
45
+ @import "css3/columns";
46
+ @import "css3/filter";
47
+ @import "css3/flex-box";
48
+ @import "css3/font-face";
49
+ @import "css3/font-feature-settings";
50
+ @import "css3/hyphens";
51
+ @import "css3/hidpi-media-query";
52
+ @import "css3/image-rendering";
53
+ @import "css3/keyframes";
54
+ @import "css3/linear-gradient";
55
+ @import "css3/perspective";
56
+ @import "css3/radial-gradient";
57
+ @import "css3/transform";
58
+ @import "css3/transition";
59
+ @import "css3/user-select";
60
+ @import "css3/placeholder";
61
+
62
+ // Addons & other mixins
63
+ @import "addons/button";
64
+ @import "addons/clearfix";
65
+ @import "addons/directional-values";
66
+ @import "addons/ellipsis";
67
+ @import "addons/font-family";
68
+ @import "addons/hide-text";
69
+ @import "addons/html5-input-types";
70
+ @import "addons/position";
71
+ @import "addons/prefixer";
72
+ @import "addons/retina-image";
73
+ @import "addons/size";
74
+ @import "addons/timing-functions";
75
+ @import "addons/triangle";
76
+ @import "addons/word-wrap";
77
+
78
+ // Soon to be deprecated Mixins
79
+ @import "bourbon-deprecated-upcoming";
@@ -1,374 +1,374 @@
1
- @mixin button ($style: simple, $base-color: #4294f0, $text-size: inherit, $padding: 7px 18px) {
2
-
3
- @if type-of($style) == string and type-of($base-color) == color {
4
- @include buttonstyle($style, $base-color, $text-size, $padding);
5
- }
6
-
7
- @if type-of($style) == string and type-of($base-color) == number {
8
- $padding: $text-size;
9
- $text-size: $base-color;
10
- $base-color: #4294f0;
11
-
12
- @if $padding == inherit {
13
- $padding: 7px 18px;
14
- }
15
-
16
- @include buttonstyle($style, $base-color, $text-size, $padding);
17
- }
18
-
19
- @if type-of($style) == color and type-of($base-color) == color {
20
- $base-color: $style;
21
- $style: simple;
22
- @include buttonstyle($style, $base-color, $text-size, $padding);
23
- }
24
-
25
- @if type-of($style) == color and type-of($base-color) == number {
26
- $padding: $text-size;
27
- $text-size: $base-color;
28
- $base-color: $style;
29
- $style: simple;
30
-
31
- @if $padding == inherit {
32
- $padding: 7px 18px;
33
- }
34
-
35
- @include buttonstyle($style, $base-color, $text-size, $padding);
36
- }
37
-
38
- @if type-of($style) == number {
39
- $padding: $base-color;
40
- $text-size: $style;
41
- $base-color: #4294f0;
42
- $style: simple;
43
-
44
- @if $padding == #4294f0 {
45
- $padding: 7px 18px;
46
- }
47
-
48
- @include buttonstyle($style, $base-color, $text-size, $padding);
49
- }
50
-
51
- &:disabled {
52
- opacity: 0.5;
53
- cursor: not-allowed;
54
- }
55
- }
56
-
57
-
58
- // Selector Style Button
59
- //************************************************************************//
60
- @mixin buttonstyle($type, $b-color, $t-size, $pad) {
61
- // Grayscale button
62
- @if $type == simple and $b-color == grayscale($b-color) {
63
- @include simple($b-color, true, $t-size, $pad);
64
- }
65
-
66
- @if $type == shiny and $b-color == grayscale($b-color) {
67
- @include shiny($b-color, true, $t-size, $pad);
68
- }
69
-
70
- @if $type == pill and $b-color == grayscale($b-color) {
71
- @include pill($b-color, true, $t-size, $pad);
72
- }
73
-
74
- @if $type == flat and $b-color == grayscale($b-color) {
75
- @include flat($b-color, true, $t-size, $pad);
76
- }
77
-
78
- // Colored button
79
- @if $type == simple {
80
- @include simple($b-color, false, $t-size, $pad);
81
- }
82
-
83
- @else if $type == shiny {
84
- @include shiny($b-color, false, $t-size, $pad);
85
- }
86
-
87
- @else if $type == pill {
88
- @include pill($b-color, false, $t-size, $pad);
89
- }
90
-
91
- @else if $type == flat {
92
- @include flat($b-color, false, $t-size, $pad);
93
- }
94
- }
95
-
96
-
97
- // Simple Button
98
- //************************************************************************//
99
- @mixin simple($base-color, $grayscale: false, $textsize: inherit, $padding: 7px 18px) {
100
- $color: hsl(0, 0, 100%);
101
- $border: adjust-color($base-color, $saturation: 9%, $lightness: -14%);
102
- $inset-shadow: adjust-color($base-color, $saturation: -8%, $lightness: 15%);
103
- $stop-gradient: adjust-color($base-color, $saturation: 9%, $lightness: -11%);
104
- $text-shadow: adjust-color($base-color, $saturation: 15%, $lightness: -18%);
105
-
106
- @if is-light($base-color) {
107
- $color: hsl(0, 0, 20%);
108
- $text-shadow: adjust-color($base-color, $saturation: 10%, $lightness: 4%);
109
- }
110
-
111
- @if $grayscale == true {
112
- $border: grayscale($border);
113
- $inset-shadow: grayscale($inset-shadow);
114
- $stop-gradient: grayscale($stop-gradient);
115
- $text-shadow: grayscale($text-shadow);
116
- }
117
-
118
- border: 1px solid $border;
119
- border-radius: 3px;
120
- box-shadow: inset 0 1px 0 0 $inset-shadow;
121
- color: $color;
122
- display: inline-block;
123
- font-size: $textsize;
124
- font-weight: bold;
125
- @include linear-gradient ($base-color, $stop-gradient);
126
- padding: $padding;
127
- text-decoration: none;
128
- text-shadow: 0 1px 0 $text-shadow;
129
- background-clip: padding-box;
130
-
131
- &:hover:not(:disabled) {
132
- $base-color-hover: adjust-color($base-color, $saturation: -4%, $lightness: -5%);
133
- $inset-shadow-hover: adjust-color($base-color, $saturation: -7%, $lightness: 5%);
134
- $stop-gradient-hover: adjust-color($base-color, $saturation: 8%, $lightness: -14%);
135
-
136
- @if $grayscale == true {
137
- $base-color-hover: grayscale($base-color-hover);
138
- $inset-shadow-hover: grayscale($inset-shadow-hover);
139
- $stop-gradient-hover: grayscale($stop-gradient-hover);
140
- }
141
-
142
- box-shadow: inset 0 1px 0 0 $inset-shadow-hover;
143
- cursor: pointer;
144
- @include linear-gradient ($base-color-hover, $stop-gradient-hover);
145
- }
146
-
147
- &:active:not(:disabled),
148
- &:focus:not(:disabled) {
149
- $border-active: adjust-color($base-color, $saturation: 9%, $lightness: -14%);
150
- $inset-shadow-active: adjust-color($base-color, $saturation: 7%, $lightness: -17%);
151
-
152
- @if $grayscale == true {
153
- $border-active: grayscale($border-active);
154
- $inset-shadow-active: grayscale($inset-shadow-active);
155
- }
156
-
157
- border: 1px solid $border-active;
158
- box-shadow: inset 0 0 8px 4px $inset-shadow-active, inset 0 0 8px 4px $inset-shadow-active;
159
- }
160
- }
161
-
162
-
163
- // Shiny Button
164
- //************************************************************************//
165
- @mixin shiny($base-color, $grayscale: false, $textsize: inherit, $padding: 7px 18px) {
166
- $color: hsl(0, 0, 100%);
167
- $border: adjust-color($base-color, $red: -117, $green: -111, $blue: -81);
168
- $border-bottom: adjust-color($base-color, $red: -126, $green: -127, $blue: -122);
169
- $fourth-stop: adjust-color($base-color, $red: -79, $green: -70, $blue: -46);
170
- $inset-shadow: adjust-color($base-color, $red: 37, $green: 29, $blue: 12);
171
- $second-stop: adjust-color($base-color, $red: -56, $green: -50, $blue: -33);
172
- $text-shadow: adjust-color($base-color, $red: -140, $green: -141, $blue: -114);
173
- $third-stop: adjust-color($base-color, $red: -86, $green: -75, $blue: -48);
174
-
175
- @if is-light($base-color) {
176
- $color: hsl(0, 0, 20%);
177
- $text-shadow: adjust-color($base-color, $saturation: 10%, $lightness: 4%);
178
- }
179
-
180
- @if $grayscale == true {
181
- $border: grayscale($border);
182
- $border-bottom: grayscale($border-bottom);
183
- $fourth-stop: grayscale($fourth-stop);
184
- $inset-shadow: grayscale($inset-shadow);
185
- $second-stop: grayscale($second-stop);
186
- $text-shadow: grayscale($text-shadow);
187
- $third-stop: grayscale($third-stop);
188
- }
189
-
190
- border: 1px solid $border;
191
- border-bottom: 1px solid $border-bottom;
192
- border-radius: 5px;
193
- box-shadow: inset 0 1px 0 0 $inset-shadow;
194
- color: $color;
195
- display: inline-block;
196
- font-size: $textsize;
197
- font-weight: bold;
198
- @include linear-gradient(top, $base-color 0%, $second-stop 50%, $third-stop 50%, $fourth-stop 100%);
199
- padding: $padding;
200
- text-align: center;
201
- text-decoration: none;
202
- text-shadow: 0 -1px 1px $text-shadow;
203
-
204
- &:hover:not(:disabled) {
205
- $first-stop-hover: adjust-color($base-color, $red: -13, $green: -15, $blue: -18);
206
- $second-stop-hover: adjust-color($base-color, $red: -66, $green: -62, $blue: -51);
207
- $third-stop-hover: adjust-color($base-color, $red: -93, $green: -85, $blue: -66);
208
- $fourth-stop-hover: adjust-color($base-color, $red: -86, $green: -80, $blue: -63);
209
-
210
- @if $grayscale == true {
211
- $first-stop-hover: grayscale($first-stop-hover);
212
- $second-stop-hover: grayscale($second-stop-hover);
213
- $third-stop-hover: grayscale($third-stop-hover);
214
- $fourth-stop-hover: grayscale($fourth-stop-hover);
215
- }
216
-
217
- cursor: pointer;
218
- @include linear-gradient(top, $first-stop-hover 0%,
219
- $second-stop-hover 50%,
220
- $third-stop-hover 50%,
221
- $fourth-stop-hover 100%);
222
- }
223
-
224
- &:active:not(:disabled),
225
- &:focus:not(:disabled) {
226
- $inset-shadow-active: adjust-color($base-color, $red: -111, $green: -116, $blue: -122);
227
-
228
- @if $grayscale == true {
229
- $inset-shadow-active: grayscale($inset-shadow-active);
230
- }
231
-
232
- box-shadow: inset 0 0 20px 0 $inset-shadow-active;
233
- }
234
- }
235
-
236
-
237
- // Pill Button
238
- //************************************************************************//
239
- @mixin pill($base-color, $grayscale: false, $textsize: inherit, $padding: 7px 18px) {
240
- $color: hsl(0, 0, 100%);
241
- $border-bottom: adjust-color($base-color, $hue: 8, $saturation: -11%, $lightness: -26%);
242
- $border-sides: adjust-color($base-color, $hue: 4, $saturation: -21%, $lightness: -21%);
243
- $border-top: adjust-color($base-color, $hue: -1, $saturation: -30%, $lightness: -15%);
244
- $inset-shadow: adjust-color($base-color, $hue: -1, $saturation: -1%, $lightness: 7%);
245
- $stop-gradient: adjust-color($base-color, $hue: 8, $saturation: 14%, $lightness: -10%);
246
- $text-shadow: adjust-color($base-color, $hue: 5, $saturation: -19%, $lightness: -15%);
247
-
248
- @if is-light($base-color) {
249
- $color: hsl(0, 0, 20%);
250
- $text-shadow: adjust-color($base-color, $saturation: 10%, $lightness: 4%);
251
- }
252
-
253
- @if $grayscale == true {
254
- $border-bottom: grayscale($border-bottom);
255
- $border-sides: grayscale($border-sides);
256
- $border-top: grayscale($border-top);
257
- $inset-shadow: grayscale($inset-shadow);
258
- $stop-gradient: grayscale($stop-gradient);
259
- $text-shadow: grayscale($text-shadow);
260
- }
261
-
262
- border: 1px solid $border-top;
263
- border-color: $border-top $border-sides $border-bottom;
264
- border-radius: 16px;
265
- box-shadow: inset 0 1px 0 0 $inset-shadow;
266
- color: $color;
267
- display: inline-block;
268
- font-size: $textsize;
269
- font-weight: normal;
270
- line-height: 1;
271
- @include linear-gradient ($base-color, $stop-gradient);
272
- padding: $padding;
273
- text-align: center;
274
- text-decoration: none;
275
- text-shadow: 0 -1px 1px $text-shadow;
276
- background-clip: padding-box;
277
-
278
- &:hover:not(:disabled) {
279
- $base-color-hover: adjust-color($base-color, $lightness: -4.5%);
280
- $border-bottom: adjust-color($base-color, $hue: 8, $saturation: 13.5%, $lightness: -32%);
281
- $border-sides: adjust-color($base-color, $hue: 4, $saturation: -2%, $lightness: -27%);
282
- $border-top: adjust-color($base-color, $hue: -1, $saturation: -17%, $lightness: -21%);
283
- $inset-shadow-hover: adjust-color($base-color, $saturation: -1%, $lightness: 3%);
284
- $stop-gradient-hover: adjust-color($base-color, $hue: 8, $saturation: -4%, $lightness: -15.5%);
285
- $text-shadow-hover: adjust-color($base-color, $hue: 5, $saturation: -5%, $lightness: -22%);
286
-
287
- @if $grayscale == true {
288
- $base-color-hover: grayscale($base-color-hover);
289
- $border-bottom: grayscale($border-bottom);
290
- $border-sides: grayscale($border-sides);
291
- $border-top: grayscale($border-top);
292
- $inset-shadow-hover: grayscale($inset-shadow-hover);
293
- $stop-gradient-hover: grayscale($stop-gradient-hover);
294
- $text-shadow-hover: grayscale($text-shadow-hover);
295
- }
296
-
297
- border: 1px solid $border-top;
298
- border-color: $border-top $border-sides $border-bottom;
299
- box-shadow: inset 0 1px 0 0 $inset-shadow-hover;
300
- cursor: pointer;
301
- @include linear-gradient ($base-color-hover, $stop-gradient-hover);
302
- text-shadow: 0 -1px 1px $text-shadow-hover;
303
- background-clip: padding-box;
304
- }
305
-
306
- &:active:not(:disabled),
307
- &:focus:not(:disabled) {
308
- $active-color: adjust-color($base-color, $hue: 4, $saturation: -12%, $lightness: -10%);
309
- $border-active: adjust-color($base-color, $hue: 6, $saturation: -2.5%, $lightness: -30%);
310
- $border-bottom-active: adjust-color($base-color, $hue: 11, $saturation: 6%, $lightness: -31%);
311
- $inset-shadow-active: adjust-color($base-color, $hue: 9, $saturation: 2%, $lightness: -21.5%);
312
- $text-shadow-active: adjust-color($base-color, $hue: 5, $saturation: -12%, $lightness: -21.5%);
313
-
314
- @if $grayscale == true {
315
- $active-color: grayscale($active-color);
316
- $border-active: grayscale($border-active);
317
- $border-bottom-active: grayscale($border-bottom-active);
318
- $inset-shadow-active: grayscale($inset-shadow-active);
319
- $text-shadow-active: grayscale($text-shadow-active);
320
- }
321
-
322
- background: $active-color;
323
- border: 1px solid $border-active;
324
- border-bottom: 1px solid $border-bottom-active;
325
- box-shadow: inset 0 0 6px 3px $inset-shadow-active;
326
- text-shadow: 0 -1px 1px $text-shadow-active;
327
- }
328
- }
329
-
330
-
331
-
332
- // Flat Button
333
- //************************************************************************//
334
- @mixin flat($base-color, $grayscale: false, $textsize: inherit, $padding: 7px 18px) {
335
- $color: hsl(0, 0, 100%);
336
-
337
- @if is-light($base-color) {
338
- $color: hsl(0, 0, 20%);
339
- }
340
-
341
- background-color: $base-color;
342
- border-radius: 3px;
343
- border: none;
344
- color: $color;
345
- display: inline-block;
346
- font-size: inherit;
347
- font-weight: bold;
348
- padding: 7px 18px;
349
- text-decoration: none;
350
- background-clip: padding-box;
351
-
352
- &:hover:not(:disabled){
353
- $base-color-hover: adjust-color($base-color, $saturation: 4%, $lightness: 5%);
354
-
355
- @if $grayscale == true {
356
- $base-color-hover: grayscale($base-color-hover);
357
- }
358
-
359
- background-color: $base-color-hover;
360
- cursor: pointer;
361
- }
362
-
363
- &:active:not(:disabled),
364
- &:focus:not(:disabled) {
365
- $base-color-active: adjust-color($base-color, $saturation: -4%, $lightness: -5%);
366
-
367
- @if $grayscale == true {
368
- $base-color-active: grayscale($base-color-active);
369
- }
370
-
371
- background-color: $base-color-active;
372
- cursor: pointer;
373
- }
374
- }
1
+ @mixin button ($style: simple, $base-color: #4294f0, $text-size: inherit, $padding: 7px 18px) {
2
+
3
+ @if type-of($style) == string and type-of($base-color) == color {
4
+ @include buttonstyle($style, $base-color, $text-size, $padding);
5
+ }
6
+
7
+ @if type-of($style) == string and type-of($base-color) == number {
8
+ $padding: $text-size;
9
+ $text-size: $base-color;
10
+ $base-color: #4294f0;
11
+
12
+ @if $padding == inherit {
13
+ $padding: 7px 18px;
14
+ }
15
+
16
+ @include buttonstyle($style, $base-color, $text-size, $padding);
17
+ }
18
+
19
+ @if type-of($style) == color and type-of($base-color) == color {
20
+ $base-color: $style;
21
+ $style: simple;
22
+ @include buttonstyle($style, $base-color, $text-size, $padding);
23
+ }
24
+
25
+ @if type-of($style) == color and type-of($base-color) == number {
26
+ $padding: $text-size;
27
+ $text-size: $base-color;
28
+ $base-color: $style;
29
+ $style: simple;
30
+
31
+ @if $padding == inherit {
32
+ $padding: 7px 18px;
33
+ }
34
+
35
+ @include buttonstyle($style, $base-color, $text-size, $padding);
36
+ }
37
+
38
+ @if type-of($style) == number {
39
+ $padding: $base-color;
40
+ $text-size: $style;
41
+ $base-color: #4294f0;
42
+ $style: simple;
43
+
44
+ @if $padding == #4294f0 {
45
+ $padding: 7px 18px;
46
+ }
47
+
48
+ @include buttonstyle($style, $base-color, $text-size, $padding);
49
+ }
50
+
51
+ &:disabled {
52
+ opacity: 0.5;
53
+ cursor: not-allowed;
54
+ }
55
+ }
56
+
57
+
58
+ // Selector Style Button
59
+ //************************************************************************//
60
+ @mixin buttonstyle($type, $b-color, $t-size, $pad) {
61
+ // Grayscale button
62
+ @if $type == simple and $b-color == grayscale($b-color) {
63
+ @include simple($b-color, true, $t-size, $pad);
64
+ }
65
+
66
+ @if $type == shiny and $b-color == grayscale($b-color) {
67
+ @include shiny($b-color, true, $t-size, $pad);
68
+ }
69
+
70
+ @if $type == pill and $b-color == grayscale($b-color) {
71
+ @include pill($b-color, true, $t-size, $pad);
72
+ }
73
+
74
+ @if $type == flat and $b-color == grayscale($b-color) {
75
+ @include flat($b-color, true, $t-size, $pad);
76
+ }
77
+
78
+ // Colored button
79
+ @if $type == simple {
80
+ @include simple($b-color, false, $t-size, $pad);
81
+ }
82
+
83
+ @else if $type == shiny {
84
+ @include shiny($b-color, false, $t-size, $pad);
85
+ }
86
+
87
+ @else if $type == pill {
88
+ @include pill($b-color, false, $t-size, $pad);
89
+ }
90
+
91
+ @else if $type == flat {
92
+ @include flat($b-color, false, $t-size, $pad);
93
+ }
94
+ }
95
+
96
+
97
+ // Simple Button
98
+ //************************************************************************//
99
+ @mixin simple($base-color, $grayscale: false, $textsize: inherit, $padding: 7px 18px) {
100
+ $color: hsl(0, 0, 100%);
101
+ $border: adjust-color($base-color, $saturation: 9%, $lightness: -14%);
102
+ $inset-shadow: adjust-color($base-color, $saturation: -8%, $lightness: 15%);
103
+ $stop-gradient: adjust-color($base-color, $saturation: 9%, $lightness: -11%);
104
+ $text-shadow: adjust-color($base-color, $saturation: 15%, $lightness: -18%);
105
+
106
+ @if is-light($base-color) {
107
+ $color: hsl(0, 0, 20%);
108
+ $text-shadow: adjust-color($base-color, $saturation: 10%, $lightness: 4%);
109
+ }
110
+
111
+ @if $grayscale == true {
112
+ $border: grayscale($border);
113
+ $inset-shadow: grayscale($inset-shadow);
114
+ $stop-gradient: grayscale($stop-gradient);
115
+ $text-shadow: grayscale($text-shadow);
116
+ }
117
+
118
+ border: 1px solid $border;
119
+ border-radius: 3px;
120
+ box-shadow: inset 0 1px 0 0 $inset-shadow;
121
+ color: $color;
122
+ display: inline-block;
123
+ font-size: $textsize;
124
+ font-weight: bold;
125
+ @include linear-gradient ($base-color, $stop-gradient);
126
+ padding: $padding;
127
+ text-decoration: none;
128
+ text-shadow: 0 1px 0 $text-shadow;
129
+ background-clip: padding-box;
130
+
131
+ &:hover:not(:disabled) {
132
+ $base-color-hover: adjust-color($base-color, $saturation: -4%, $lightness: -5%);
133
+ $inset-shadow-hover: adjust-color($base-color, $saturation: -7%, $lightness: 5%);
134
+ $stop-gradient-hover: adjust-color($base-color, $saturation: 8%, $lightness: -14%);
135
+
136
+ @if $grayscale == true {
137
+ $base-color-hover: grayscale($base-color-hover);
138
+ $inset-shadow-hover: grayscale($inset-shadow-hover);
139
+ $stop-gradient-hover: grayscale($stop-gradient-hover);
140
+ }
141
+
142
+ box-shadow: inset 0 1px 0 0 $inset-shadow-hover;
143
+ cursor: pointer;
144
+ @include linear-gradient ($base-color-hover, $stop-gradient-hover);
145
+ }
146
+
147
+ &:active:not(:disabled),
148
+ &:focus:not(:disabled) {
149
+ $border-active: adjust-color($base-color, $saturation: 9%, $lightness: -14%);
150
+ $inset-shadow-active: adjust-color($base-color, $saturation: 7%, $lightness: -17%);
151
+
152
+ @if $grayscale == true {
153
+ $border-active: grayscale($border-active);
154
+ $inset-shadow-active: grayscale($inset-shadow-active);
155
+ }
156
+
157
+ border: 1px solid $border-active;
158
+ box-shadow: inset 0 0 8px 4px $inset-shadow-active, inset 0 0 8px 4px $inset-shadow-active;
159
+ }
160
+ }
161
+
162
+
163
+ // Shiny Button
164
+ //************************************************************************//
165
+ @mixin shiny($base-color, $grayscale: false, $textsize: inherit, $padding: 7px 18px) {
166
+ $color: hsl(0, 0, 100%);
167
+ $border: adjust-color($base-color, $red: -117, $green: -111, $blue: -81);
168
+ $border-bottom: adjust-color($base-color, $red: -126, $green: -127, $blue: -122);
169
+ $fourth-stop: adjust-color($base-color, $red: -79, $green: -70, $blue: -46);
170
+ $inset-shadow: adjust-color($base-color, $red: 37, $green: 29, $blue: 12);
171
+ $second-stop: adjust-color($base-color, $red: -56, $green: -50, $blue: -33);
172
+ $text-shadow: adjust-color($base-color, $red: -140, $green: -141, $blue: -114);
173
+ $third-stop: adjust-color($base-color, $red: -86, $green: -75, $blue: -48);
174
+
175
+ @if is-light($base-color) {
176
+ $color: hsl(0, 0, 20%);
177
+ $text-shadow: adjust-color($base-color, $saturation: 10%, $lightness: 4%);
178
+ }
179
+
180
+ @if $grayscale == true {
181
+ $border: grayscale($border);
182
+ $border-bottom: grayscale($border-bottom);
183
+ $fourth-stop: grayscale($fourth-stop);
184
+ $inset-shadow: grayscale($inset-shadow);
185
+ $second-stop: grayscale($second-stop);
186
+ $text-shadow: grayscale($text-shadow);
187
+ $third-stop: grayscale($third-stop);
188
+ }
189
+
190
+ border: 1px solid $border;
191
+ border-bottom: 1px solid $border-bottom;
192
+ border-radius: 5px;
193
+ box-shadow: inset 0 1px 0 0 $inset-shadow;
194
+ color: $color;
195
+ display: inline-block;
196
+ font-size: $textsize;
197
+ font-weight: bold;
198
+ @include linear-gradient(top, $base-color 0%, $second-stop 50%, $third-stop 50%, $fourth-stop 100%);
199
+ padding: $padding;
200
+ text-align: center;
201
+ text-decoration: none;
202
+ text-shadow: 0 -1px 1px $text-shadow;
203
+
204
+ &:hover:not(:disabled) {
205
+ $first-stop-hover: adjust-color($base-color, $red: -13, $green: -15, $blue: -18);
206
+ $second-stop-hover: adjust-color($base-color, $red: -66, $green: -62, $blue: -51);
207
+ $third-stop-hover: adjust-color($base-color, $red: -93, $green: -85, $blue: -66);
208
+ $fourth-stop-hover: adjust-color($base-color, $red: -86, $green: -80, $blue: -63);
209
+
210
+ @if $grayscale == true {
211
+ $first-stop-hover: grayscale($first-stop-hover);
212
+ $second-stop-hover: grayscale($second-stop-hover);
213
+ $third-stop-hover: grayscale($third-stop-hover);
214
+ $fourth-stop-hover: grayscale($fourth-stop-hover);
215
+ }
216
+
217
+ cursor: pointer;
218
+ @include linear-gradient(top, $first-stop-hover 0%,
219
+ $second-stop-hover 50%,
220
+ $third-stop-hover 50%,
221
+ $fourth-stop-hover 100%);
222
+ }
223
+
224
+ &:active:not(:disabled),
225
+ &:focus:not(:disabled) {
226
+ $inset-shadow-active: adjust-color($base-color, $red: -111, $green: -116, $blue: -122);
227
+
228
+ @if $grayscale == true {
229
+ $inset-shadow-active: grayscale($inset-shadow-active);
230
+ }
231
+
232
+ box-shadow: inset 0 0 20px 0 $inset-shadow-active;
233
+ }
234
+ }
235
+
236
+
237
+ // Pill Button
238
+ //************************************************************************//
239
+ @mixin pill($base-color, $grayscale: false, $textsize: inherit, $padding: 7px 18px) {
240
+ $color: hsl(0, 0, 100%);
241
+ $border-bottom: adjust-color($base-color, $hue: 8, $saturation: -11%, $lightness: -26%);
242
+ $border-sides: adjust-color($base-color, $hue: 4, $saturation: -21%, $lightness: -21%);
243
+ $border-top: adjust-color($base-color, $hue: -1, $saturation: -30%, $lightness: -15%);
244
+ $inset-shadow: adjust-color($base-color, $hue: -1, $saturation: -1%, $lightness: 7%);
245
+ $stop-gradient: adjust-color($base-color, $hue: 8, $saturation: 14%, $lightness: -10%);
246
+ $text-shadow: adjust-color($base-color, $hue: 5, $saturation: -19%, $lightness: -15%);
247
+
248
+ @if is-light($base-color) {
249
+ $color: hsl(0, 0, 20%);
250
+ $text-shadow: adjust-color($base-color, $saturation: 10%, $lightness: 4%);
251
+ }
252
+
253
+ @if $grayscale == true {
254
+ $border-bottom: grayscale($border-bottom);
255
+ $border-sides: grayscale($border-sides);
256
+ $border-top: grayscale($border-top);
257
+ $inset-shadow: grayscale($inset-shadow);
258
+ $stop-gradient: grayscale($stop-gradient);
259
+ $text-shadow: grayscale($text-shadow);
260
+ }
261
+
262
+ border: 1px solid $border-top;
263
+ border-color: $border-top $border-sides $border-bottom;
264
+ border-radius: 16px;
265
+ box-shadow: inset 0 1px 0 0 $inset-shadow;
266
+ color: $color;
267
+ display: inline-block;
268
+ font-size: $textsize;
269
+ font-weight: normal;
270
+ line-height: 1;
271
+ @include linear-gradient ($base-color, $stop-gradient);
272
+ padding: $padding;
273
+ text-align: center;
274
+ text-decoration: none;
275
+ text-shadow: 0 -1px 1px $text-shadow;
276
+ background-clip: padding-box;
277
+
278
+ &:hover:not(:disabled) {
279
+ $base-color-hover: adjust-color($base-color, $lightness: -4.5%);
280
+ $border-bottom: adjust-color($base-color, $hue: 8, $saturation: 13.5%, $lightness: -32%);
281
+ $border-sides: adjust-color($base-color, $hue: 4, $saturation: -2%, $lightness: -27%);
282
+ $border-top: adjust-color($base-color, $hue: -1, $saturation: -17%, $lightness: -21%);
283
+ $inset-shadow-hover: adjust-color($base-color, $saturation: -1%, $lightness: 3%);
284
+ $stop-gradient-hover: adjust-color($base-color, $hue: 8, $saturation: -4%, $lightness: -15.5%);
285
+ $text-shadow-hover: adjust-color($base-color, $hue: 5, $saturation: -5%, $lightness: -22%);
286
+
287
+ @if $grayscale == true {
288
+ $base-color-hover: grayscale($base-color-hover);
289
+ $border-bottom: grayscale($border-bottom);
290
+ $border-sides: grayscale($border-sides);
291
+ $border-top: grayscale($border-top);
292
+ $inset-shadow-hover: grayscale($inset-shadow-hover);
293
+ $stop-gradient-hover: grayscale($stop-gradient-hover);
294
+ $text-shadow-hover: grayscale($text-shadow-hover);
295
+ }
296
+
297
+ border: 1px solid $border-top;
298
+ border-color: $border-top $border-sides $border-bottom;
299
+ box-shadow: inset 0 1px 0 0 $inset-shadow-hover;
300
+ cursor: pointer;
301
+ @include linear-gradient ($base-color-hover, $stop-gradient-hover);
302
+ text-shadow: 0 -1px 1px $text-shadow-hover;
303
+ background-clip: padding-box;
304
+ }
305
+
306
+ &:active:not(:disabled),
307
+ &:focus:not(:disabled) {
308
+ $active-color: adjust-color($base-color, $hue: 4, $saturation: -12%, $lightness: -10%);
309
+ $border-active: adjust-color($base-color, $hue: 6, $saturation: -2.5%, $lightness: -30%);
310
+ $border-bottom-active: adjust-color($base-color, $hue: 11, $saturation: 6%, $lightness: -31%);
311
+ $inset-shadow-active: adjust-color($base-color, $hue: 9, $saturation: 2%, $lightness: -21.5%);
312
+ $text-shadow-active: adjust-color($base-color, $hue: 5, $saturation: -12%, $lightness: -21.5%);
313
+
314
+ @if $grayscale == true {
315
+ $active-color: grayscale($active-color);
316
+ $border-active: grayscale($border-active);
317
+ $border-bottom-active: grayscale($border-bottom-active);
318
+ $inset-shadow-active: grayscale($inset-shadow-active);
319
+ $text-shadow-active: grayscale($text-shadow-active);
320
+ }
321
+
322
+ background: $active-color;
323
+ border: 1px solid $border-active;
324
+ border-bottom: 1px solid $border-bottom-active;
325
+ box-shadow: inset 0 0 6px 3px $inset-shadow-active;
326
+ text-shadow: 0 -1px 1px $text-shadow-active;
327
+ }
328
+ }
329
+
330
+
331
+
332
+ // Flat Button
333
+ //************************************************************************//
334
+ @mixin flat($base-color, $grayscale: false, $textsize: inherit, $padding: 7px 18px) {
335
+ $color: hsl(0, 0, 100%);
336
+
337
+ @if is-light($base-color) {
338
+ $color: hsl(0, 0, 20%);
339
+ }
340
+
341
+ background-color: $base-color;
342
+ border-radius: 3px;
343
+ border: none;
344
+ color: $color;
345
+ display: inline-block;
346
+ font-size: inherit;
347
+ font-weight: bold;
348
+ padding: 7px 18px;
349
+ text-decoration: none;
350
+ background-clip: padding-box;
351
+
352
+ &:hover:not(:disabled){
353
+ $base-color-hover: adjust-color($base-color, $saturation: 4%, $lightness: 5%);
354
+
355
+ @if $grayscale == true {
356
+ $base-color-hover: grayscale($base-color-hover);
357
+ }
358
+
359
+ background-color: $base-color-hover;
360
+ cursor: pointer;
361
+ }
362
+
363
+ &:active:not(:disabled),
364
+ &:focus:not(:disabled) {
365
+ $base-color-active: adjust-color($base-color, $saturation: -4%, $lightness: -5%);
366
+
367
+ @if $grayscale == true {
368
+ $base-color-active: grayscale($base-color-active);
369
+ }
370
+
371
+ background-color: $base-color-active;
372
+ cursor: pointer;
373
+ }
374
+ }