home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 January / 01_02.iso / software / netscape62win / browser.xpi / bin / res / quirk.css < prev    next >
Cascading Style Sheet File  |  2001-09-07  |  9KB  |  329 lines

  1. /*
  2.  * The contents of this file are subject to the Netscape Public
  3.  * License Version 1.1 (the "License"); you may not use this file
  4.  * except in compliance with the License. You may obtain a copy of
  5.  * the License at http://www.mozilla.org/NPL/
  6.  *
  7.  * Software distributed under the License is distributed on an "AS
  8.  * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  9.  * implied. See the License for the specific language governing
  10.  * rights and limitations under the License.
  11.  *
  12.  * The Original Code is mozilla.org code.
  13.  *
  14.  * The Initial Developer of the Original Code is Netscape
  15.  * Communications Corporation.  Portions created by Netscape are
  16.  * Copyright (C) 1998 Netscape Communications Corporation. All
  17.  * Rights Reserved.
  18.  *
  19.  * Contributor(s): 
  20.  */
  21.  
  22. @namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */
  23.  
  24. /* Quirk: input images have a blue border (b=28010) */ 
  25.  
  26. /* default border */
  27. input[type=image] {
  28.   border: 2px solid blue;
  29. }
  30.  
  31. /* border when focused -- only change style to dotted */
  32. input[type=image]:focused {
  33.   border-style: dotted;
  34. }
  35.  
  36. /* border when focused -- only change color to gray */
  37. input[type=image][disabled] {
  38.   border-color: GrayText;
  39. }
  40.  
  41.  
  42. /* Quirk: make orphaned LIs have inside bullet (b=1049) */
  43.  
  44. /* force inside position for orphaned lis */
  45. li {
  46.   list-style-position: inside; 
  47. }
  48.  
  49. /* restore outside position for lists inside LIs */
  50. li ul, li ol, li dir, li menu { 
  51.   list-style-position: outside; 
  52. }
  53.  
  54. /* undo previous two rules for properly nested lists */
  55.   ul ul,   ul ol,   ul dir,   ul menu,   ul li,
  56.   ol ul,   ol ol,   ol dir,   ol menu,   ol li,
  57.  dir ul,  dir ol,  dir dir,  dir menu,  dir li,
  58. menu ul, menu ol, menu dir, menu menu, menu li {
  59.   list-style-position: inherit;
  60. }
  61.  
  62.  
  63. /* Quirk: ensure that we get proper padding if the very first 
  64.  * node in an LI is another UL or OL. This is an ugly way to
  65.  * fix the problem, because it extends the LI up into what
  66.  * would otherwise appear to be the ULs space. (b=38832) */
  67. /* Note: this fix will fail once we implement marker box 
  68.  * alignment correctly. */
  69. li > ul:first-node,
  70. li > ol:first-node {
  71.   padding-top: 1em;
  72. }
  73.  
  74. /* Quirk: prevent bullet from resizing with the list item
  75.  *   see bug 97351
  76.  */
  77. li:-moz-list-bullet {
  78.   font-size: -moz-initial;
  79. }
  80.  
  81. /* Quirk: cut off all font inheritance in tables and captions except for family. */
  82. table, caption {
  83.   font-size: -moz-initial;
  84.   font-weight: -moz-initial;
  85.   font-style: -moz-initial;
  86.   font-variant: -moz-initial;
  87. }
  88.  
  89. table {
  90.   text-align: -moz-initial;
  91.   white-space: normal; /* compatible with IE & spec */
  92. }
  93.  
  94. /* Quirk: make sure backgrounds are inherited in tables */
  95. td, th, tr {
  96.   background: inherit;
  97. }
  98.  
  99. td[bgcolor], td[background], th[bgcolor], th[background] {
  100.   empty-cells: show;
  101. }
  102.  
  103. /* Quirk: collapse top margin of BODY and TD and bottom margin of TD */
  104.  
  105. /*
  106.  * While it may seem simpler to use :first-node and :last-node without
  107.  * tags, it's slower, since we have to do the :first-node or :last-node
  108.  * check on every single element in the document.  If we list all the
  109.  * element names for which the UA stylesheet specifies a margin, the
  110.  * selectors will be hashed in the RuleHash and things will be much more
  111.  * efficient.
  112.  */
  113.  
  114. body > form:first-node, td > form:first-node,
  115. body > p:first-node, td > p:first-node,
  116. body > dl:first-node, td > dl:first-node,
  117. body > multicol:first-node, td > multicol:first-node,
  118. body > blockquote:first-node, td > blockquote:first-node,
  119. body > h1:first-node, td > h1:first-node,
  120. body > h2:first-node, td > h2:first-node,
  121. body > h3:first-node, td > h3:first-node,
  122. body > h4:first-node, td > h4:first-node,
  123. body > h5:first-node, td > h5:first-node,
  124. body > h6:first-node, td > h6:first-node,
  125. body > listing:first-node, td > listing:first-node,
  126. body > plaintext:first-node, td > plaintext:first-node,
  127. body > xmp:first-node, td > xmp:first-node,
  128. body > pre:first-node, td > pre:first-node,
  129. body > ul:first-node, td > ul:first-node,
  130. body > menu:first-node, td > menu:first-node,
  131. body > dir:first-node, td > dir:first-node,
  132. body > ol:first-node, td > ol:first-node {
  133.   margin-top: 0;
  134. }
  135.  
  136. td > form:last-node,
  137. td > p:last-node,
  138. td > dl:last-node,
  139. td > multicol:last-node,
  140. td > blockquote:last-node,
  141. td > h1:last-node,
  142. td > h2:last-node,
  143. td > h3:last-node,
  144. td > h4:last-node,
  145. td > h5:last-node,
  146. td > h6:last-node,
  147. td > listing:last-node,
  148. td > plaintext:last-node,
  149. td > xmp:last-node,
  150. td > pre:last-node,
  151. td > ul:last-node,
  152. td > menu:last-node,
  153. td > dir:last-node,
  154. td > ol:last-node {
  155.   margin-bottom: 0;
  156. }
  157.  
  158. /* Same as above, but for empty elements
  159.  *  - see bug 97361
  160.  */
  161. body > form:empty:first-node, td > form:empty:first-node,
  162. body > p:empty:first-node, td > p:empty:first-node,
  163. body > dl:empty:first-node, td > dl:empty:first-node,
  164. body > multicol:empty:first-node, td > multicol:empty:first-node,
  165. body > blockquote:empty:first-node, td > blockquote:empty:first-node,
  166. body > h1:empty:first-node, td > h1:empty:first-node,
  167. body > h2:empty:first-node, td > h2:empty:first-node,
  168. body > h3:empty:first-node, td > h3:empty:first-node,
  169. body > h4:empty:first-node, td > h4:empty:first-node,
  170. body > h5:empty:first-node, td > h5:empty:first-node,
  171. body > h6:empty:first-node, td > h6:empty:first-node,
  172. body > listing:empty:first-node, td > listing:empty:first-node,
  173. body > plaintext:empty:first-node, td > plaintext:empty:first-node,
  174. body > xmp:empty:first-node, td > xmp:empty:first-node,
  175. body > pre:empty:first-node, td > pre:empty:first-node,
  176. body > ul:empty:first-node, td > ul:empty:first-node,
  177. body > menu:empty:first-node, td > menu:empty:first-node,
  178. body > dir:empty:first-node, td > dir:empty:first-node,
  179. body > ol:empty:first-node, td > ol:empty:first-node {
  180.   margin-bottom: 0;
  181. }
  182.  
  183. td > form:empty:last-node,
  184. td > p:empty:last-node,
  185. td > dl:empty:last-node,
  186. td > multicol:empty:last-node,
  187. td > blockquote:empty:last-node,
  188. td > h1:empty:last-node,
  189. td > h2:empty:last-node,
  190. td > h3:empty:last-node,
  191. td > h4:empty:last-node,
  192. td > h5:empty:last-node,
  193. td > h6:empty:last-node,
  194. td > listing:empty:last-node,
  195. td > plaintext:empty:last-node,
  196. td > xmp:empty:last-node,
  197. td > pre:empty:last-node,
  198. td > ul:empty:last-node,
  199. td > menu:empty:last-node,
  200. td > dir:empty:last-node,
  201. td > ol:empty:last-node {
  202.   margin-top: 0;
  203. }
  204.  
  205.  
  206. /* Quirk: support the ways of making PRE have wrapping */
  207. pre[wrap], pre[cols], pre[width] {
  208.   white-space: -moz-pre-wrap;
  209. }
  210.  
  211.  
  212. /* Temporary - Test of full time Standard mode for forms Bug 91602 
  213. input[type="text"] {
  214.   padding: 1px 0 0 0;
  215.  
  216. input[type="radio"] {
  217.   margin: 2px 5px 4px 3px;
  218.   vertical-align: bottom;
  219. }
  220.  
  221. input[type="checkbox"] {
  222.   margin: 3px 4px 3px 3px;
  223.   vertical-align: bottom;
  224. }
  225.  
  226. button, 
  227. input[type="reset"],
  228. input[type="button"],
  229. input[type="submit"] { 
  230.   vertical-align: bottom;
  231. }
  232.  
  233. td select[size] {
  234.   margin-top: 0px;
  235.   margin-bottom: 1px;
  236. }
  237.  
  238. td select, td select[size="1"] {
  239.   margin-top: 2px;
  240.   margin-bottom: 2px;
  241. }
  242.  
  243. td input[type="text"], input[type="password"] {
  244.   margin-top: 1px;
  245.   margin-bottom: 1px;
  246. }
  247.  
  248. td input[type="checkbox"],
  249. td input[type="radio"] {
  250.   margin-bottom: 1px;
  251. }
  252.  
  253. td textarea {
  254.   margin-top: 1px;
  255.   margin-bottom: 2px;
  256. }
  257. */
  258.  
  259. /* Quirk: HRs avoid floats (b=18754) */
  260.  
  261. hr {
  262.   display: inline;
  263.   -moz-box-sizing: border-box;
  264.   margin: 0 0.1% 0 0.1%; /* Mmm! Hack-on-a-hack for bug 81776 */
  265. }
  266.  
  267. hr:before {
  268.   white-space: pre;
  269.   content: "\A";
  270. }
  271.  
  272. hr:after {
  273.   white-space: pre;
  274.   content: "\A";
  275. }
  276.  
  277. /* Quirk: DD not in DL has text-indent instead of margin (b=5119) */
  278.  
  279. :not(dl) > dd {
  280.   display: inline;
  281.   margin: 0;
  282. }
  283.  
  284. :not(dl) > dd:before {
  285.   display: inline;
  286.   white-space: pre;
  287.   font-size: 1px;
  288.   line-height: 0;
  289.   content: "\A  ";
  290.   margin-right: 40px;
  291. }
  292.  
  293. /* quirk to indent nested DL elements (b=8749) */
  294. dl > dl {
  295.   display: block;
  296.   margin-left: 40px;
  297. }
  298.  
  299. /* Quirk: MAP acts like an inline, not a block */
  300. map {
  301.   display: inline;
  302. }
  303.  
  304. /* Quirk: Make floated images have a margin  (b=58899) */
  305. img[align=left] {
  306.   margin-right: 3px;
  307. }
  308.  
  309. img[align=right] {
  310.   margin-left: 3px;
  311. }
  312.  
  313. /*
  314.  * XXX This is a potential performance problem.  This should not be
  315.  * using an attribute!
  316.  */
  317.  
  318. /* Quirk: Make sure that the residual style tags' size info. 
  319.  * does not take precedence over heading tags' size. (b=77352)
  320.  * Note: This special attribute is set only for a residual 
  321.  * style tag within a heading tag.
  322.  */
  323. *[_moz-rs-heading] { 
  324.   font-size: inherit !important; 
  325. }
  326.  
  327.  
  328.