Posted By


pussard on 06/10/11

Tagged


Statistics


Viewed 79 times
Favorited by 0 user(s)

Localized reset


/ Published in: CSS
Save to your folder(s)

Based on HTML5 Boilerplate 1.0
Replace #foo with selector to contain the reset to only include elements within specified container. Used for when you need a reset without affecting the rest of the existing styles on the page.


Copy this code and paste it in your HTML
  1. #foo html, #foo body, #foo div, #foo span, #foo object, #foo iframe,
  2. #foo h1, #foo h2, #foo h3, #foo h4, #foo h5, #foo h6, #foo p, #foo blockquote, #foo pre,
  3. #foo abbr, #foo address, #foo cite, #foo code, #foo del, #foo dfn, #foo em, #foo img, #foo ins, #foo kbd, #foo q, #foo samp,
  4. #foo small, #foo strong, #foo sub, #foo sup, #foo var, #foo b, #foo i, #foo dl, #foo dt, #foo dd, #foo ol, #foo ul, #foo li,
  5. #foo fieldset, #foo form, #foo label, #foo legend,
  6. #foo table, #foo caption, #foo tbody, #foo tfoot, #foo thead, #foo tr, #foo th, #foo td,
  7. #foo article, #foo aside, #foo canvas, #foo details, #foo figcaption, #foo figure,
  8. #foo footer, #foo header, #foo hgroup, #foo menu, #foo nav, #foo section, #foo summary,
  9. #foo time, #foo mark, #foo audio, #foo video {
  10. margin: 0;
  11. padding: 0;
  12. border: 0;
  13. font-size: 100%;
  14. font: inherit;
  15. vertical-align: baseline;
  16. }
  17.  
  18. #foo article, #foo aside, #foo details, #foo figcaption, #foo figure,
  19. #foo footer, #foo header, #foo hgroup, #foo menu, #foo nav, #foo section {
  20. display: block;
  21. }
  22.  
  23. #foo blockquote, #foo q { quotes: none; }
  24. #foo blockquote:before, #foo blockquote:after,
  25. #foo q:before, #foo q:after { content: ""; content: none; }
  26. #foo ins { background-color: #ff9; color: #000; text-decoration: none; }
  27. #foo mark { background-color: #ff9; color: #000; font-style: italic; font-weight: bold; }
  28. #foo del { text-decoration: line-through; }
  29. #foo abbr[title], #foo dfn[title] { border-bottom: 1px dotted; cursor: help; }
  30. #foo table { border-collapse: collapse; border-spacing: 0; }
  31. #foo hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; }
  32. #foo input, #foo select { vertical-align: middle; }
  33.  
  34. body { font:13px/1.231 sans-serif; *font-size:small; }
  35. #foo select, #foo input, #foo textarea, #foo button { font:99% sans-serif; }
  36. #foo pre, #foo code, #foo kbd, #foo samp { font-family: monospace, sans-serif; }
  37.  
  38. html { overflow-y: scroll; }
  39. #foo a:hover, #foo a:active { outline: none; }
  40. #foo ul, #foo ol { margin-left: 2em; }
  41. #foo ol { list-style-type: decimal; }
  42. #foo nav ul, #foo nav li { margin: 0; list-style:none; list-style-image: none; }
  43. #foo small { font-size: 85%; }
  44. #foo strong, #foo th { font-weight: bold; }
  45. #foo td { vertical-align: top; }
  46. #foo sub, #foo sup { font-size: 75%; line-height: 0; position: relative; }
  47. #foo sup { top: -0.5em; }
  48. #foo sub { bottom: -0.25em; }
  49.  
  50. #foo pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; padding: 15px; }
  51. #foo textarea { overflow: auto; }
  52. .ie6 legend, .ie7 legend { margin-left: -7px; }
  53. #foo input[type="radio"] { vertical-align: text-bottom; }
  54. #foo input[type="checkbox"] { vertical-align: bottom; }
  55. .ie7 input[type="checkbox"] { vertical-align: baseline; }
  56. .ie6 input { vertical-align: text-bottom; }
  57. #foo label, #foo input[type="button"], #foo input[type="submit"], #foo input[type="image"], #foo button { cursor: pointer; }
  58. #foo button, #foo input, #foo select, #foo textarea { margin: 0; }
  59. #foo input:valid, #foo textarea:valid { }
  60. #foo input:invalid, #foo textarea:invalid { border-radius: 1px; -moz-box-shadow: 0px 0px 5px red; -webkit-box-shadow: 0px 0px 5px red; box-shadow: 0px 0px 5px red; }
  61. .no-boxshadow input:invalid, .no-boxshadow textarea:invalid { background-color: #f0dddd; }
  62.  
  63.  
  64. #foo ::-moz-selection{ background: #FF5E99; color:#fff; text-shadow: none; }
  65. #foo ::selection { background:#FF5E99; color:#fff; text-shadow: none; }
  66. #foo a:link { -webkit-tap-highlight-color: #FF5E99; }
  67. #foo button { width: auto; overflow: visible; }
  68. .ie7 img { -ms-interpolation-mode: bicubic; }
  69.  
  70. body, #foo select, #foo input, #foo textarea { color: #444; }
  71. #foo h1, #foo h2, #foo h3, #foo h4, #foo h5, #foo h6 { font-weight: bold; }
  72. #foo a, #foo a:active, #foo a:visited { color: #607890; }
  73. #foo a:hover { color: #036; }
  74.  
  75. #foo .ir { display: block; text-indent: -999em; overflow: hidden; background-repeat: no-repeat; text-align: left; direction: ltr; }
  76. #foo .hidden { display: none; visibility: hidden; }
  77. #foo .visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
  78. #foo .visuallyhidden.focusable:active,
  79. #foo .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; }
  80. #foo .invisible { visibility: hidden; }
  81. #foo .clearfix:before, #foo .clearfix:after { content: "\0020"; display: block; height: 0; overflow: hidden; }
  82. #foo .clearfix:after { clear: both; }
  83. #foo .clearfix { zoom: 1; }
  84.  
  85. @media print {
  86. * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important;
  87. -ms-filter: none !important; }
  88. a, a:visited { color: #444 !important; text-decoration: underline; }
  89. a[href]:after { content: " (" attr(href) ")"; }
  90. abbr[title]:after { content: " (" attr(title) ")"; }
  91. .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; }
  92. pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
  93. thead { display: table-header-group; }
  94. tr, img { page-break-inside: avoid; }
  95. @page { margin: 0.5cm; }
  96. p, h2, h3 { orphans: 3; widows: 3; }
  97. h2, h3{ page-break-after: avoid; }
  98. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.