27 lines
1 KiB
JavaScript
27 lines
1 KiB
JavaScript
|
'use strict';
|
||
|
|
||
|
// ----------------------------------------------------------------------------
|
||
|
// DATA
|
||
|
// ----------------------------------------------------------------------------
|
||
|
|
||
|
// ----------------------------------------------------------------------------
|
||
|
// UTILS
|
||
|
// ----------------------------------------------------------------------------
|
||
|
|
||
|
// Convert rem to pixels by getting font-size CSS property
|
||
|
function convertRemToPixels(rem) {
|
||
|
let fontSize = parseFloat(window.getComputedStyle(document.body).getPropertyValue('font-size'));
|
||
|
return rem * fontSize;
|
||
|
}
|
||
|
|
||
|
// ----------------------------------------------------------------------------
|
||
|
// LOGIC
|
||
|
// ----------------------------------------------------------------------------
|
||
|
|
||
|
// ----------------------------------------------------------------------------
|
||
|
// PROGRAM
|
||
|
// ----------------------------------------------------------------------------
|
||
|
|
||
|
// Enable CSS :active pseudo-class in Safari Mobile
|
||
|
document.addEventListener("touchstart", function() {},false);
|