This file contains 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
$xSize: 40px; | |
$xColor: #000; | |
.x-btn { | |
cursor: pointer; | |
width: $xSize; | |
height: $xSize; | |
position: relative; | |
&:before, &:after { |
This file contains 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
Element.prototype.on = function (eventName, selector, fn) { | |
this.addEventListener(eventName, function (event) { | |
const target = event.target.closest(selector) | |
if (target && this.contains(target)) { | |
return fn.call(target, event, target) | |
} | |
}) | |
} |
This file contains 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
@mixin letter-spacing($spacing) { | |
letter-spacing: ($spacing / 1000) * 1em; | |
} |
This file contains 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 is_ie() { | |
const UA = window.navigator.userAgent; | |
const MS_IE = UA.indexOf("MSIE "); | |
if (MS_IE > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) { | |
return true; | |
} | |
return false; | |
} |
This file contains 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
@mixin placeholderColor($color) { | |
&:-moz-placeholder { | |
color: $color; | |
} | |
&:-ms-input-placeholder { | |
color: $color; | |
} | |
&::-moz-placeholder { |
This file contains 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
class BlockInputKeys { | |
constructor(INPUT_TYPE, BLOCKED_KEYS) { | |
this.INPUT_TYPE = INPUT_TYPE; | |
this.BLOCKED_KEYS = BLOCKED_KEYS; | |
this.NUMBER_INPUTS = document.querySelectorAll(this.INPUT_TYPE); | |
this.init(); | |
} | |
init() { | |
for (let i = 0; i < this.NUMBER_INPUTS.length; i++) { |
This file contains 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
class FloatingLabel { | |
constructor(WRAPPER_ELEMENT, INPUT_TYPE) { | |
this.WRAPPER_ELEMENT = WRAPPER_ELEMENT; | |
this.INPUT_TYPE = INPUT_TYPE; | |
this.INPUT_SELECTOR = '.' + this.WRAPPER_ELEMENT.split(' ').join('.'); | |
this.INPUT_WRAPPERS = document.querySelectorAll(this.INPUT_SELECTOR); | |
this.init(); | |
} | |
init() { |
This file contains 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
class PrintButton { | |
constructor(PRINT_CLASS = '.print') { | |
this.PRINT_CLASS = PRINT_CLASS; | |
this.PRINT_TARGETS = document.querySelectorAll(this.PRINT_CLASS); | |
if (this.PRINT_TARGETS.length) { | |
this.addPrintListener(); | |
} | |
} |
This file contains 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 debounce (func, wait, immediate) { | |
let timeout; | |
return () => { | |
const context = this; | |
const args = arguments; | |
let later = () => { | |
timeout = null; | |
if (!immediate) func.apply(context, args); |
NewerOlder