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
<label class="show-password"><input type="checkbox" onclick="showPass()">Show password</label> |
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
/* | |
Script to display the viewport size when working on responsive stuff. | |
Adpted to vanilla JS by: Taylor Hunt - https://codepen.io/tigt/ | |
*/ | |
var el = document.createElement("output"); | |
document.body.append(el); | |
Object.assign(el.style, { | |
position: "fixed", | |
bottom: 0, | |
left: 0, |
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
/* | |
Script to display the viewport size when working on responsive stuff. | |
Taken from here: http://stackoverflow.com/questions/14184447/firefox-extension-to-show-current-window-dimensions | |
*/ | |
$(function(){ | |
var MEASUREMENTS_ID = "measurements"; // abstracted-out for convenience in renaming | |
$("body").append('<div id="'+MEASUREMENTS_ID+'"></div>'); | |
$("#"+MEASUREMENTS_ID).css({ | |
"position": "fixed", |
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
//RWD Magic Formula | |
@mixin magicFormula($width){ | |
width: ($width/980) * 100%; | |
} | |
/* | |
Demo: http://codepen.io/ricardozea/collab/ce3d833ea1d98b2bb7cdf165dda02438/?editors=1100 | |
Author: Adebayo Oluwadamilola - http://codepen.io/andela-oadebayo/ | |
*/ |
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
p { | |
font-size: calc(2vw + .3em); //edit | |
line-height: calc(1vw + 1.2em); //edit | |
@media (min-width: 1000px) { | |
line-height: 1.5; //edit | |
} | |
} | |
/* | |
Demo: https://codepen.io/ricardozea/pen/dbba1a4efcf515f05e36b5d4223aa6ab |
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
/* Begins with (^=) */ | |
div[class^="myPanel_"] {} | |
/* Ends With ($=) */ | |
div[id$="_myDiv"] {} | |
/* Contains (*=) */ | |
div[class*="logoutPanel"] {} | |
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
//Animated gradient background | |
//https://medium.com/@dave_lunny/animating-css-gradients-using-only-css-d2fd7671e759 | |
//Usage: | |
//Example 1: include gradientAnimation(red, blue, .6s); | |
//Example 2: include gradientAnimation(lighten($orange, 10), $orange, .6s); | |
@mixin gradientAnimation( $start, $end, $transTime ){ | |
background-size: 100%; | |
background-image: linear-gradient($start, $end); |
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
<div id="email-address">Activate JavaScript, please.</div> | |
<script> | |
(function(d,id,lhs,rhs){ | |
d.getElementById(id).innerHTML = "<a rel=\"nofollow\" href=\"mailto"+":"+lhs+"@"+rhs+"\">"+"headofhomecare" +"@"+"healthprofessionals.co.uk"+"<\/a>"; | |
})(window.document, "email-address", "name", "domain.com"); | |
</script> | |
<!-- Based on this answer in SO: http://stackoverflow.com/a/37175227/321555 --> |
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
//**MINIMAL PAGE TRANSITIONS WITH JQUERY & CSS | |
//https://blog.adam-marsden.co.uk/minimal-page-transitions-with-jquery-css-d97f692d5292 | |
$(function() { | |
$("a").each(function() { /* [1] */ | |
if ( location.hostname === this.hostname || !this.hostname.length ) { /* [1] */ | |
var link = $(this).attr("href"); /* [2] */ | |
if ( link.match("^#") ) { /* [3] */ | |
$(this).click(function() { | |
var target = $(link); /* [4] */ |
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
<noscript id="deferred-styles"> | |
<link href="https://fonts.googleapis.com/css?family=Ubuntu:300,300i,700,700i" rel="stylesheet"> | |
</noscript> | |
<script> | |
// Load CSS | |
var loadDeferredStyles = function() { | |
var addStylesNode = document.getElementById("deferred-styles"); | |
var replacement = document.createElement("div"); | |
replacement.innerHTML = addStylesNode.textContent; | |
document.body.appendChild(replacement) |