Skip to content

Instantly share code, notes, and snippets.

@say2joe
Last active December 24, 2015 02:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save say2joe/6734483 to your computer and use it in GitHub Desktop.
Save say2joe/6734483 to your computer and use it in GitHub Desktop.
CSS Hacks for Edge-Cases
/* Eliminate glow on input fields when focused */
input:focus { outline: none; }
/* To add a visible scrollbar when you start scrolling add: */
-webkit-overflow-scrolling: touch;
/*
Example:
@media only screen and (max-device-width: 768px) {
.applicableDivHere {
-webkit-overflow-scrolling: touch;
}
}
More info:
http://johanbrook.com/browsers/native-momentum-scrolling-ios-5/
http://stackoverflow.com/questions/8229104/css-no-scrollbars-in-ipad
*/
// Pixels to EMs
@function em($px) {
@if $px == 0 { @return 0 }
@return $px / $basefs + 0em;
}
// Remove outline effects
@each $el in a, button, input {
#{$el}:active, #{$el}:focus, #{$el}:hover, #{$el}:visited { outline: none; }
}
// Share properties for similar elements.
@for $i from 1 through 6 { //h1,h2,etc.
h#{$i} { /* shared font properties */ }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment