/workbook/htmls/src/_html5boilerplate.scss

http://github.com/matthewmccullough/git-workshop · Sass · 246 lines · 70 code · 74 blank · 102 comment · 0 complexity · 495a9e3c8b08081dbb884e9e0dbc3393 MD5 · raw file

  1. /*
  2. * HTML5 ? Boilerplate
  3. *
  4. * What follows is the result of much research on cross-browser styling.
  5. * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
  6. * Kroc Camen, and the H5BP dev community and team.
  7. *
  8. * Detailed information about this CSS: h5bp.com/css
  9. *
  10. * ==|== normalize ==========================================================
  11. */
  12. /* =============================================================================
  13. HTML5 display definitions
  14. ========================================================================== */
  15. article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; }
  16. audio, canvas, video { display: inline-block; *display: inline; *zoom: 1; }
  17. audio:not([controls]) { display: none; }
  18. [hidden] { display: none; }
  19. /* =============================================================================
  20. Base
  21. ========================================================================== */
  22. /*
  23. * 1. Correct text resizing oddly in IE6/7 when body font-size is set using em units
  24. * 2. Force vertical scrollbar in non-IE
  25. * 3. Prevent iOS text size adjust on device orientation change, without disabling user zoom: h5bp.com/g
  26. */
  27. html { font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
  28. body { margin: 0; font-size: 13px; line-height: 1.231; }
  29. body, button, input, select, textarea { font-family: sans-serif; color: #222; }
  30. /*
  31. * Remove text-shadow in selection highlight: h5bp.com/i
  32. * These selection declarations have to be separate
  33. * Also: hot pink! (or customize the background color to match your design)
  34. */
  35. ::-moz-selection { background: #0080ff; color: #fff; text-shadow: none; }
  36. ::selection { background: #0080ff; color: #fff; text-shadow: none; }
  37. /* =============================================================================
  38. Links
  39. ========================================================================== */
  40. a { color: #00e; }
  41. a:visited { color: #551a8b; }
  42. a:hover { color: #06e; }
  43. a:focus { outline: thin dotted; }
  44. /* Improve readability when focused and hovered in all browsers: h5bp.com/h */
  45. a:hover, a:active { outline: 0; }
  46. /* =============================================================================
  47. Typography
  48. ========================================================================== */
  49. abbr[title] { border-bottom: 1px dotted; }
  50. b, strong { font-weight: bold; }
  51. blockquote { margin: 1em 40px; }
  52. dfn { font-style: italic; }
  53. hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; }
  54. ins { background: #ff9; color: #000; text-decoration: none; }
  55. mark { background: #ff0; color: #000; font-style: italic; font-weight: bold; }
  56. /* Redeclare monospace font family: h5bp.com/j */
  57. pre, code, kbd, samp { font-family: monospace, serif; _font-family: 'courier new', monospace; font-size: 1em; }
  58. /* Improve readability of pre-formatted text in all browsers */
  59. pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; }
  60. q { quotes: none; }
  61. q:before, q:after { content: ""; content: none; }
  62. small { font-size: 85%; }
  63. /* Position subscript and superscript content without affecting line-height: h5bp.com/k */
  64. sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
  65. sup { top: -0.5em; }
  66. sub { bottom: -0.25em; }
  67. /* =============================================================================
  68. Lists
  69. ========================================================================== */
  70. ul, ol { margin: 1em 0; padding: 0 0 0 40px; }
  71. dd { margin: 0 0 0 40px; }
  72. nav ul, nav ol { list-style: none; list-style-image: none; margin: 0; padding: 0; }
  73. /* =============================================================================
  74. Embedded content
  75. ========================================================================== */
  76. /*
  77. * 1. Improve image quality when scaled in IE7: h5bp.com/d
  78. * 2. Remove the gap between images and borders on image containers: h5bp.com/e
  79. */
  80. img { border: 0; -ms-interpolation-mode: bicubic; vertical-align: middle; }
  81. /*
  82. * Correct overflow not hidden in IE9
  83. */
  84. svg:not(:root) { overflow: hidden; }
  85. /* =============================================================================
  86. Figures
  87. ========================================================================== */
  88. figure { margin: 0; }
  89. /* =============================================================================
  90. Forms
  91. ========================================================================== */
  92. form { margin: 0; }
  93. fieldset { border: 0; margin: 0; padding: 0; }
  94. /* Indicate that 'label' will shift focus to the associated form element */
  95. label { cursor: pointer; }
  96. /*
  97. * 1. Correct color not inheriting in IE6/7/8/9
  98. * 2. Correct alignment displayed oddly in IE6/7
  99. */
  100. legend { border: 0; *margin-left: -7px; padding: 0; }
  101. /*
  102. * 1. Correct font-size not inheriting in all browsers
  103. * 2. Remove margins in FF3/4 S5 Chrome
  104. * 3. Define consistent vertical alignment display in all browsers
  105. */
  106. button, input, select, textarea { font-size: 100%; margin: 0; vertical-align: baseline; *vertical-align: middle; }
  107. /*
  108. * 1. Define line-height as normal to match FF3/4 (set using !important in the UA stylesheet)
  109. * 2. Correct inner spacing displayed oddly in IE6/7
  110. */
  111. button, input { line-height: normal; *overflow: visible; }
  112. /*
  113. * Reintroduce inner spacing in 'table' to avoid overlap and whitespace issues in IE6/7
  114. */
  115. table button, table input { *overflow: auto; }
  116. /*
  117. * 1. Display hand cursor for clickable form elements
  118. * 2. Allow styling of clickable form elements in iOS
  119. */
  120. button, input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; -webkit-appearance: button; }
  121. /*
  122. * Consistent box sizing and appearance
  123. */
  124. input[type="checkbox"], input[type="radio"] { box-sizing: border-box; }
  125. input[type="search"] { -webkit-appearance: textfield; -moz-box-sizing: content-box; -webkit-box-sizing: content-box; box-sizing: content-box; }
  126. input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }
  127. /*
  128. * Remove inner padding and border in FF3/4: h5bp.com/l
  129. */
  130. button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; }
  131. /*
  132. * 1. Remove default vertical scrollbar in IE6/7/8/9
  133. * 2. Allow only vertical resizing
  134. */
  135. textarea { overflow: auto; vertical-align: top; resize: vertical; }
  136. /* Colors for form validity */
  137. input:valid, textarea:valid { }
  138. input:invalid, textarea:invalid { background-color: #f0dddd; }
  139. /* =============================================================================
  140. Tables
  141. ========================================================================== */
  142. table { border-collapse: collapse; border-spacing: 0; }
  143. td { vertical-align: top; }
  144. /* ==|== media queries ======================================================
  145. PLACEHOLDER Media Queries for Responsive Design.
  146. These override the primary ('mobile first') styles
  147. Modify as content requires.
  148. ========================================================================== */
  149. @media only screen and (min-width: 480px) {
  150. /* Style adjustments for viewports 480px and over go here */
  151. }
  152. @media only screen and (min-width: 768px) {
  153. /* Style adjustments for viewports 768px and over go here */
  154. }
  155. /* ==|== print styles =======================================================
  156. Print styles.
  157. Inlined to avoid required HTTP connection: h5bp.com/r
  158. ========================================================================== */
  159. @media print {
  160. * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } /* Black prints faster: h5bp.com/s */
  161. a, a:visited { text-decoration: underline; }
  162. a[href]:after { content: " (" attr(href) ")"; }
  163. abbr[title]:after { content: " (" attr(title) ")"; }
  164. .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } /* Don't show links for images, or javascript/internal links */
  165. pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
  166. thead { display: table-header-group; } /* h5bp.com/t */
  167. tr, img { page-break-inside: avoid; }
  168. img { max-width: 100% !important; }
  169. @page { margin: 0.5cm; }
  170. p, h2, h3 { orphans: 3; widows: 3; }
  171. h2, h3 { page-break-after: avoid; }
  172. }