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
var getViewportDimensions = function () { | |
return { | |
width: Math.max(document.documentElement.clientWidth, window.innerWidth || 0), | |
height: Math.max(document.documentElement.clientHeight, window.innerHeight || 0) | |
}; | |
}; |
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
var getDocumentDimensions = function () { | |
return { | |
width: Math.max( | |
document.body.scrollWidth, document.documentElement.scrollWidth, | |
document.body.offsetWidth, document.documentElement.offsetWidth, | |
document.body.clientWidth, document.documentElement.clientWidth | |
), | |
height: Math.max( | |
document.body.scrollHeight, document.documentElement.scrollHeight, | |
document.body.offsetHeight, document.documentElement.offsetHeight, |
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
var getElementDimensions = function (element) { | |
return { | |
width: Math.max(element.scrollWidth, element.offsetWidth, element.clientWidth), | |
height: Math.max(element.scrollHeight, element.offsetHeight, element.clientHeight) | |
}; | |
}; |
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
/* | |
MODULAR SCALE | |
*/ | |
:root { | |
--font-size-base: 1rem; | |
--font-size-ratio: 1.2; | |
--font-size-1: var(--font-size-base); |
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
var inViewport = function (element) { | |
var rect = element.getBoundingClientRect(); | |
return ( | |
rect.top >= 0 && | |
rect.left >= 0 && | |
rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && | |
rect.right <= (window.innerWidth || document.documentElement.clientWidth) | |
); | |
}; |
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
var debounce = function (callback, wait) { | |
var timeout; | |
return function () { | |
clearTimeout(timeout); | |
timeout = setTimeout(function () { | |
callback.apply(this, arguments) | |
}, (wait || 1)); | |
} | |
}; |
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
var isModernBrowser = function () { | |
return 'visibilityState' in document; | |
}; |
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
var supportsScrollBehavior = function () { | |
return 'scrollBehavior' in document.documentElement.style; | |
}; |
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
var getScrollPosition = function () { | |
return { | |
x: Math.max(window.pageXOffset, document.documentElement.scrollLeft, document.body.scrollLeft), | |
y: Math.max(window.pageYOffset, document.documentElement.scrollTop, document.body.scrollTop) | |
}; | |
}; |
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
Show hidden characters
{ | |
"bold_folder_labels": true, | |
"caret_extra_bottom": 2, | |
"caret_extra_top": 2, | |
"caret_extra_width": 3, | |
"caret_style": "phase", | |
"color_scheme": "Packages/Theme - Cobalt2/cobalt2.tmTheme", | |
"font_face": "Replica Mono Pro", | |
"font_size": 15, | |
"highlight_line": true, |