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