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 removeFullPageJS() { | |
/* Remove Fullpage.js by Alvaro Trigo | |
* | |
* Fullpage.js is a script by Alvaro Trigo, that you can find here https://github.com/alvarotrigo/fullPage.js/tree/master | |
* The script allows you to take over the scrolling of a website and make it scroll in one page sections | |
* | |
* On occasion, say if the user resizes their browser to a small width, you may need to remove it's functionality | |
* | |
* This Gist removes the main effects of Fullpage.js. Both the Gist and Fullpage itself rely on jQuery. |
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
/* | |
Some versions of IE have a bug that stops applications working if they use console.log and the developer window is closed. | |
This is obviously a fairly big issue, especially because developers will often have the dev window open, meaning that they | |
struggle to recreate the problems their users report. | |
The answer is not to check for IE, but to check that console.log actually exists before invoking it. You can do this with | |
if conditionals, but this isn't the most elegant solution. Here's mine. | |
*/ |
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
// First, set a base size in the document - do this on HTML, or BODY, I tend towards HTML | |
html { | |
font-size: $base-font; | |
} | |
// Generally somewhere else (my SCSS is more structured than this, put this function (somewhere before you're going to use it) | |
@function ems($p, $b: $base-font) { | |
@return ($p / $b) * 1em; /* Because SASS/SCSS allows you to mix units, you can calculate this proportion in pixels, and then just multiply by 1em to get the o/p in ems */ | |
} |