├── .gitignore ├── .npmignore ├── README.md ├── docs ├── css │ ├── prettify.css │ └── sandbox-min.css └── js │ └── script.js ├── package.json ├── LICENSE ├── dist └── typewriter.min.js ├── src └── typewriter.js └── index.html /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | docs/ 2 | node_modules/ 3 | index.html -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TypeWriter 2 | A small JS library to expressively render text. 3 | 4 | ## Installation 5 | ``` 6 | 7 | ``` 8 | 9 | ## Usage 10 | ``` 11 | const tw = new TypeWriter('#target'); 12 | 13 | tw.write('the quick brown ').newLine() 14 | .writeWords('fox jumps over', { class: 'angry'}).writeAll(' the lazy dog').wait(3000).eraseAll(); 15 | ``` 16 | 17 | ## Docs 18 | Check out the [TypeWriter documentation page](https://dlcnine.github.io/TypeWriter/) for details on its API. 19 | -------------------------------------------------------------------------------- /docs/css/prettify.css: -------------------------------------------------------------------------------- 1 | .pln { 2 | color: #464648; 3 | } 4 | 5 | .str { 6 | color: #004d88; 7 | } 8 | 9 | .kwd { 10 | color: #2d28d7; 11 | } 12 | 13 | .com { 14 | color: rgba(0, 0, 0, 0.3); 15 | } 16 | 17 | .typ { 18 | color: #79059c; 19 | } 20 | 21 | .lit { 22 | color: #8a0164 23 | } 24 | 25 | .clo,.opn,.pun { 26 | color: #000; 27 | } 28 | 29 | .tag { 30 | color: #008 31 | } 32 | 33 | .atn { 34 | color: #900047; 35 | } 36 | 37 | .atv { 38 | color: #004d88; 39 | } 40 | 41 | .dec,.var { 42 | color: #606 43 | } 44 | 45 | .fun { 46 | color: red 47 | } 48 | 49 | pre.prettyprint { 50 | font-size: 1.6rem; 51 | padding: 1.25em; 52 | border: none; 53 | } 54 | 55 | ol.linenums { 56 | margin-top: 0; 57 | margin-bottom: 0 58 | } 59 | 60 | li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8 { 61 | list-style-type: none 62 | } 63 | 64 | li.L1,li.L3,li.L5,li.L7,li.L9 { 65 | /*background: none;*/ 66 | } 67 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "typewriter", 3 | "version": "1.0.0", 4 | "description": "A small js library to expressively render text.", 5 | "main": "dist/typewriter.min.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "build": "npx babel src/typewriter.js -o dist/typewriter.min.js --presets=@babel/preset-env,minify" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/dlcNine/TypeWriter.git" 13 | }, 14 | "keywords": [ 15 | "typewriter", 16 | "expressive", 17 | "text", 18 | "js" 19 | ], 20 | "author": "dlcnine", 21 | "license": "MIT", 22 | "bugs": { 23 | "url": "https://github.com/dlcNine/TypeWriter/issues" 24 | }, 25 | "homepage": "https://github.com/dlcNine/TypeWriter#readme", 26 | "devDependencies": { 27 | "@babel/cli": "^7.2.3", 28 | "@babel/core": "^7.3.4", 29 | "@babel/polyfill": "^7.2.5", 30 | "@babel/preset-env": "^7.3.4", 31 | "babel-preset-minify": "^0.5.0", 32 | "sandbox-css": "^0.3.4" 33 | }, 34 | "dependencies": {} 35 | } 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Daniel Cross 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /docs/js/script.js: -------------------------------------------------------------------------------- 1 | const summary = new TypeWriter('#summary'); 2 | summary.wait(500).write('A small JS library to expressively render tetx.').wait(250).erase(5).write('text.'); 3 | 4 | const writeExample = new TypeWriter('#writeExample'); 5 | 6 | document.querySelector('#triggerWriteExample').addEventListener('click', function(){ 7 | if (!writeExample.methodQ.isRunning) { 8 | writeExample.eraseAll().write('The quick brown fox jumps over the lazy dog.'); 9 | writeExample.eraseAll().write('The quick brown fox jumps over the lazy dog.', {speed: 150, class: 'text-underline'}); 10 | } 11 | }); 12 | 13 | const writeWordsExample = new TypeWriter('#writeWordsExample'); 14 | 15 | document.querySelector('#triggerWriteWordsExample').addEventListener('click', function(){ 16 | if (!writeWordsExample.methodQ.isRunning) { 17 | writeWordsExample.eraseAll().writeWords('The quick brown fox jumps over the lazy dog.'); 18 | writeWordsExample.eraseAll().writeWords('The quick brown fox jumps over the lazy dog.', {speed: 300, class: 'text-underline'}); 19 | } 20 | }); 21 | 22 | const writeAllExample = new TypeWriter('#writeAllExample'); 23 | 24 | document.querySelector('#triggerWriteAllExample').addEventListener('click', function(){ 25 | if (!writeAllExample.methodQ.isRunning) { 26 | writeAllExample.eraseAll().writeAll('The quick brown fox jumps over the lazy dog.').wait(1000); 27 | writeAllExample.eraseAll().writeAll('The quick brown fox jumps over the lazy dog.', {speed: 300, class: 'text-underline'}); 28 | } 29 | }); 30 | 31 | const eraseExample = new TypeWriter('#eraseExample'); 32 | 33 | document.querySelector('#triggerEraseExample').addEventListener('click', function(){ 34 | if (!eraseExample.methodQ.isRunning) { 35 | eraseExample.eraseAll().write('The quick brown').write(' fox jumps over', {class: 'text-underline'}).write(' the lazy dog.').erase(35).wait(1000); 36 | eraseExample.eraseAll().wait(500).write('The quick brown').write(' fox jumps over', {class: 'text-underline'}).write(' the lazy dog.').erase(35, 150); 37 | } 38 | }); 39 | 40 | const eraseWordsExample = new TypeWriter('#eraseWordsExample'); 41 | 42 | document.querySelector('#triggerEraseWordsExample').addEventListener('click', function(){ 43 | if (!eraseWordsExample.methodQ.isRunning) { 44 | eraseWordsExample.eraseAll().write('The quick brown').write(' fox jumps over', {class: 'text-underline'}).write(' the lazy dog.').eraseWords(7).wait(500); 45 | eraseWordsExample.eraseAll().wait(500).write('The quick brown').write(' fox jumps over', {class: 'text-underline'}).write(' the lazy dog.').eraseWords(7, 500); 46 | } 47 | }); 48 | 49 | const eraseAllExample = new TypeWriter('#eraseAllExample'); 50 | 51 | document.querySelector('#triggerEraseAllExample').addEventListener('click', function(){ 52 | if (!eraseAllExample.methodQ.isRunning) { 53 | eraseAllExample.write(' The quick brown fox jumps over the lazy dog.').wait(500).eraseAll(); 54 | } 55 | }); 56 | 57 | const waitExample = new TypeWriter('#waitExample'); 58 | 59 | document.querySelector('#triggerWaitExample').addEventListener('click', function(){ 60 | if (!waitExample.methodQ.isRunning) { 61 | waitExample.eraseAll().write('The quick brown fox ').wait(1000).write('jumps over the lazy dog.'); 62 | } 63 | }); 64 | 65 | const newLineExample = new TypeWriter('#newLineExample'); 66 | 67 | document.querySelector('#triggerNewLineExample').addEventListener('click', function(){ 68 | if (!newLineExample.methodQ.isRunning) { 69 | newLineExample.eraseAll().write('The quick brown fox ').newLine().write('jumps over the lazy dog.'); 70 | } 71 | }); 72 | 73 | const setSpeedExample = new TypeWriter('#setSpeedExample'); 74 | 75 | document.querySelector('#triggerSetSpeedExample').addEventListener('click', function(){ 76 | if (!setSpeedExample.methodQ.isRunning) { 77 | setSpeedExample.eraseAll().write('The quick brown fox ').setSpeed(200).write('jumps over the lazy dog.').setSpeed(50); 78 | } 79 | }); 80 | 81 | function bodyColors(backgroundColor, color) { 82 | const body = document.querySelector('body'); 83 | body.style.backgroundColor = backgroundColor; 84 | body.style.color = color; 85 | } 86 | 87 | const callBackExample = new TypeWriter('#callBackExample'); 88 | 89 | document.querySelector('#triggerCallBackExample').addEventListener('click', function(){ 90 | if (!callBackExample.methodQ.isRunning) { 91 | callBackExample.eraseAll().write('How about a change of scenery?').wait(500).callBack(bodyColors, ['black', 'whitesmoke']).wait(500).write('...', {speed: 500}).write(' Okay, maybe not.').wait(500).callBack(bodyColors, ['rgb(250, 250, 250)', 'rgba(0, 0, 0, 0.8)']); 92 | } 93 | }); 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /dist/typewriter.min.js: -------------------------------------------------------------------------------- 1 | "use strict";function _toConsumableArray(a){return _arrayWithoutHoles(a)||_iterableToArray(a)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function _iterableToArray(a){if(Symbol.iterator in Object(a)||"[object Arguments]"===Object.prototype.toString.call(a))return Array.from(a)}function _arrayWithoutHoles(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b"),a=this.el.lastElementChild):a=this.el,this.intervalId=setInterval(function(){" "===b.charQ.peek()&&(a.innerHTML+=b.charQ.shift()),b.charQ.getLength()?a.innerHTML+=b.charQ.shift():(clearInterval(b.intervalId),b.intervalId=void 0,b.methodQ.isRunning=!1,b.runNextMethod())},e.speed||this.speed)}},{key:"runNextMethod",value:function a(){!this.methodQ.isRunning&&this.methodQ.getLength()&&(this.methodQ.isRunning=!0,this.methodQ.shift()())}},{key:"write",value:function d(a,b){var c=this;return a+""&&this.methodQ.push(function(){var d;(d=c.charQ).pushSpread.apply(d,_toConsumableArray(a+"")),c.runCharQ(b)}),this.runNextMethod(),this}},{key:"writeWords",value:function d(a,b){var c=this;return a+""&&this.methodQ.push(function(){for(var d,e=(a+"").split(" "),f=0;f`; 46 | target = this.el.lastElementChild; 47 | } 48 | else { 49 | target = this.el; 50 | } 51 | 52 | this.intervalId = setInterval(() => { 53 | if (this.charQ.peek() === ' ') { 54 | target.innerHTML += this.charQ.shift(); 55 | } 56 | 57 | if (this.charQ.getLength()) { 58 | target.innerHTML += this.charQ.shift(); 59 | } 60 | else { 61 | clearInterval(this.intervalId); 62 | this.intervalId = undefined; 63 | this.methodQ.isRunning = false; 64 | this.runNextMethod(); 65 | } 66 | 67 | }, options.speed || this.speed); 68 | } 69 | 70 | runNextMethod() { 71 | if (!this.methodQ.isRunning && this.methodQ.getLength()) { 72 | this.methodQ.isRunning = true; 73 | this.methodQ.shift()(); 74 | } 75 | } 76 | 77 | write(text, options) { 78 | if (String(text)) { 79 | this.methodQ.push(() => { 80 | this.charQ.pushSpread(...String(text)); 81 | this.runCharQ(options); 82 | }); 83 | } 84 | 85 | this.runNextMethod(); 86 | return this; 87 | } 88 | 89 | writeWords(text, options) { 90 | if (String(text)) { 91 | this.methodQ.push(() => { 92 | let words = String(text).split(' '); 93 | 94 | for (let index = 0; index < words.length - 1; index++) { 95 | words[index] = `${words[index]} `; 96 | } 97 | 98 | this.charQ.pushSpread(...words); 99 | this.runCharQ(options); 100 | }); 101 | } 102 | 103 | this.runNextMethod(); 104 | return this; 105 | } 106 | 107 | writeAll(text, options) { 108 | if (String(text)) { 109 | this.methodQ.push(() => { 110 | this.charQ.push(String(text)); 111 | this.runCharQ(options); 112 | }); 113 | } 114 | 115 | this.runNextMethod(); 116 | return this; 117 | } 118 | 119 | erase(amount, speed) { 120 | this.methodQ.push(() => { 121 | amount = Math.floor(Math.abs(amount)); 122 | 123 | if (speed) { 124 | speed = Math.floor(Math.abs(speed)); 125 | } 126 | 127 | this.intervalId = setInterval(() => { 128 | if (this.el.lastChild && amount) { 129 | if (!this.el.lastChild.textContent) { 130 | this.el.lastChild.remove(); 131 | } 132 | 133 | if (this.el.lastChild) { 134 | if (this.el.lastChild.textContent) { 135 | this.el.lastChild.textContent = this.el.lastChild.textContent.slice(0, -1); 136 | amount--; 137 | } 138 | 139 | if (amount && this.el.lastChild.textContent && this.el.lastChild.textContent[this.el.lastChild.textContent.length - 1] === ' ') { 140 | this.el.lastChild.textContent = this.el.lastChild.textContent.slice(0, -1); 141 | amount--; 142 | } 143 | } 144 | } 145 | else { 146 | clearInterval(this.intervalId); 147 | this.intervalId = undefined; 148 | this.methodQ.isRunning = false; 149 | this.runNextMethod(); 150 | } 151 | }, speed || this.speed); 152 | }); 153 | 154 | this.runNextMethod(); 155 | return this; 156 | } 157 | 158 | eraseWords(amount, speed) { 159 | this.methodQ.push(() => { 160 | amount = Math.floor(Math.abs(amount)); 161 | 162 | if (speed) { 163 | speed = Math.floor(Math.abs(speed)); 164 | } 165 | 166 | this.intervalId = setInterval(() => { 167 | if (this.el.lastChild && amount) { 168 | if (!this.el.lastChild.textContent) { 169 | this.el.lastChild.remove(); 170 | } 171 | 172 | if (this.el.lastChild) { 173 | if (this.el.lastChild.textContent) { 174 | this.el.lastChild.textContent = this.el.lastChild.textContent.trimEnd(); 175 | } 176 | 177 | if (this.el.lastChild.textContent) { 178 | const words = this.el.lastChild.textContent.split(' '); 179 | const lastWord = words[words.length - 1]; 180 | this.el.lastChild.textContent = this.el.lastChild.textContent.slice(0, -lastWord.length); 181 | amount--; 182 | } 183 | 184 | if (this.el.lastChild.textContent) { 185 | this.el.lastChild.textContent = this.el.lastChild.textContent.trimEnd(); 186 | } 187 | } 188 | } 189 | else { 190 | clearInterval(this.intervalId); 191 | this.intervalId = undefined; 192 | this.methodQ.isRunning = false; 193 | this.runNextMethod(); 194 | } 195 | }, speed || this.speed); 196 | }); 197 | 198 | this.runNextMethod(); 199 | return this; 200 | } 201 | 202 | eraseAll() { 203 | this.methodQ.push(() => { 204 | this.el.innerHTML = ''; 205 | this.methodQ.isRunning = false; 206 | this.runNextMethod(); 207 | }); 208 | 209 | this.runNextMethod(); 210 | return this; 211 | } 212 | 213 | wait(milliseconds) { 214 | this.methodQ.push(() => { 215 | setTimeout(() => { 216 | this.methodQ.isRunning = false; 217 | this.runNextMethod(); 218 | }, Math.floor(Math.abs(milliseconds))); 219 | }); 220 | 221 | this.runNextMethod(); 222 | return this; 223 | } 224 | 225 | newLine() { 226 | this.methodQ.push(() => { 227 | this.el.innerHTML += '
'; 228 | this.methodQ.isRunning = false; 229 | this.runNextMethod(); 230 | }); 231 | 232 | this.runNextMethod(); 233 | return this; 234 | } 235 | 236 | callBack(cb, args) { 237 | this.methodQ.push(() => { 238 | if (args) 239 | cb(...args); 240 | else 241 | cb(); 242 | 243 | this.methodQ.isRunning = false; 244 | this.runNextMethod(); 245 | }); 246 | 247 | this.runNextMethod(); 248 | return this; 249 | } 250 | 251 | setSpeed(speed) { 252 | this.methodQ.push(() => { 253 | this.speed = Math.floor(Math.abs(speed)); 254 | this.methodQ.isRunning = false; 255 | this.runNextMethod(); 256 | }); 257 | 258 | this.runNextMethod(); 259 | return this; 260 | } 261 | } 262 | 263 | return TypeWriter; 264 | })(); 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | TypeWriter | dlcnine 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |
17 |

TypeWriter

18 |

 

19 |
20 |

Installation

21 |
<script src="https://cdn.jsdelivr.net/gh/dlcnine/TypeWriter@1.0.0/dist/typewriter.min.js"></script>
22 |

Usage

23 |
const tw = new TypeWriter('#target');
 24 | 
 25 | tw.write('The quick brown fox').wait(500).newLine()
 26 | .writeWords(' jumped over the').wait(500).writeAll(' lazy dog.').wait(500).eraseAll();
 27 | 
28 |

API

29 |
30 |

new TypeWriter(cssSelector, speed)string, number(optional)

31 |

TypeWriter sets a default speed of 50, if the speed argument is not provided.

32 |
const tw = new TypeWriter('#target');
 33 | 
 34 | // or
 35 | 
 36 | const twCustomSpeed = new TypeWriter('#target2', 100);
37 |
38 |
39 |
40 |

.write(text, options)string, object(optional)

41 |

Renders the text one character at a time. The options object may set properties for speed and class. To use more than one class, sepearate each sequential class name with a space.

42 | 43 |

 

44 |
const writeExample = new TypeWriter('#writeExample');
 45 | 
 46 | // no options
 47 | writeExample.eraseAll().write('The quick brown fox jumps over the lazy dog.');
 48 | 
 49 | // options
 50 | writeExample.eraseAll().write('The quick brown fox jumps over the lazy dog.', {speed: 150, class: 'text-underline'});
 51 | 
52 |
53 |
54 |
55 |

.writeWords(text, options)string, object(optional)

56 |

Renders the text word by word. Internally words are split on single spaces, ' '. The options object may set properties for speed and class. To use more than one class, sepearate each sequential class name with a space.

57 | 58 |

 

59 |
const writeWordsExample = new TypeWriter('#writeWordsExample');
 60 | 
 61 | // no options
 62 | writeWordsExample.eraseAll().writeWords('The quick brown fox jumps over the lazy dog.');
 63 | 
 64 | // options
 65 | writeWordsExample.eraseAll().writeWords('The quick brown fox jumps over the lazy dog.', {speed: 300, class: 'text-underline'});
66 |
67 |
68 |
69 |

.writeAll(text, options)string, object(optional)

70 |

Renders the entire text at once. The options object may set properties for speed and class. To use more than one class, sepearate each sequential class name with a space.

71 | 72 |

 

73 |
const writeAllExample = new TypeWriter('#writeAllExample');
 74 | 
 75 | // no options
 76 | writeAllExample.eraseAll().writeAll('The quick brown fox jumps over the lazy dog.').wait(1000);
 77 | 
 78 | // options
 79 | writeAllExample.eraseAll().writeAll('The quick brown fox jumps over the lazy dog.', {speed: 300, class: 'text-underline'});
80 |
81 |
82 |
83 |

.erase(amount, speed)number, number(optional)

84 |

Removes the specified amount of characters from the target element. Erasing stops when there are no charcters left, or the amount has reached zero.

85 | 86 |

 

87 |
const eraseExample = new TypeWriter('#eraseExample');
 88 | 
 89 | // default speed
 90 | eraseExample.eraseAll().write('The quick brown').write(' fox jumps over', {class: 'text-underline'}).write(' the lazy dog.').erase(35).wait(1000);
 91 | 
 92 | // optional speed
 93 | eraseExample.eraseAll().wait(500).write('The quick brown').write(' fox jumps over', {class: 'text-underline'}).write(' the lazy dog.').erase(35, 150);
94 |
95 |
96 |
97 |

.eraseWords(amount, speed)number, number(optional)

98 |

Removes the specified amount of words from the target element. Before and after each word is removed, the end whitespace is trimmed.

99 | 100 |

 

101 |
const eraseWordsExample = new TypeWriter('#eraseWordsExample');
102 | 
103 | // default speed
104 | eraseWordsExample.eraseAll().write('The quick brown').write(' fox jumps over', {class: 'text-underline'}).write(' the lazy dog.').eraseWords(7).wait(500);
105 | 
106 | // optional speed
107 | eraseWordsExample.eraseAll().wait(500).write('The quick brown').write(' fox jumps over', {class: 'text-underline'}).write(' the lazy dog.').eraseWords(7, 500);
108 |
109 |
110 |
111 |

.eraseAll()

112 |

Removes all content from the target element.

113 | 114 |

 

115 |
const eraseAllExample = new TypeWriter('#eraseAllExample');
116 | 
117 | eraseAllExample.write(' The quick brown fox jumps over the lazy dog.').wait(500).eraseAll();
118 |
119 |
120 |
121 |

.wait(milliseconds)number

122 |

Waits n milliseconds before exeucting the next method.

123 | 124 |

 

125 |
const waitExample = new TypeWriter('#waitExample');
126 | 
127 | waitExample.eraseAll().write('The quick brown fox ').wait(1000).write('jumps over the lazy dog.');
128 |
129 |
130 |
131 |

.newLine()

132 |

Starts a new line.

133 | 134 |

 

135 |
const newLineExample = new TypeWriter('#newLineExample');
136 | 
137 | newLineExample.eraseAll().write('The quick brown fox ').newLine().write('jumps over the lazy dog.');
138 |
139 |
140 |
141 |

.setSpeed(speed)number

142 |

Set the default speed (in milliseconds).

143 | 144 |

 

145 |
const setSpeedExample = new TypeWriter('#setSpeedExample');
146 | 
147 | setSpeedExample.eraseAll().write('The quick brown fox ').setSpeed(200).write('jumps over the lazy dog.').setSpeed(50);
148 |
149 |
150 |
151 |

.callBack(cb, args)function, array(optional)

152 |

Pass in your own function definition to be executed. The args argument is an optional array of arguments to be spread and passed to your callback function.

153 | 154 | 155 |

 

156 |
function bodyColors(backgroundColor, color) {
157 |     const body = document.querySelector('body');
158 |     body.style.backgroundColor = backgroundColor;
159 |     body.style.color = color;
160 | }
161 | 
162 | const callBackExample = new TypeWriter('#callBackExample');
163 | 
164 | callBackExample.eraseAll().write('How about a change of scenery?').wait(500).callBack(bodyColors, ['black', 'whitesmoke']).wait(500).write('...', {speed: 500}).write(' Okay, maybe not.').wait(500).callBack(bodyColors, ['rgb(250, 250, 250)', 'rgba(0, 0, 0, 0.8)']);
165 |
166 |
167 |

- dlcnine -

168 |
169 |
170 | 171 | 172 | 173 | -------------------------------------------------------------------------------- /docs/css/sandbox-min.css: -------------------------------------------------------------------------------- 1 | a,abbr,address,area,article,aside,audio,b,base,bdi,bdo,blockquote,body,br,button,canvas,caption,cite,code,col,colgroup,datalist,dd,del,details,dfn,dialog,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hr,html,i,iframe,img,input,ins,kbd,label,legend,li,main,map,mark,menu,menuitem,meter,nav,noscript,object,ol,optgroup,option,output,p,param,picture,pre,progress,q,rp,rt,ruby,s,samp,section,select,small,span,strong,sub,summary,sup,table,tbody,td,textarea,tfoot,th,thead,time,tr,track,u,ul,var,video,wbr{margin:0;border:0;padding:0;font:inherit;font-size:100%;vertical-align:baseline}*,::before,::after{-webkit-box-sizing:border-box;box-sizing:border-box}article,aside,audio,canvas,details,embed,figcaption,figure,footer,header,main,meter,nav,picture,ruby,section,summary,video{display:block}bdi,datalist,mark,output,progress,rp,rt,time,wbr{display:inline}html{font-size:62.5%}body{line-height:1;background-color:#fafafa;font-family:"Times New Roman",serif;color:rgba(0,0,0,.8)}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote::before,blockquote::after,q::before,q::after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}b,strong{font-weight:bold}em{font-style:italic}sub{vertical-align:sub}sup{vertical-align:super}hr{border-top:.1rem solid #e6e6e6}h1{font-size:5.1rem}h2{font-size:2.8rem}h3{font-size:2.1rem}h4,p{font-size:1.6rem}h5{font-size:1.2rem}h6,small{font-size:.9rem}h1,h2{margin-bottom:2.4rem}h3,h4{margin-bottom:.5em}h5,h6{margin-bottom:.25em}p{line-height:1.5;margin-bottom:1em}a{color:inherit;text-decoration:none}a:focus{outline:none}.a{cursor:pointer;color:rgba(0,0,0,.8)}.a:hover,.a:focus{outline:none;text-decoration:underline}.a:visited{color:rgba(0,0,0,.55)}[class*=unit-]{padding:1.2rem}.clearfix::after{content:"";clear:both;display:block}.grid{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row wrap;flex-flow:row wrap;margin:-1.2rem}.grid.tight{margin:-0.6rem}.grid.tight [class*=unit-]{padding:.6rem}.unit-1{width:12.5%}.unit-2{width:25%}.unit-3{width:37.5%}.unit-4{width:50%}.unit-5{width:62.5%}.unit-6{width:75%}.unit-7{width:87.5%}.unit-8{width:100%}.push-1{margin-left:12.5%}.push-2{margin-left:25%}.push-3{margin-left:37.5%}.push-4{margin-left:50%}.push-5{margin-left:62.5%}.push-6{margin-left:75%}.push-7{margin-left:87.5%}.push-8{margin-left:100%}@media screen and (max-width: 48rem){.grid.tight.no-tight-sm{margin:-1.2rem}.grid.tight.no-tight-sm [class*=unit-]{padding:1.2rem}.grid.tight-sm{margin:-0.6rem}.grid.tight-sm [class*=unit-]{padding:.6rem}.unit-1-sm{width:12.5%}.unit-2-sm{width:25%}.unit-3-sm{width:37.5%}.unit-4-sm{width:50%}.unit-5-sm{width:62.5%}.unit-6-sm{width:75%}.unit-7-sm{width:87.5%}.unit-8-sm{width:100%}.push-1-sm{margin-left:12.5%}.push-2-sm{margin-left:25%}.push-3-sm{margin-left:37.5%}.push-4-sm{margin-left:50%}.push-5-sm{margin-left:62.5%}.push-6-sm{margin-left:75%}.push-7-sm{margin-left:87.5%}.push-8-sm{margin-left:100%}}@media screen and (min-width: 48.0625rem)and (max-width: 64rem){.grid.tight.no-tight-md{margin:-1.2rem}.grid.tight.no-tight-md [class*=unit-]{padding:1.2rem}.grid.tight-md{margin:-0.6rem}.grid.tight-md [class*=unit-]{padding:.6rem}.unit-1-md{width:12.5%}.unit-2-md{width:25%}.unit-3-md{width:37.5%}.unit-4-md{width:50%}.unit-5-md{width:62.5%}.unit-6-md{width:75%}.unit-7-md{width:87.5%}.unit-8-md{width:100%}.push-1-md{margin-left:12.5%}.push-2-md{margin-left:25%}.push-3-md{margin-left:37.5%}.push-4-md{margin-left:50%}.push-5-md{margin-left:62.5%}.push-6-md{margin-left:75%}.push-7-md{margin-left:87.5%}.push-8-md{margin-left:100%}}@media screen and (min-width: 64.0625rem){.grid.tight.no-tight-lg{margin:-1.2rem}.grid.tight.no-tight-lg [class*=unit-]{padding:1.2rem}.grid.tight-lg{margin:-0.6rem}.grid.tight-lg [class*=unit-]{padding:.6rem}.unit-1-lg{width:12.5%}.unit-2-lg{width:25%}.unit-3-lg{width:37.5%}.unit-4-lg{width:50%}.unit-5-lg{width:62.5%}.unit-6-lg{width:75%}.unit-7-lg{width:87.5%}.unit-8-lg{width:100%}.push-1-lg{margin-left:12.5%}.push-2-lg{margin-left:25%}.push-3-lg{margin-left:37.5%}.push-4-lg{margin-left:50%}.push-5-lg{margin-left:62.5%}.push-6-lg{margin-left:75%}.push-7-lg{margin-left:87.5%}.push-8-lg{margin-left:100%}}.left-top{left:0;top:0}.left-center{left:0;top:50%;-webkit-transform:translate(0%, -50%);transform:translate(0%, -50%)}.left-bottom{left:0;bottom:0}.center-top{left:50%;top:0;-webkit-transform:translate(-50%, 0);transform:translate(-50%, 0)}.center-center{left:50%;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.center-bottom{left:50%;bottom:0;-webkit-transform:translate(-50%, 0%);transform:translate(-50%, 0%)}.right-top{right:0;top:0}.right-center{right:0;top:50%;-webkit-transform:translate(0%, -50%);transform:translate(0%, -50%)}.right-bottom{right:0;bottom:0}.start{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.center{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.end{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.between{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.around{-ms-flex-pack:distribute;justify-content:space-around}.even{-webkit-box-pack:space-evenly;-ms-flex-pack:space-evenly;justify-content:space-evenly}.cross-start{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.cross-center{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.cross-end{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.cross-baseline{-webkit-box-align:baseline;-ms-flex-align:baseline;align-items:baseline}.cross-stretch{-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}.flex-wrap{-ms-flex-wrap:wrap;flex-wrap:wrap}@media screen and (max-width: 48rem){.order-1-sm{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.order-2-sm{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.order-3-sm{-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3}.order-4-sm{-webkit-box-ordinal-group:5;-ms-flex-order:4;order:4}}@media screen and (min-width: 48.0625rem)and (max-width: 64rem){.order-1-md{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.order-2-md{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.order-3-md{-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3}.order-4-md{-webkit-box-ordinal-group:5;-ms-flex-order:4;order:4}}@media screen and (min-width: 64.0625rem){.order-1-lg{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.order-2-lg{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.order-3-lg{-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3}.order-4-lg{-webkit-box-ordinal-group:5;-ms-flex-order:4;order:4}}.button:hover,.button.outlined:hover{border-color:#d8d8d8;background-color:#d8d8d8}.button:active,.button.outlined:active{border-color:#939393;background-color:#939393}.button:focus,.button.outlined:focus{-webkit-box-shadow:0 0 0 .125em rgba(84,171,247,.5);box-shadow:0 0 0 .125em rgba(84,171,247,.5)}.button{font-size:1.6rem;display:inline-block;text-align:center;line-height:1;padding:.375em .75em;border-width:.0625em;border-style:solid;border-radius:.125em;color:rgba(0,0,0,.8);margin-bottom:.75em;border-color:#c9c9c9;background-color:#c9c9c9;-webkit-transition:all 175ms;transition:all 175ms}.button:hover{cursor:pointer}.button:active,.button:focus{outline:none}.button.wide{display:block;width:100%}.button[disabled]{opacity:.5;pointer-events:none}.button:link{text-decoration:none}.button.primary:hover{border-color:#54abf7;background-color:#54abf7}.button.primary:active{border-color:#287ec9;background-color:#287ec9}.button.primary:focus{-webkit-box-shadow:0 0 0 .125em rgba(84,171,247,.5);box-shadow:0 0 0 .125em rgba(84,171,247,.5)}.button.info:hover{border-color:#62d648;background-color:#62d648}.button.info:active{border-color:#3f962a;background-color:#3f962a}.button.info:focus{-webkit-box-shadow:0 0 0 .125em rgba(98,214,72,.5);box-shadow:0 0 0 .125em rgba(98,214,72,.5)}.button.caution:hover{border-color:#f4f449;background-color:#f4f449}.button.caution:active{border-color:#6f6f10;background-color:#6f6f10}.button.caution:focus{-webkit-box-shadow:0 0 0 .125em rgba(244,244,73,.5);box-shadow:0 0 0 .125em rgba(244,244,73,.5)}.button.danger:hover{border-color:#f25541;background-color:#f25541}.button.danger:active{border-color:#c62c17;background-color:#c62c17}.button.danger:focus{-webkit-box-shadow:0 0 0 .125em rgba(242,85,65,.5);box-shadow:0 0 0 .125em rgba(242,85,65,.5)}.button.light:hover{border-color:#f9f9f9;background-color:#f9f9f9}.button.light:active{border-color:#e6e6e6;background-color:#e6e6e6}.button.light:focus{-webkit-box-shadow:0 0 0 .125em rgba(84,171,247,.5);box-shadow:0 0 0 .125em rgba(84,171,247,.5)}.button.dark:hover{border-color:#636363;background-color:#636363}.button.dark:active{border-color:#343434;background-color:#343434}.button.dark:focus{-webkit-box-shadow:0 0 0 .125em rgba(84,171,247,.5);box-shadow:0 0 0 .125em rgba(84,171,247,.5)}.code,.snippet{font-family:monospace;color:rgba(0,0,0,.8);background-color:#e6e6e6;border-radius:.25em}.code{font-size:1.6rem;line-height:1.25;overflow-x:auto;padding:1.25em;margin-bottom:1.5em}.snippet{display:inline-block;line-height:1;padding:.25em}.huge-1{font-size:6.7rem !important}.huge-2{font-size:5.1rem !important}.h1{font-size:3.8rem !important}.h2{font-size:2.8rem !important}.h3{font-size:2.1rem !important}.h4{font-size:1.6rem !important}.h5{font-size:1.2rem !important}.h6{font-size:.9rem !important}@media screen and (max-width: 48rem){.huge-1-sm{font-size:6.7rem !important}.huge-2-sm{font-size:5.1rem !important}.h1-sm{font-size:3.8rem !important}.h2-sm{font-size:2.8rem !important}.h3-sm{font-size:2.1rem !important}.h4-sm{font-size:1.6rem !important}.h5-sm{font-size:1.2rem !important}.h6-sm{font-size:.9rem !important}}@media screen and (min-width: 48.0625rem)and (max-width: 64rem){.huge-1-md{font-size:6.7rem !important}.huge-2-md{font-size:5.1rem !important}.h1-md{font-size:3.8rem !important}.h2-md{font-size:2.8rem !important}.h3-md{font-size:2.1rem !important}.h4-md{font-size:1.6rem !important}.h5-md{font-size:1.2rem !important}.h6-md{font-size:.9rem !important}}@media screen and (min-width: 64.0625rem){.huge-1-lg{font-size:6.7rem !important}.huge-2-lg{font-size:5.1rem !important}.h1-lg{font-size:3.8rem !important}.h2-lg{font-size:2.8rem !important}.h3-lg{font-size:2.1rem !important}.h4-lg{font-size:1.6rem !important}.h5-lg{font-size:1.2rem !important}.h6-lg{font-size:.9rem !important}}.m-half{margin:.6rem !important}.mt-half{margin-top:.6rem !important}.mb-half{margin-bottom:.6rem !important}.ml-half{margin-left:.6rem !important}.mr-half{margin-right:.6rem !important}.mx-half{margin-left:.6rem !important;margin-right:.6rem !important}.my-half{margin-top:.6rem !important;margin-bottom:.6rem !important}.m-1{margin:1.2rem !important}.mt-1{margin-top:1.2rem !important}.mb-1{margin-bottom:1.2rem !important}.ml-1{margin-left:1.2rem !important}.mr-1{margin-right:1.2rem !important}.mx-1{margin-left:1.2rem !important;margin-right:1.2rem !important}.my-1{margin-top:1.2rem !important;margin-bottom:1.2rem !important}.m-2{margin:2.4rem !important}.mt-2{margin-top:2.4rem !important}.mb-2{margin-bottom:2.4rem !important}.ml-2{margin-left:2.4rem !important}.mr-2{margin-right:2.4rem !important}.mx-2{margin-left:2.4rem !important;margin-right:2.4rem !important}.my-2{margin-top:2.4rem !important;margin-bottom:2.4rem !important}.m-3{margin:3.6rem !important}.mt-3{margin-top:3.6rem !important}.mb-3{margin-bottom:3.6rem !important}.ml-3{margin-left:3.6rem !important}.mr-3{margin-right:3.6rem !important}.mx-3{margin-left:3.6rem !important;margin-right:3.6rem !important}.my-3{margin-top:3.6rem !important;margin-bottom:3.6rem !important}.m-4{margin:4.8rem !important}.mt-4{margin-top:4.8rem !important}.mb-4{margin-bottom:4.8rem !important}.ml-4{margin-left:4.8rem !important}.mr-4{margin-right:4.8rem !important}.mx-4{margin-left:4.8rem !important;margin-right:4.8rem !important}.my-4{margin-top:4.8rem !important;margin-bottom:4.8rem !important}.m-5{margin:6rem !important}.mt-5{margin-top:6rem !important}.mb-5{margin-bottom:6rem !important}.ml-5{margin-left:6rem !important}.mr-5{margin-right:6rem !important}.mx-5{margin-left:6rem !important;margin-right:6rem !important}.my-5{margin-top:6rem !important;margin-bottom:6rem !important}.mx-auto{margin-left:auto !important;margin-right:auto !important}.p-half{padding:.6rem !important}.pt-half{padding-top:.6rem !important}.pb-half{padding-bottom:.6rem !important}.pl-half{padding-left:.6rem !important}.pr-half{padding-right:.6rem !important}.px-half{padding-left:.6rem !important;padding-right:.6rem !important}.py-half{padding-top:.6rem !important;padding-bottom:.6rem !important}.p-1{padding:1.2rem !important}.pt-1{padding-top:1.2rem !important}.pb-1{padding-bottom:1.2rem !important}.pl-1{padding-left:1.2rem !important}.pr-1{padding-right:1.2rem !important}.px-1{padding-left:1.2rem !important;padding-right:1.2rem !important}.py-1{padding-top:1.2rem !important;padding-bottom:1.2rem !important}.p-2{padding:2.4rem !important}.pt-2{padding-top:2.4rem !important}.pb-2{padding-bottom:2.4rem !important}.pl-2{padding-left:2.4rem !important}.pr-2{padding-right:2.4rem !important}.px-2{padding-left:2.4rem !important;padding-right:2.4rem !important}.py-2{padding-top:2.4rem !important;padding-bottom:2.4rem !important}.p-3{padding:3.6rem !important}.pt-3{padding-top:3.6rem !important}.pb-3{padding-bottom:3.6rem !important}.pl-3{padding-left:3.6rem !important}.pr-3{padding-right:3.6rem !important}.px-3{padding-left:3.6rem !important;padding-right:3.6rem !important}.py-3{padding-top:3.6rem !important;padding-bottom:3.6rem !important}.p-4{padding:4.8rem !important}.pt-4{padding-top:4.8rem !important}.pb-4{padding-bottom:4.8rem !important}.pl-4{padding-left:4.8rem !important}.pr-4{padding-right:4.8rem !important}.px-4{padding-left:4.8rem !important;padding-right:4.8rem !important}.py-4{padding-top:4.8rem !important;padding-bottom:4.8rem !important}.p-5{padding:6rem !important}.pt-5{padding-top:6rem !important}.pb-5{padding-bottom:6rem !important}.pl-5{padding-left:6rem !important}.pr-5{padding-right:6rem !important}.px-5{padding-left:6rem !important;padding-right:6rem !important}.py-5{padding-top:6rem !important;padding-bottom:6rem !important}@media screen and (max-width: 48rem){.m-half-sm{margin:.6rem !important}.mt-half-sm{margin-top:.6rem !important}.mb-half-sm{margin-bottom:.6rem !important}.ml-half-sm{margin-left:.6rem !important}.mr-half-sm{margin-right:.6rem !important}.mx-half-sm{margin-left:.6rem !important;margin-right:.6rem !important}.my-half-sm{margin-top:.6rem !important;margin-bottom:.6rem !important}.m-1-sm{margin:1.2rem !important}.mt-1-sm{margin-top:1.2rem !important}.mb-1-sm{margin-bottom:1.2rem !important}.ml-1-sm{margin-left:1.2rem !important}.mr-1-sm{margin-right:1.2rem !important}.mx-1-sm{margin-left:1.2rem !important;margin-right:1.2rem !important}.my-1-sm{margin-top:1.2rem !important;margin-bottom:1.2rem !important}.m-2-sm{margin:2.4rem !important}.mt-2-sm{margin-top:2.4rem !important}.mb-2-sm{margin-bottom:2.4rem !important}.ml-2-sm{margin-left:2.4rem !important}.mr-2-sm{margin-right:2.4rem !important}.mx-2-sm{margin-left:2.4rem !important;margin-right:2.4rem !important}.my-2-sm{margin-top:2.4rem !important;margin-bottom:2.4rem !important}.m-3-sm{margin:3.6rem !important}.mt-3-sm{margin-top:3.6rem !important}.mb-3-sm{margin-bottom:3.6rem !important}.ml-3-sm{margin-left:3.6rem !important}.mr-3-sm{margin-right:3.6rem !important}.mx-3-sm{margin-left:3.6rem !important;margin-right:3.6rem !important}.my-3-sm{margin-top:3.6rem !important;margin-bottom:3.6rem !important}.m-4-sm{margin:4.8rem !important}.mt-4-sm{margin-top:4.8rem !important}.mb-4-sm{margin-bottom:4.8rem !important}.ml-4-sm{margin-left:4.8rem !important}.mr-4-sm{margin-right:4.8rem !important}.mx-4-sm{margin-left:4.8rem !important;margin-right:4.8rem !important}.my-4-sm{margin-top:4.8rem !important;margin-bottom:4.8rem !important}.m-5-sm{margin:6rem !important}.mt-5-sm{margin-top:6rem !important}.mb-5-sm{margin-bottom:6rem !important}.ml-5-sm{margin-left:6rem !important}.mr-5-sm{margin-right:6rem !important}.mx-5-sm{margin-left:6rem !important;margin-right:6rem !important}.my-5-sm{margin-top:6rem !important;margin-bottom:6rem !important}.p-half-sm{padding:.6rem !important}.pt-half-sm{padding-top:.6rem !important}.pb-half-sm{padding-bottom:.6rem !important}.pl-half-sm{padding-left:.6rem !important}.pr-half-sm{padding-right:.6rem !important}.px-half-sm{padding-left:.6rem !important;padding-right:.6rem !important}.py-half-sm{padding-top:.6rem !important;padding-bottom:.6rem !important}.p-1-sm{padding:1.2rem !important}.pt-1-sm{padding-top:1.2rem !important}.pb-1-sm{padding-bottom:1.2rem !important}.pl-1-sm{padding-left:1.2rem !important}.pr-1-sm{padding-right:1.2rem !important}.px-1-sm{padding-left:1.2rem !important;padding-right:1.2rem !important}.py-1-sm{padding-top:1.2rem !important;padding-bottom:1.2rem !important}.p-2-sm{padding:2.4rem !important}.pt-2-sm{padding-top:2.4rem !important}.pb-2-sm{padding-bottom:2.4rem !important}.pl-2-sm{padding-left:2.4rem !important}.pr-2-sm{padding-right:2.4rem !important}.px-2-sm{padding-left:2.4rem !important;padding-right:2.4rem !important}.py-2-sm{padding-top:2.4rem !important;padding-bottom:2.4rem !important}.p-3-sm{padding:3.6rem !important}.pt-3-sm{padding-top:3.6rem !important}.pb-3-sm{padding-bottom:3.6rem !important}.pl-3-sm{padding-left:3.6rem !important}.pr-3-sm{padding-right:3.6rem !important}.px-3-sm{padding-left:3.6rem !important;padding-right:3.6rem !important}.py-3-sm{padding-top:3.6rem !important;padding-bottom:3.6rem !important}.p-4-sm{padding:4.8rem !important}.pt-4-sm{padding-top:4.8rem !important}.pb-4-sm{padding-bottom:4.8rem !important}.pl-4-sm{padding-left:4.8rem !important}.pr-4-sm{padding-right:4.8rem !important}.px-4-sm{padding-left:4.8rem !important;padding-right:4.8rem !important}.py-4-sm{padding-top:4.8rem !important;padding-bottom:4.8rem !important}.p-5-sm{padding:6rem !important}.pt-5-sm{padding-top:6rem !important}.pb-5-sm{padding-bottom:6rem !important}.pl-5-sm{padding-left:6rem !important}.pr-5-sm{padding-right:6rem !important}.px-5-sm{padding-left:6rem !important;padding-right:6rem !important}.py-5-sm{padding-top:6rem !important;padding-bottom:6rem !important}}@media screen and (min-width: 48.0625rem)and (max-width: 64rem){.m-half-md{margin:.6rem !important}.mt-half-md{margin-top:.6rem !important}.mb-half-md{margin-bottom:.6rem !important}.ml-half-md{margin-left:.6rem !important}.mr-half-md{margin-right:.6rem !important}.mx-half-md{margin-left:.6rem !important;margin-right:.6rem !important}.my-half-md{margin-top:.6rem !important;margin-bottom:.6rem !important}.m-1-md{margin:1.2rem !important}.mt-1-md{margin-top:1.2rem !important}.mb-1-md{margin-bottom:1.2rem !important}.ml-1-md{margin-left:1.2rem !important}.mr-1-md{margin-right:1.2rem !important}.mx-1-md{margin-left:1.2rem !important;margin-right:1.2rem !important}.my-1-md{margin-top:1.2rem !important;margin-bottom:1.2rem !important}.m-2-md{margin:2.4rem !important}.mt-2-md{margin-top:2.4rem !important}.mb-2-md{margin-bottom:2.4rem !important}.ml-2-md{margin-left:2.4rem !important}.mr-2-md{margin-right:2.4rem !important}.mx-2-md{margin-left:2.4rem !important;margin-right:2.4rem !important}.my-2-md{margin-top:2.4rem !important;margin-bottom:2.4rem !important}.m-3-md{margin:3.6rem !important}.mt-3-md{margin-top:3.6rem !important}.mb-3-md{margin-bottom:3.6rem !important}.ml-3-md{margin-left:3.6rem !important}.mr-3-md{margin-right:3.6rem !important}.mx-3-md{margin-left:3.6rem !important;margin-right:3.6rem !important}.my-3-md{margin-top:3.6rem !important;margin-bottom:3.6rem !important}.m-4-md{margin:4.8rem !important}.mt-4-md{margin-top:4.8rem !important}.mb-4-md{margin-bottom:4.8rem !important}.ml-4-md{margin-left:4.8rem !important}.mr-4-md{margin-right:4.8rem !important}.mx-4-md{margin-left:4.8rem !important;margin-right:4.8rem !important}.my-4-md{margin-top:4.8rem !important;margin-bottom:4.8rem !important}.m-5-md{margin:6rem !important}.mt-5-md{margin-top:6rem !important}.mb-5-md{margin-bottom:6rem !important}.ml-5-md{margin-left:6rem !important}.mr-5-md{margin-right:6rem !important}.mx-5-md{margin-left:6rem !important;margin-right:6rem !important}.my-5-md{margin-top:6rem !important;margin-bottom:6rem !important}.p-half-md{padding:.6rem !important}.pt-half-md{padding-top:.6rem !important}.pb-half-md{padding-bottom:.6rem !important}.pl-half-md{padding-left:.6rem !important}.pr-half-md{padding-right:.6rem !important}.px-half-md{padding-left:.6rem !important;padding-right:.6rem !important}.py-half-md{padding-top:.6rem !important;padding-bottom:.6rem !important}.p-1-md{padding:1.2rem !important}.pt-1-md{padding-top:1.2rem !important}.pb-1-md{padding-bottom:1.2rem !important}.pl-1-md{padding-left:1.2rem !important}.pr-1-md{padding-right:1.2rem !important}.px-1-md{padding-left:1.2rem !important;padding-right:1.2rem !important}.py-1-md{padding-top:1.2rem !important;padding-bottom:1.2rem !important}.p-2-md{padding:2.4rem !important}.pt-2-md{padding-top:2.4rem !important}.pb-2-md{padding-bottom:2.4rem !important}.pl-2-md{padding-left:2.4rem !important}.pr-2-md{padding-right:2.4rem !important}.px-2-md{padding-left:2.4rem !important;padding-right:2.4rem !important}.py-2-md{padding-top:2.4rem !important;padding-bottom:2.4rem !important}.p-3-md{padding:3.6rem !important}.pt-3-md{padding-top:3.6rem !important}.pb-3-md{padding-bottom:3.6rem !important}.pl-3-md{padding-left:3.6rem !important}.pr-3-md{padding-right:3.6rem !important}.px-3-md{padding-left:3.6rem !important;padding-right:3.6rem !important}.py-3-md{padding-top:3.6rem !important;padding-bottom:3.6rem !important}.p-4-md{padding:4.8rem !important}.pt-4-md{padding-top:4.8rem !important}.pb-4-md{padding-bottom:4.8rem !important}.pl-4-md{padding-left:4.8rem !important}.pr-4-md{padding-right:4.8rem !important}.px-4-md{padding-left:4.8rem !important;padding-right:4.8rem !important}.py-4-md{padding-top:4.8rem !important;padding-bottom:4.8rem !important}.p-5-md{padding:6rem !important}.pt-5-md{padding-top:6rem !important}.pb-5-md{padding-bottom:6rem !important}.pl-5-md{padding-left:6rem !important}.pr-5-md{padding-right:6rem !important}.px-5-md{padding-left:6rem !important;padding-right:6rem !important}.py-5-md{padding-top:6rem !important;padding-bottom:6rem !important}}@media screen and (min-width: 64.0625rem){.m-half-lg{margin:.6rem !important}.mt-half-lg{margin-top:.6rem !important}.mb-half-lg{margin-bottom:.6rem !important}.ml-half-lg{margin-left:.6rem !important}.mr-half-lg{margin-right:.6rem !important}.mx-half-lg{margin-left:.6rem !important;margin-right:.6rem !important}.my-half-lg{margin-top:.6rem !important;margin-bottom:.6rem !important}.m-1-lg{margin:1.2rem !important}.mt-1-lg{margin-top:1.2rem !important}.mb-1-lg{margin-bottom:1.2rem !important}.ml-1-lg{margin-left:1.2rem !important}.mr-1-lg{margin-right:1.2rem !important}.mx-1-lg{margin-left:1.2rem !important;margin-right:1.2rem !important}.my-1-lg{margin-top:1.2rem !important;margin-bottom:1.2rem !important}.m-2-lg{margin:2.4rem !important}.mt-2-lg{margin-top:2.4rem !important}.mb-2-lg{margin-bottom:2.4rem !important}.ml-2-lg{margin-left:2.4rem !important}.mr-2-lg{margin-right:2.4rem !important}.mx-2-lg{margin-left:2.4rem !important;margin-right:2.4rem !important}.my-2-lg{margin-top:2.4rem !important;margin-bottom:2.4rem !important}.m-3-lg{margin:3.6rem !important}.mt-3-lg{margin-top:3.6rem !important}.mb-3-lg{margin-bottom:3.6rem !important}.ml-3-lg{margin-left:3.6rem !important}.mr-3-lg{margin-right:3.6rem !important}.mx-3-lg{margin-left:3.6rem !important;margin-right:3.6rem !important}.my-3-lg{margin-top:3.6rem !important;margin-bottom:3.6rem !important}.m-4-lg{margin:4.8rem !important}.mt-4-lg{margin-top:4.8rem !important}.mb-4-lg{margin-bottom:4.8rem !important}.ml-4-lg{margin-left:4.8rem !important}.mr-4-lg{margin-right:4.8rem !important}.mx-4-lg{margin-left:4.8rem !important;margin-right:4.8rem !important}.my-4-lg{margin-top:4.8rem !important;margin-bottom:4.8rem !important}.m-5-lg{margin:6rem !important}.mt-5-lg{margin-top:6rem !important}.mb-5-lg{margin-bottom:6rem !important}.ml-5-lg{margin-left:6rem !important}.mr-5-lg{margin-right:6rem !important}.mx-5-lg{margin-left:6rem !important;margin-right:6rem !important}.my-5-lg{margin-top:6rem !important;margin-bottom:6rem !important}.p-half-lg{padding:.6rem !important}.pt-half-lg{padding-top:.6rem !important}.pb-half-lg{padding-bottom:.6rem !important}.pl-half-lg{padding-left:.6rem !important}.pr-half-lg{padding-right:.6rem !important}.px-half-lg{padding-left:.6rem !important;padding-right:.6rem !important}.py-half-lg{padding-top:.6rem !important;padding-bottom:.6rem !important}.p-1-lg{padding:1.2rem !important}.pt-1-lg{padding-top:1.2rem !important}.pb-1-lg{padding-bottom:1.2rem !important}.pl-1-lg{padding-left:1.2rem !important}.pr-1-lg{padding-right:1.2rem !important}.px-1-lg{padding-left:1.2rem !important;padding-right:1.2rem !important}.py-1-lg{padding-top:1.2rem !important;padding-bottom:1.2rem !important}.p-2-lg{padding:2.4rem !important}.pt-2-lg{padding-top:2.4rem !important}.pb-2-lg{padding-bottom:2.4rem !important}.pl-2-lg{padding-left:2.4rem !important}.pr-2-lg{padding-right:2.4rem !important}.px-2-lg{padding-left:2.4rem !important;padding-right:2.4rem !important}.py-2-lg{padding-top:2.4rem !important;padding-bottom:2.4rem !important}.p-3-lg{padding:3.6rem !important}.pt-3-lg{padding-top:3.6rem !important}.pb-3-lg{padding-bottom:3.6rem !important}.pl-3-lg{padding-left:3.6rem !important}.pr-3-lg{padding-right:3.6rem !important}.px-3-lg{padding-left:3.6rem !important;padding-right:3.6rem !important}.py-3-lg{padding-top:3.6rem !important;padding-bottom:3.6rem !important}.p-4-lg{padding:4.8rem !important}.pt-4-lg{padding-top:4.8rem !important}.pb-4-lg{padding-bottom:4.8rem !important}.pl-4-lg{padding-left:4.8rem !important}.pr-4-lg{padding-right:4.8rem !important}.px-4-lg{padding-left:4.8rem !important;padding-right:4.8rem !important}.py-4-lg{padding-top:4.8rem !important;padding-bottom:4.8rem !important}.p-5-lg{padding:6rem !important}.pt-5-lg{padding-top:6rem !important}.pb-5-lg{padding-bottom:6rem !important}.pl-5-lg{padding-left:6rem !important}.pr-5-lg{padding-right:6rem !important}.px-5-lg{padding-left:6rem !important;padding-right:6rem !important}.py-5-lg{padding-top:6rem !important;padding-bottom:6rem !important}}.text-left{text-align:left !important}.text-center{text-align:center !important}.text-right{text-align:right !important}.text-justify{text-align:justify !important}.va-top{vertical-align:top !important}.va-middle{vertical-align:middle !important}.va-bottom{vertical-align:bottom !important}.va-text-top{vertical-align:text-top !important}.va-text-bottom{vertical-align:text-bottom !important}.text-capitalize{text-transform:capitalize !important}.text-uppercase{text-transform:uppercase !important}.text-lowercase{text-transform:lowercase !important}.fw-lighter{font-weight:lighter !important}.fw-bold{font-weight:bold !important}.fw-normal{font-weight:normal !important}.fs-italic{font-style:italic !important}.text-line-through{text-decoration:line-through !important}.text-underline{text-decoration:underline !important}.text-overline{text-decoration:overline !important}.lh-1{line-height:1 !important}.text-black{color:rgba(0,0,0,.8) !important}.text-muted{color:rgba(0,0,0,.55) !important}.text-white{color:rgba(255,255,255,.9) !important}.text-white-muted{color:rgba(255,255,255,.65) !important}.no-background{background:none !important}.no-shadow{-webkit-box-shadow:none !important;box-shadow:none !important}.no-before::before,.no-after::after{display:none !important}.b-0{border:0 !important}.bt-0{border-top:0 !important}.bb-0{border-bottom:0 !important}.bl-0{border-left:0 !important}.br-0{border-right:0 !important}.r-0{border-radius:0 !important}.rtl-0{border-top-left-radius:0 !important}.rtr-0{border-top-right-radius:0 !important}.rbl-0{border-bottom-left-radius:0 !important}.rbr-0{border-bottom-right-radius:0 !important}.p-0{padding:0 !important}.pt-0{padding-top:0 !important}.pb-0{padding-bottom:0 !important}.pl-0{padding-left:0 !important}.pr-0{padding-right:0 !important}.px-0{padding-left:0 !important;padding-right:0 !important}.py-0{padding-top:0 !important;padding-bottom:0 !important}.m-0{margin:0 !important}.mt-0{margin-top:0 !important}.mb-0{margin-bottom:0 !important}.ml-0{margin-left:0 !important}.mr-0{margin-right:0 !important}.mx-0{margin-left:0 !important;margin-right:0 !important}.my-0{margin-top:0 !important;margin-bottom:0 !important}@media screen and (max-width: 48rem){.p-0-sm{padding:0 !important}.pt-0-sm{padding-top:0 !important}.pb-0-sm{padding-bottom:0 !important}.pl-0-sm{padding-left:0 !important}.pr-0-sm{padding-right:0 !important}.px-0-sm{padding-left:0 !important;padding-right:0 !important}.py-0-sm{padding-top:0 !important;padding-bottom:0 !important}.m-0-sm{margin:0 !important}.mt-0-sm{margin-top:0 !important}.mb-0-sm{margin-bottom:0 !important}.ml-0-sm{margin-left:0 !important}.mr-0-sm{margin-right:0 !important}.mx-0-sm{margin-left:0 !important;margin-right:0 !important}.my-0-sm{margin-top:0 !important;margin-bottom:0 !important}}@media screen and (min-width: 48.0625rem)and (max-width: 64rem){.p-0-md{padding:0 !important}.pt-0-md{padding-top:0 !important}.pb-0-md{padding-bottom:0 !important}.pl-0-md{padding-left:0 !important}.pr-0-md{padding-right:0 !important}.px-0-md{padding-left:0 !important;padding-right:0 !important}.py-0-md{padding-top:0 !important;padding-bottom:0 !important}.m-0-md{margin:0 !important}.mt-0-md{margin-top:0 !important}.mb-0-md{margin-bottom:0 !important}.ml-0-md{margin-left:0 !important}.mr-0-md{margin-right:0 !important}.mx-0-md{margin-left:0 !important;margin-right:0 !important}.my-0-md{margin-top:0 !important;margin-bottom:0 !important}}@media screen and (min-width: 64.0625rem){.p-0-lg{padding:0 !important}.pt-0-lg{padding-top:0 !important}.pb-0-lg{padding-bottom:0 !important}.pl-0-lg{padding-left:0 !important}.pr-0-lg{padding-right:0 !important}.px-0-lg{padding-left:0 !important;padding-right:0 !important}.py-0-lg{padding-top:0 !important;padding-bottom:0 !important}.m-0-lg{margin:0 !important}.mt-0-lg{margin-top:0 !important}.mb-0-lg{margin-bottom:0 !important}.ml-0-lg{margin-left:0 !important}.mr-0-lg{margin-right:0 !important}.mx-0-lg{margin-left:0 !important;margin-right:0 !important}.my-0-lg{margin-top:0 !important;margin-bottom:0 !important}}.primary,.info,.danger,.dark{color:rgba(255,255,255,.9)}.caution,.light{color:rgba(0,0,0,.8)}.primary{border-color:#3e9def;background-color:#3e9def}.info{border-color:#54c43a;background-color:#54c43a}.caution{border-color:#e8e819;background-color:#e8e819}.danger{border-color:#e53c27;background-color:#e53c27}.light{border-color:#f3f3f3;background-color:#f3f3f3}.dark{border-color:#4c4c4c;background-color:#4c4c4c} 2 | 3 | /*# sourceMappingURL=sandbox-min.css.map */ --------------------------------------------------------------------------------