home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / phoenx05.zip / phoenix / res / forms.css < prev    next >
Cascading Style Sheet File  |  2002-12-10  |  12KB  |  465 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. /** 
  38.   Styles for old GFX form widgets
  39.  **/ 
  40.  
  41.  
  42. @namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */
  43. @namespace xul url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
  44.  
  45. *|*:-moz-fieldset-content {
  46.   display: block;
  47. }
  48.  
  49. form {
  50.   display: block;
  51.   margin: 0 0 1em 0;
  52. }
  53.  
  54. /* miscellaneous form elements */
  55.  
  56. legend {
  57.   padding-left: 2px;
  58.   padding-right: 2px;
  59.   border: none;
  60. }
  61.  
  62. fieldset {
  63.   display: block;
  64.   margin-left: 2px;
  65.   margin-right: 2px;
  66.   padding: 0.75em 0.625em;
  67.   border: 2px groove ThreeDFace;
  68. }
  69.  
  70. label {
  71.   cursor: default;
  72. }
  73.  
  74. /* default inputs, text inputs, and selects */
  75. input {
  76.   -moz-appearance: textfield;
  77.   /* The sum of border-top, border-bottom, padding-top, padding-bottom
  78.      must be the same here, for buttons, and for <select> (including its
  79.      internal padding magic) */
  80.   padding: 1px 0 1px 0;
  81.   border: 2px inset ThreeDFace;
  82.   background-color: -moz-Field;
  83.   color: -moz-FieldText;
  84.   font: -moz-field;
  85.   line-height: normal !important;
  86.   text-align: start;
  87.   text-transform: none;
  88.   cursor: text;
  89.   -moz-box-sizing: border-box;
  90.   -moz-user-focus: normal;
  91.   -moz-binding: url("resource:///res/builtin/platformHTMLBindings.xml#inputFields");
  92. }
  93.  
  94. textarea {
  95.   margin: 1px 0 1px 0;
  96.   border: 2px inset ThreeDFace;
  97.   background-color: -moz-Field;
  98.   color: -moz-FieldText;
  99.   font: medium -moz-fixed;
  100.   line-height: normal !important;
  101.   text-align: start;
  102.   text-transform: none;
  103.   vertical-align: text-bottom;
  104.   cursor: text;
  105.   -moz-box-sizing: border-box;
  106.   -moz-user-focus: normal;
  107.   -moz-binding: url("resource:///res/builtin/platformHTMLBindings.xml#textAreas");
  108.   -moz-appearance: textfield;
  109. }
  110.  
  111. textarea > scrollbar {
  112.   cursor: default;
  113. }
  114.  
  115. *|*:-moz-singleline-textcontrol-frame {
  116.   overflow: hidden;
  117.   white-space: nowrap;
  118.   background-color: inherit;
  119.   text-align: inherit;
  120. }
  121.  
  122. select {
  123.   margin: 0;
  124.   border-color: ThreeDFace;
  125.   background-color: -moz-Field;
  126.   color: -moz-FieldText;
  127.   font: -moz-list;
  128.   line-height: normal !important;
  129.   white-space: nowrap;
  130.   text-align: start; 
  131.   cursor: default;
  132.   -moz-box-sizing: border-box;
  133.   -moz-user-select: none;
  134.   -moz-user-focus: normal;
  135.   -moz-appearance: menulist;
  136.   border-width: 2px !important;
  137.   border-style: inset !important;
  138.   -moz-border-radius: 0 !important;
  139. }
  140.  
  141. select[size] {
  142.   /* Different alignment and padding for listbox vs combobox */
  143.   vertical-align: text-bottom;
  144.   padding: 1px 0 1px 0;
  145. }
  146.  
  147. select[size="1"] {
  148.   /* Except this is not a listbox */
  149.   vertical-align: baseline;
  150.   padding: 0;
  151.   -moz-appearance: menulist;
  152. }
  153.  
  154. select > input[type="button"] {
  155.   width: 12px;
  156.   height: 12px;
  157.   white-space: nowrap;
  158.   -moz-user-focus: none;
  159.  
  160.   position: static !important;
  161.   background-image: url("arrow.gif") !important;
  162.   background-repeat: no-repeat !important;
  163.   background-position: center !important;
  164.   -moz-appearance: menulist-button;
  165. }
  166.  
  167. select > input[type="button"]:active {
  168.   background-image: url("arrowd.gif") !important;
  169. }
  170.  
  171. select[size], :-moz-select-scrolled-content {
  172.   overflow: -moz-scrollbars-vertical;
  173. }
  174.  
  175. select[size] {
  176.    -moz-appearance: listbox;
  177. }
  178.  
  179. select:-moz-dummy-option { 
  180.   visibility: hidden; 
  181.   content: "XX"; /* demo 8, edge case test 1 */
  182. }
  183.  
  184. *|*:-moz-display-comboboxcontrol-frame {
  185.   overflow: hidden;
  186.   /* This top/bottom padding plus the combobox top/bottom border need to
  187.      add up to the top/bottom borderpadding of text inputs and buttons */ 
  188.   padding: 1px 0 1px 4px;
  189.   background-color: inherit;
  190.   color: inherit;
  191.   white-space: nowrap;
  192.   text-align: inherit;
  193.   -moz-user-select: none;
  194. }
  195.  
  196. option {
  197.   display: block;
  198.   min-height: 1em;
  199.   line-height: normal !important;
  200.   -moz-user-select: none;
  201.   -moz-user-focus: none;
  202. }
  203.  
  204. select > option {
  205.   padding: 0 5px 0 3px;
  206. }
  207.  
  208. option:checked {
  209.   background-color: Highlight ! important;
  210.   color: HighlightText ! important;
  211. }
  212.  
  213. optgroup {
  214.   display: block;
  215.   font: -moz-list;
  216.   line-height: normal !important;
  217.   font-style: italic;
  218.   font-weight: bold;
  219.   -moz-user-select: none;
  220.   -moz-user-focus: none;
  221. }
  222.  
  223. optgroup > option {
  224.   padding-left: 20px;
  225.   font-style: normal;
  226.   font-weight: normal;
  227. }
  228.  
  229. optgroup:before {
  230.   display: block;
  231.   content: attr(label);
  232. }
  233.  
  234. *|*:-moz-dropdown-list {
  235.   z-index: 2147483647;
  236.   background-color: inherit;
  237.   -moz-user-select: none;
  238.  
  239.   border: 1px outset black !important; 
  240.  
  241. input[disabled],
  242. textarea[disabled],
  243. option[disabled],
  244. optgroup[disabled],
  245. select[disabled] {
  246.   color: GrayText;
  247.   background-color: ThreeDFace;
  248.   cursor: default;
  249. }
  250.  
  251. option[disabled],
  252. optgroup[disabled] {
  253.   background-color: transparent;
  254. }
  255.  
  256. /* hidden inputs */
  257. input[type="hidden"] {
  258.   display: none;
  259.   padding: 0;
  260.   border: 0;
  261.   cursor: auto;
  262.   -moz-box-sizing: content-box;
  263.   -moz-user-focus: ignore;
  264.   -moz-binding: none;
  265. }
  266.  
  267. /* image buttons */
  268. input[type="image"] {
  269.   padding: 0;
  270.   border: none;
  271.   background-color: transparent;
  272.   font-family: sans-serif;
  273.   font-size: small;
  274.   cursor: pointer;
  275.   -moz-binding: none;
  276. }
  277.  
  278. input[type="image"][disabled] {
  279.   cursor: default;
  280. }
  281.  
  282. input[type="image"]:focus {
  283.   -moz-outline: 1px dotted -moz-FieldText;
  284. }
  285.  
  286. /* file selector */
  287. input[type="file"] {
  288.   -moz-appearance: none;
  289.   white-space: nowrap;
  290.   cursor: default;
  291.   -moz-binding: none;
  292.  
  293.   padding: 0 !important;
  294.   border-style: none !important;
  295. }
  296.  
  297. input[type="file"] > input[type="text"] {
  298.   border-color: inherit;
  299.   background-color: inherit;
  300.   color: inherit;
  301.   font-size: inherit;
  302.   height: inherit;
  303. }
  304.  
  305. /* button part of file selector */
  306. input[type="file"] > input[type="button"] {
  307.   height: inherit;
  308.   font-size: inherit;
  309. }
  310.  
  311. /* radio buttons */
  312. input[type="radio"] {
  313.   -moz-appearance: radio;
  314.   width: 13px;
  315.   height: 13px;
  316.   margin: 3px 3px 0px 5px;
  317.   padding: 0;
  318.   cursor: default;
  319.   -moz-binding: none;
  320.  
  321.   -moz-border-radius: 100% !important;
  322. }
  323.  
  324. /* check boxes */
  325. input[type="checkbox"] {
  326.   -moz-appearance: checkbox;
  327.   width: 13px;
  328.   height: 13px;
  329.   margin: 3px 3px 3px 4px;
  330.   padding: 0;
  331.   vertical-align: text-bottom;
  332.   cursor: default;
  333.   -moz-binding: none;
  334.  
  335.   -moz-border-radius: 0 !important;
  336. }
  337.  
  338. /* common features of radio buttons and check boxes */
  339.  
  340. input[type="radio"],
  341. input[type="checkbox"] {
  342.   /* same colors as |input| rule, but |!important| this time. */
  343.   background-color: -moz-Field ! important;
  344.   color: -moz-FieldText ! important;
  345.   border: 2px inset ThreeDFace ! important;
  346. }
  347.  
  348. input[type="radio"][disabled],
  349. input[type="radio"][disabled]:active,
  350. input[type="radio"][disabled]:hover,
  351. input[type="radio"][disabled]:hover:active,
  352. input[type="checkbox"][disabled],
  353. input[type="checkbox"][disabled]:active,
  354. input[type="checkbox"][disabled]:hover,
  355. input[type="checkbox"][disabled]:hover:active {
  356.   padding: 1px;
  357.   border: 1px inset ThreeDShadow ! important;
  358.   /* same as above, but !important */
  359.   color: GrayText ! important;
  360.   background-color: ThreeDFace ! important;
  361. }
  362.  
  363. input[type="checkbox"]:focus,
  364. input[type="radio"]:focus {
  365.   border-style: groove !important;
  366. }
  367.  
  368. input[type="checkbox"]:hover:active,
  369. input[type="radio"]:hover:active {
  370.   background-color: ThreeDFace ! important;
  371.   border-style: inset !important;
  372. }
  373.  
  374. *|*:-moz-radio {
  375.   width: 4px;
  376.   height: 4px;
  377.   background-color: -moz-FieldText ! important;
  378.   -moz-border-radius: 3px;
  379. }
  380.  
  381. /* buttons */
  382. button, 
  383. input[type="reset"],
  384. input[type="button"],
  385. input[type="submit"] { 
  386.   -moz-appearance: button;
  387.   /* The sum of border-top, border-bottom, padding-top, padding-bottom
  388.      must be the same here, for text inputs, and for <select>.  For
  389.      buttons, make sure to include the -moz-focus-inner border/padding. */
  390.   padding: 0px 6px 0px 6px;
  391.   border: 2px outset ButtonFace;
  392.   background-color: ButtonFace;
  393.   color: ButtonText; 
  394.   font: -moz-button;
  395.   line-height: normal !important;
  396.   white-space: pre;
  397.   cursor: default;
  398.   -moz-box-sizing: border-box;
  399.   -moz-user-select: none;
  400.   -moz-user-focus: normal;
  401.   -moz-binding: none;
  402. }
  403.  
  404. button {
  405.   /* Buttons should lay out like "normal" html, mostly */
  406.   white-space: normal;  
  407. }
  408.  
  409. *|*:-moz-button-content {
  410.   display: block;
  411.   text-align: center;
  412. }
  413.  
  414. button:active:hover,
  415. input[type="reset"]:active:hover,
  416. input[type="button"]:active:hover,
  417. input[type="submit"]:active:hover {
  418.   padding: 0px 5px 0px 7px;
  419.   border-style: inset;
  420. }
  421.  
  422. button:-moz-focus-inner,
  423. input[type="reset"]:-moz-focus-inner,
  424. input[type="button"]:-moz-focus-inner,
  425. input[type="submit"]:-moz-focus-inner,
  426. input[type="file"] > input[type="button"]:-moz-focus-inner {
  427.   padding: 0px 2px 0px 2px;
  428.   border: 1px dotted transparent;
  429. }
  430.  
  431. button:focus:-moz-focus-inner,
  432. input[type="reset"]:focus:-moz-focus-inner,
  433. input[type="button"]:focus:-moz-focus-inner,
  434. input[type="submit"]:focus:-moz-focus-inner,
  435. input[type="file"] > input[type="button"]:focus:-moz-focus-inner {
  436.   border-color: ButtonText;
  437. }
  438.  
  439. button[disabled]:active, button[disabled],
  440. input[type="reset"][disabled]:active,
  441. input[type="reset"][disabled],
  442. input[type="button"][disabled]:active,
  443. input[type="button"][disabled],
  444. select[disabled] > input[type="button"],
  445. select[disabled] > input[type="button"]:active,
  446. input[type="submit"][disabled]:active,
  447. input[type="submit"][disabled] {
  448.   /* The sum of border-top, border-bottom, padding-top, padding-bottom
  449.      must be the same here and for text inputs */
  450.   padding: 1px 6px 1px 6px;
  451.   border: 1px outset ButtonShadow;
  452.   color: GrayText;
  453. }
  454.  
  455. @media print {
  456.   input, textarea, select, button {
  457.     -moz-user-focus: none !important;
  458.     -moz-user-input: none !important;
  459.   }
  460.  
  461.   input[type="file"] { height: 2em; }
  462. }
  463.  
  464.