Last active
December 24, 2015 02:59
-
-
Save say2joe/6734483 to your computer and use it in GitHub Desktop.
CSS Hacks for Edge-Cases
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
/* Eliminate glow on input fields when focused */ | |
input:focus { outline: none; } |
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
/* 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 | |
*/ |
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
// 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