home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / phoenx05.zip / phoenix / res / quirk.css < prev    next >
Cascading Style Sheet File  |  2002-12-10  |  11KB  |  290 lines

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