home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 January / 01_02.iso / software / netscape62win / browser.xpi / bin / res / forms.css < prev    next >
Cascading Style Sheet File  |  2001-08-28  |  8KB  |  375 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. /** 
  23.   Styles for old GFX form widgets
  24.  **/ 
  25.  
  26.  
  27. @namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */
  28.  
  29. *|*:fieldset-content {
  30.   display: block;
  31. }
  32.  
  33. form {
  34.   display: block;
  35.   margin: 0 0 1em 0;
  36. }
  37.  
  38. /* miscellaneous form elements */
  39.  
  40. legend {
  41.   padding-left: 2px;
  42.   padding-right: 2px;
  43.   border: none;
  44. }
  45.  
  46. fieldset {
  47.   display: block;
  48.   border: 2px solid black;
  49.   padding: 4px 4px 4px 4px;
  50.   margin-left: 2px;
  51.   margin-right: 2px;
  52. }
  53.  
  54. /* default inputs, text inputs, and selects */
  55. input {
  56.   background-color: -moz-Field;
  57.   border: 2px inset ThreeDFace;
  58.   color: -moz-FieldText;
  59.   cursor: text;
  60.   font: field;
  61.   text-align: start;
  62.   vertical-align: text-bottom;
  63.   -moz-box-sizing: border-box;
  64.   -moz-user-focus: normal;
  65.   -moz-binding: url("resource:///res/builtin/platformHTMLBindings.xml#inputFields");
  66.   padding: 1px 0 1px 0;
  67. }
  68.  
  69. textarea {
  70.   background-color: -moz-Field;
  71.   border: 2px inset ThreeDFace;
  72.   color: -moz-FieldText;
  73.   cursor: text;
  74.   font: medium -moz-fixed;
  75.   margin: 1px 0 1px 0;
  76.   text-align: start;
  77.   vertical-align: text-bottom;
  78.   -moz-box-sizing: border-box;
  79.   -moz-user-focus: normal;
  80.   -moz-binding: url("resource:///res/builtin/platformHTMLBindings.xml#textAreas");
  81. }
  82.  
  83. textarea > scrollbar {
  84.   cursor: default;
  85. }
  86.  
  87. *|*:-moz-singleline-textcontrol-frame {
  88.   overflow: hidden;
  89.   white-space: nowrap;
  90.   background-color: inherit;
  91.   text-align: inherit;
  92. }
  93.  
  94. select {
  95.   font: list;
  96.   background-color: -moz-Field;
  97.   border: 2px inset ThreeDFace;
  98.   margin: 0;
  99.   vertical-align: text-bottom;
  100.   color: -moz-FieldText;
  101.   white-space: nowrap;
  102.   text-align: start; 
  103.   cursor: default;
  104.   -moz-user-select: none;
  105.   -moz-user-focus: normal;
  106.   -moz-box-sizing: border-box;
  107. }
  108.  
  109. select[size] {
  110.   padding: 1px 0 1px 0;
  111. }
  112. select[size="1"] {
  113.   padding: 0;
  114. }
  115.  
  116. select > input[type="button"] {
  117.   position: static ! important;
  118.   white-space: nowrap;
  119.   background-image: url("arrow.gif") !important;
  120.   background-repeat: no-repeat !important;
  121.   background-position: center !important;
  122.   width: 12px;
  123.   height: 12px;
  124.   -moz-user-focus: none;
  125. }
  126.  
  127. select > input[type="button"]:active {
  128.   background-image: url("arrowd.gif") !important;
  129. }
  130.  
  131. select[size], :-moz-select-scrolled-content {
  132.   overflow: -moz-scrollbars-vertical;
  133. }
  134.  
  135. select:-moz-dummy-option { 
  136.   visibility: hidden; 
  137.   content: "XX"; /* demo 8, edge case test 1 */
  138. }
  139.  
  140. *|*:-moz-display-comboboxcontrol-frame {
  141.   overflow: hidden;
  142.   white-space: nowrap;
  143.   background-color: inherit;
  144.   color: inherit;
  145.   text-align: inherit;
  146.   padding: 1px 0 1px 4px;
  147.   -moz-user-select: none;
  148. }
  149.  
  150. option {
  151.   min-height: 1em;
  152.   display: block;
  153.   -moz-user-select: none;
  154.   -moz-user-focus: none;
  155. }
  156.  
  157. select > option {
  158.   padding: 0 5px 0 3px;
  159. }
  160.  
  161. option[_moz-option-selected] {
  162.   color: HighlightText ! important;
  163.   background-color: Highlight ! important;
  164. }
  165.  
  166. optgroup {
  167.   display: block;
  168.   font: list;
  169.   font-style: italic;
  170.   font-weight: bold;
  171.   -moz-user-select: none;
  172.   -moz-user-focus: none;
  173. }
  174.  
  175. optgroup > option {
  176.   padding-left: 20px;
  177.   font-style: normal;
  178.   font-weight: normal;
  179. }
  180.  
  181. optgroup:before {
  182.   display: block;
  183.   content: attr(label);
  184. }
  185.  
  186. *|*:-moz-dropdown-list {
  187.   background-color: inherit;
  188.   border: 1px outset black; 
  189.   z-index: 2147483647;
  190.   -moz-user-select: none;
  191.  
  192. input[disabled],
  193. textarea[disabled],
  194. option[disabled],
  195. select[disabled],
  196. select[disabled] > :-moz-display-comboboxcontrol-frame {
  197.   color: GrayText;
  198.   cursor: default;
  199. }
  200.  
  201. /* hidden inputs */
  202. input[type="hidden"] {
  203.   border: none;
  204.   visibility: hidden;
  205.   -moz-binding: none;
  206. }
  207.  
  208. /* image buttons */
  209. input[type="image"] {
  210.   border: none;
  211.   vertical-align: baseline;
  212.   background-color: transparent;
  213.   cursor: pointer;
  214.   font-family: sans-serif;
  215.   font-size: small;
  216.   -moz-binding: none;
  217.   padding: 0;
  218. }
  219.  
  220. input[type="image"][disabled] {
  221.   cursor: default;
  222. }
  223.  
  224. input[type="image"]:focus {
  225.   -moz-outline: 1px dotted -moz-FieldText;
  226. }
  227.  
  228. /* file selector */
  229. input[type="file"] {
  230.   white-space: nowrap;
  231.   border: none;
  232.   cursor: default;
  233.   -moz-binding: none;
  234.   padding: 0;
  235. }
  236.  
  237. /* button part of file selector */
  238. input[type="file"] > input[type="button"] {
  239.   height: inherit;
  240. }
  241.  
  242. input[type="file"] > input[type="button"]:-moz-focus-inner
  243.  {
  244.   padding: 0px 2px 0px 2px;
  245.   border: 1px dotted transparent;
  246. }
  247.  
  248. /* radio buttons */
  249. input[type="radio"] {
  250.   border: 2px inset ThreeDFace;
  251.   background-color: -moz-Field;
  252.   color: -moz-FieldText;
  253.   width: 12px;
  254.   height: 12px;
  255.   cursor: default;
  256.   vertical-align: baseline;
  257.   -moz-border-radius: 100%;
  258.   -moz-binding: none;
  259.   margin: 3px 3px 0px 5px;
  260.   padding: 0;
  261. }
  262.  
  263. /* check boxes */
  264. input[type="checkbox"] {
  265.   border: 2px inset ThreeDFace;
  266.   background-color: -moz-Field;
  267.   color: -moz-FieldText;
  268.   width: 13px;
  269.   height: 13px;
  270.   cursor: default;
  271.   vertical-align: text-bottom;
  272.   -moz-binding: none;
  273.   margin: 3px 3px 3px 4px;
  274.   padding: 0;
  275. }
  276.  
  277. /* common features of radio buttons and check boxes */
  278. input[type="radio"][disabled],
  279. input[type="radio"][disabled]:active,
  280. input[type="radio"][disabled]:hover,
  281. input[type="radio"][disabled]:hover:active,
  282. input[type="checkbox"][disabled],
  283. input[type="checkbox"][disabled]:active,
  284. input[type="checkbox"][disabled]:hover,
  285. input[type="checkbox"][disabled]:hover:active {
  286.   padding: 1px;
  287.   border: 1px inset ThreeDShadow;
  288.   background-color: GrayText;
  289. }
  290.  
  291. input[type="checkbox"]:focus,
  292. input[type="radio"]:focus {
  293.   border-style: groove;
  294. }
  295.  
  296. input[type="checkbox"]:hover:active,
  297. input[type="radio"]:hover:active {
  298.   border-style: inset;
  299.   background-color: ThreeDHighlight;
  300. }
  301.  
  302. *|*:-moz-radio {
  303.   background-color: -moz-FieldText;
  304.   width: 4px;
  305.   height: 4px;
  306.   left: 6px;
  307.   top: 6px;
  308.   -moz-border-radius: 3px;
  309. }
  310.  
  311. /* buttons */
  312. button, 
  313. input[type="reset"],
  314. input[type="button"],
  315. input[type="submit"] { 
  316.   border: 2px outset ButtonFace;
  317.   background-color: ButtonFace;
  318.   color: ButtonText; 
  319.   padding: 2px 0 2px 0;
  320.   font: button;
  321.   cursor: default;
  322.   white-space: pre;
  323.   -moz-box-sizing: border-box;
  324.   -moz-user-select: none;
  325.   -moz-user-focus: normal;
  326.   -moz-binding: none;
  327. }
  328.  
  329. *|*:button-content {
  330.   display: block;
  331.   text-align: center;
  332. }
  333.  
  334. button:active:hover,
  335. input[type="reset"]:active:hover,
  336. input[type="button"]:active:hover,
  337. input[type="submit"]:active:hover {
  338.   border-style: inset;
  339.   padding: 3px 0 1px 0;
  340. }
  341.  
  342. button:-moz-focus-inner,
  343. input[type="reset"]:-moz-focus-inner,
  344. input[type="button"]:-moz-focus-inner,
  345. input[type="submit"]:-moz-focus-inner {
  346.   padding: 1px 2px 1px 2px;
  347.   border: 1px dotted transparent;
  348. }
  349.  
  350. button:focus:-moz-focus-inner,
  351. input[type="reset"]:focus:-moz-focus-inner,
  352. input[type="button"]:focus:-moz-focus-inner,
  353. input[type="submit"]:focus:-moz-focus-inner {
  354.   border-color: ButtonText;
  355. }
  356.  
  357. button[disabled]:active, button[disabled],
  358. input[type="reset"][disabled]:active,
  359. input[type="reset"][disabled],
  360. input[type="button"][disabled]:active,
  361. input[type="button"][disabled],
  362. input[type="file"][disabled] > input[type="button"],
  363. input[type="file"][disabled] > input[type="button"]:active,
  364. select[disabled] > input[type="button"],
  365. select[disabled] > input[type="button"]:active,
  366. input[type="submit"][disabled]:active,
  367. input[type="submit"][disabled] {
  368.   border: 1px outset ButtonShadow;
  369.   padding: 3px 1px 3px 1px;
  370.   color: GrayText;
  371. }
  372.  
  373.  
  374.