This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const camelCase = str => str.split( /[_,-]+/ ).map( ( item, index ) => index === 0 ? item : item.charAt(0).toUpperCase() + item.slice(1).toLowerCase() | |
| ).join(''); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if ( 'document' in self ) { | |
| // Full polyfill for browsers with no classList support | |
| // Including IE < Edge missing SVGElement.classList | |
| if ( !( 'classList' in document.createElement( '_' ) ) | |
| || document.createElementNS && !( 'classList' in document.createElementNS( 'http://www.w3.org/2000/svg', 'g' ) ) ) { | |
| ( function( view ) { | |
| 'use strict'; | |
| var DOMEx; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| linters: | |
| BangFormat: | |
| space_before_bang: true | |
| space_after_bang: false | |
| BemDepth: | |
| enabled: false | |
| BorderZero: | |
| enabled: true | |
| convention: none |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function isInteractiveElement( element ) { | |
| if ( [ 'A', 'BUTTON', 'DETAILS', 'EMBED', 'IFRAME', 'KEYGEN', 'LABEL', 'SELECT', 'TEXTAREA' ].indexOf( element.nodeName ) !== -1 ) { | |
| return true; | |
| } | |
| if ( element.nodeName === 'INPUT' && element.type !== 'hidden' ) { | |
| return true; | |
| } | |
| if ( ['AUDIO', 'VIDEO'].indexOf( element.nodeName ) > -1 && element.hasAttribute('controls') ) { | |
| return true; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function $_( selectors, baseElement ) { | |
| var elements = (baseElement || document).querySelectorAll( selectors ); | |
| return Array.prototype.slice.call( elements ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function insertScript(url, onload, onerror) { | |
| var ref = document.getElementsByTagName('script')[0]; | |
| var script = document.createElement('script'); | |
| script.src = url; | |
| if (typeof onload === 'function') { | |
| script.onload = onload; | |
| } | |
| if (typeof onerror === 'function') { | |
| script.onerror = onerror; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # some variables | |
| POSTCSS = ./node_modules/.bin/postcss | |
| POSTCSS_FLAGS = --use autoprefixer autoprefixer.browsers "> 2%" | |
| # wildcard expansion is performed only in targets and in prerequisites so here we need $(wildcard) | |
| SOURCES = $(wildcard src/css/*.css) | |
| # use $(SOURCES) to determine what we actually need using a bit of pattern substitution | |
| TARGETS = $(patsubst src%, build%, $(SOURCES)) | |
| # our default target (see below) | |
| all: $(TARGETS) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # For more information about the properties used in | |
| # this file, please see the EditorConfig documentation: | |
| # http://editorconfig.org/ | |
| root = true | |
| [*] | |
| charset = utf-8 | |
| end_of_line = lf | |
| indent_size = 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function() { | |
| 'use strict'; | |
| document.addEventListener('keydown', function(event) { | |
| var S = 83, | |
| activeElement = document.activeElement, | |
| saveButtonId, | |
| saveButton; | |
| if ((event.key === S || event.keyCode === S) && (event.metaKey || event.ctrlKey) && activeElement.nodeName === 'TEXTAREA') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <p> | |
| <a href="#" class="button">Foo Bar</a> | |
| <button type="button" class="button">Baz Quux</button> | |
| </p> |