Skip to content

Instantly share code, notes, and snippets.

@davidhund
Created December 12, 2012 16:29
Show Gist options
  • Save davidhund/4269281 to your computer and use it in GitHub Desktop.
Save davidhund/4269281 to your computer and use it in GitHub Desktop.
Base CSS snippets I keep forgetting
/*
Note to self: put this in my base stylesheet :)
- Note: some stuff would already be done by Normalize.css
- Use Normalize.css :)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
* {
/* http://paulirish.com/2012/box-sizing-border-box-ftw/ */
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
html {
/* Force vertical scrollbar so that page does not 'jump' when it appears
http://css-tricks.com/snippets/css/force-vertical-scrollbar/
*/
overflow-y: scroll;
/* Hypens,
but see also http://blog.kenneth.io/blog/2012/03/04/word-wrapping-hypernation-using-css/
*/
-webkit-hyphens: auto;
-moz-hyphens: auto;
-ms-hyphens: auto;
-o-hyphens: auto;
hyphens: auto;
/* http://necolas.github.com/normalize.css/2.0.1/normalize.css */
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
img {
border: 0;
-ms-interpolation-mode: bicubic; /* Better IMG resizing in IE */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment