Return styles to browser defaults.

default.css 56KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  4. @namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */
  5. @namespace xul url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
  6. /* bidi */
  7. :has-dir-attr {
  8. unicode-bidi: isolate;
  9. }
  10. :dir-attr-rtl {
  11. direction: rtl;
  12. }
  13. :dir-attr-ltr {
  14. direction: ltr;
  15. }
  16. :dir-attr-like-auto:dir(ltr) { direction: ltr; }
  17. :dir-attr-like-auto:dir(rtl) { direction: rtl; }
  18. /* To ensure http://www.w3.org/TR/REC-html40/struct/dirlang.html#style-bidi:
  19. *
  20. * "When a block element that does not have a dir attribute is transformed to
  21. * the style of an inline element by a style sheet, the resulting presentation
  22. * should be equivalent, in terms of bidirectional formatting, to the
  23. * formatting obtained by explicitly adding a dir attribute (assigned the
  24. * inherited value) to the transformed element."
  25. *
  26. * and the rules in http://dev.w3.org/html5/spec/rendering.html#rendering
  27. */
  28. address,
  29. article,
  30. aside,
  31. blockquote,
  32. body,
  33. caption,
  34. center,
  35. col,
  36. colgroup,
  37. dd,
  38. dir,
  39. div,
  40. dl,
  41. dt,
  42. fieldset,
  43. figcaption,
  44. figure,
  45. footer,
  46. form,
  47. h1,
  48. h2,
  49. h3,
  50. h4,
  51. h5,
  52. h6,
  53. header,
  54. hgroup,
  55. hr,
  56. html,
  57. legend,
  58. li,
  59. listing,
  60. main,
  61. marquee,
  62. menu,
  63. nav,
  64. noframes,
  65. ol,
  66. p,
  67. plaintext,
  68. pre,
  69. section,
  70. summary,
  71. table,
  72. tbody,
  73. td,
  74. tfoot,
  75. th,
  76. thead,
  77. tr,
  78. ul,
  79. xmp {
  80. unicode-bidi: isolate;
  81. }
  82. bdi, output {
  83. unicode-bidi: isolate;
  84. }
  85. /* We need the "bdo:has-dir-attr" bit because "bdo" has lower
  86. specificity than the ":has-dir-attr" selector above. */
  87. bdo, bdo:has-dir-attr {
  88. unicode-bidi: isolate-override;
  89. }
  90. textarea:dir-attr-like-auto,
  91. pre:dir-attr-like-auto {
  92. unicode-bidi: plaintext;
  93. }
  94. /* blocks */
  95. article,
  96. aside,
  97. details,
  98. div,
  99. dt,
  100. figcaption,
  101. footer,
  102. form,
  103. header,
  104. hgroup,
  105. html,
  106. main,
  107. nav,
  108. section,
  109. summary {
  110. display: block;
  111. }
  112. body {
  113. display: block;
  114. margin: 8px;
  115. }
  116. p, dl, multicol {
  117. display: block;
  118. margin-block-start: 1em;
  119. margin-block-end: 1em;
  120. }
  121. dd {
  122. display: block;
  123. margin-inline-start: 40px;
  124. }
  125. blockquote, figure {
  126. display: block;
  127. margin-block-start: 1em;
  128. margin-block-end: 1em;
  129. margin-inline-start: 40px;
  130. margin-inline-end: 40px;
  131. }
  132. address {
  133. display: block;
  134. font-style: italic;
  135. }
  136. center {
  137. display: block;
  138. text-align: center;
  139. }
  140. blockquote[type=cite] {
  141. display: block;
  142. margin-block-start: 1em;
  143. margin-block-end: 1em;
  144. margin-inline-start: 0;
  145. margin-inline-end: 0;
  146. padding-inline-start: 1em;
  147. border-inline-start: solid;
  148. border-color: blue;
  149. border-width: thin;
  150. }
  151. span[_moz_quote=true] {
  152. color: blue;
  153. }
  154. pre[_moz_quote=true] {
  155. color: blue;
  156. }
  157. h1 {
  158. display: block;
  159. font-size: 2em;
  160. font-weight: bold;
  161. margin-block-start: .67em;
  162. margin-block-end: .67em;
  163. }
  164. h2,
  165. :matches(article, aside, nav, section)
  166. h1 {
  167. display: block;
  168. font-size: 1.5em;
  169. font-weight: bold;
  170. margin-block-start: .83em;
  171. margin-block-end: .83em;
  172. }
  173. h3,
  174. :matches(article, aside, nav, section)
  175. :matches(article, aside, nav, section)
  176. h1 {
  177. display: block;
  178. font-size: 1.17em;
  179. font-weight: bold;
  180. margin-block-start: 1em;
  181. margin-block-end: 1em;
  182. }
  183. h4,
  184. :matches(article, aside, nav, section)
  185. :matches(article, aside, nav, section)
  186. :matches(article, aside, nav, section)
  187. h1 {
  188. display: block;
  189. font-size: 1.00em;
  190. font-weight: bold;
  191. margin-block-start: 1.33em;
  192. margin-block-end: 1.33em;
  193. }
  194. h5,
  195. :matches(article, aside, nav, section)
  196. :matches(article, aside, nav, section)
  197. :matches(article, aside, nav, section)
  198. :matches(article, aside, nav, section)
  199. h1 {
  200. display: block;
  201. font-size: 0.83em;
  202. font-weight: bold;
  203. margin-block-start: 1.67em;
  204. margin-block-end: 1.67em;
  205. }
  206. h6,
  207. :matches(article, aside, nav, section)
  208. :matches(article, aside, nav, section)
  209. :matches(article, aside, nav, section)
  210. :matches(article, aside, nav, section)
  211. :matches(article, aside, nav, section)
  212. h1 {
  213. display: block;
  214. font-size: 0.67em;
  215. font-weight: bold;
  216. margin-block-start: 2.33em;
  217. margin-block-end: 2.33em;
  218. }
  219. listing {
  220. display: block;
  221. font-family: fixed;
  222. font-size: medium;
  223. white-space: pre;
  224. margin-block-start: 1em;
  225. margin-block-end: 1em;
  226. }
  227. xmp, pre, plaintext {
  228. display: block;
  229. font-family: fixed;
  230. white-space: pre;
  231. margin-block-start: 1em;
  232. margin-block-end: 1em;
  233. }
  234. /* tables */
  235. table {
  236. display: table;
  237. border-spacing: 2px;
  238. border-collapse: separate;
  239. /* XXXldb do we want this if we're border-collapse:collapse ? */
  240. box-sizing: border-box;
  241. text-indent: 0;
  242. }
  243. table[align="left"] {
  244. float: left;
  245. }
  246. table[align="right"] {
  247. float: right;
  248. text-align: start;
  249. }
  250. /* border collapse rules */
  251. /* Set hidden if we have 'frame' or 'rules' attribute.
  252. Set it on all sides when we do so there's more consistency
  253. in what authors should expect */
  254. /* Put this first so 'border' and 'frame' rules can override it. */
  255. table[rules] {
  256. border-width: thin;
  257. border-style: hidden;
  258. }
  259. /* 'border' before 'frame' so 'frame' overrides
  260. A border with a given value should, of course, pass that value
  261. as the border-width in pixels -> attr mapping */
  262. /* :table-border-nonzero is like [border]:not([border="0"]) except it
  263. also checks for other zero-like values according to HTML attribute
  264. parsing rules */
  265. table:table-border-nonzero {
  266. border-width: thin;
  267. border-style: outset;
  268. }
  269. table[frame] {
  270. border: thin hidden;
  271. }
  272. /* specificity must beat table:table-border-nonzero rule above */
  273. table[frame="void"] { border-style: hidden; }
  274. table[frame="above"] { border-style: outset hidden hidden hidden; }
  275. table[frame="below"] { border-style: hidden hidden outset hidden; }
  276. table[frame="lhs"] { border-style: hidden hidden hidden outset; }
  277. table[frame="rhs"] { border-style: hidden outset hidden hidden; }
  278. table[frame="hsides"] { border-style: outset hidden; }
  279. table[frame="vsides"] { border-style: hidden outset; }
  280. table[frame="box"],
  281. table[frame="border"] { border-style: outset; }
  282. /* Internal Table Borders */
  283. /* 'border' cell borders first */
  284. table:table-border-nonzero > * > tr > td,
  285. table:table-border-nonzero > * > tr > th,
  286. table:table-border-nonzero > * > td,
  287. table:table-border-nonzero > * > th,
  288. table:table-border-nonzero > td,
  289. table:table-border-nonzero > th
  290. {
  291. border-width: thin;
  292. border-style: inset;
  293. }
  294. /* collapse only if rules are really specified */
  295. table[rules]:not([rules="none"]):not([rules=""]) {
  296. border-collapse: collapse;
  297. }
  298. /* only specified rules override 'border' settings
  299. (increased specificity to achieve this) */
  300. table[rules]:not([rules=""])> tr > td,
  301. table[rules]:not([rules=""])> * > tr > td,
  302. table[rules]:not([rules=""])> tr > th,
  303. table[rules]:not([rules=""])> * > tr > th,
  304. table[rules]:not([rules=""])> td,
  305. table[rules]:not([rules=""])> th
  306. {
  307. border-width: thin;
  308. border-style: none;
  309. }
  310. table[rules][rules="none"] > tr > td,
  311. table[rules][rules="none"] > * > tr > td,
  312. table[rules][rules="none"] > tr > th,
  313. table[rules][rules="none"] > * > tr > th,
  314. table[rules][rules="none"] > td,
  315. table[rules][rules="none"] > th
  316. {
  317. border-width: thin;
  318. border-style: none;
  319. }
  320. table[rules][rules="all"] > tr > td,
  321. table[rules][rules="all"] > * > tr > td,
  322. table[rules][rules="all"] > tr > th,
  323. table[rules][rules="all"] > * > tr > th,
  324. table[rules][rules="all"] > td,
  325. table[rules][rules="all"] > th
  326. {
  327. border-width: thin;
  328. border-style: solid;
  329. }
  330. table[rules][rules="rows"] > tr,
  331. table[rules][rules="rows"] > * > tr {
  332. border-block-start-width: thin;
  333. border-block-end-width: thin;
  334. border-block-start-style: solid;
  335. border-block-end-style: solid;
  336. }
  337. table[rules][rules="cols"] > tr > td,
  338. table[rules][rules="cols"] > * > tr > td,
  339. table[rules][rules="cols"] > tr > th,
  340. table[rules][rules="cols"] > * > tr > th {
  341. border-inline-start-width: thin;
  342. border-inline-end-width: thin;
  343. border-inline-start-style: solid;
  344. border-inline-end-style: solid;
  345. }
  346. table[rules][rules="groups"] > colgroup {
  347. border-inline-start-width: thin;
  348. border-inline-end-width: thin;
  349. border-inline-start-style: solid;
  350. border-inline-end-style: solid;
  351. }
  352. table[rules][rules="groups"] > tfoot,
  353. table[rules][rules="groups"] > thead,
  354. table[rules][rules="groups"] > tbody {
  355. border-block-start-width: thin;
  356. border-block-end-width: thin;
  357. border-block-start-style: solid;
  358. border-block-start-style: solid;
  359. }
  360. /* caption inherits from table not table-outer */
  361. caption {
  362. display: table-caption;
  363. text-align: center;
  364. }
  365. table[align="center"] > caption {
  366. margin-inline-start: auto;
  367. margin-inline-end: auto;
  368. }
  369. table[align="center"] > caption[align="left"]:dir(ltr) {
  370. margin-inline-end: 0;
  371. }
  372. table[align="center"] > caption[align="left"]:dir(rtl) {
  373. margin-inline-start: 0;
  374. }
  375. table[align="center"] > caption[align="right"]:dir(ltr) {
  376. margin-inline-start: 0;
  377. }
  378. table[align="center"] > caption[align="right"]:dir(rtl) {
  379. margin-inline-end: 0;
  380. }
  381. tr {
  382. display: table-row;
  383. vertical-align: inherit;
  384. }
  385. col {
  386. display: table-column;
  387. }
  388. colgroup {
  389. display: table-column-group;
  390. }
  391. tbody {
  392. display: table-row-group;
  393. vertical-align: middle;
  394. }
  395. thead {
  396. display: table-header-group;
  397. vertical-align: middle;
  398. }
  399. tfoot {
  400. display: table-footer-group;
  401. vertical-align: middle;
  402. }
  403. /* for XHTML tables without tbody */
  404. table > tr {
  405. vertical-align: middle;
  406. }
  407. td {
  408. display: table-cell;
  409. vertical-align: inherit;
  410. text-align: inherit;
  411. padding: 1px;
  412. }
  413. th {
  414. display: table-cell;
  415. vertical-align: inherit;
  416. font-weight: bold;
  417. padding: 1px;
  418. }
  419. tr > form:is-html, tbody > form:is-html,
  420. thead > form:is-html, tfoot > form:is-html,
  421. table > form:is-html {
  422. /* Important: don't show these forms in HTML */
  423. display: none !important;
  424. }
  425. table[bordercolor] > tbody,
  426. table[bordercolor] > thead,
  427. table[bordercolor] > tfoot,
  428. table[bordercolor] > col,
  429. table[bordercolor] > colgroup,
  430. table[bordercolor] > tr,
  431. table[bordercolor] > * > tr,
  432. table[bordercolor] > tr > td,
  433. table[bordercolor] > * > tr > td,
  434. table[bordercolor] > tr > th,
  435. table[bordercolor] > * > tr > th {
  436. border-color: inherit;
  437. }
  438. /* inlines */
  439. q:before {
  440. content: open-quote;
  441. }
  442. q:after {
  443. content: close-quote;
  444. }
  445. b, strong {
  446. font-weight: bolder;
  447. }
  448. i, cite, em, var, dfn {
  449. font-style: italic;
  450. }
  451. tt, code, kbd, samp {
  452. font-family: fixed;
  453. }
  454. u, ins {
  455. text-decoration: underline;
  456. }
  457. s, strike, del {
  458. text-decoration: line-through;
  459. }
  460. big {
  461. font-size: larger;
  462. }
  463. small {
  464. font-size: smaller;
  465. }
  466. sub {
  467. vertical-align: sub;
  468. font-size: smaller;
  469. line-height: normal;
  470. }
  471. sup {
  472. vertical-align: super;
  473. font-size: smaller;
  474. line-height: normal;
  475. }
  476. nobr {
  477. white-space: nowrap;
  478. }
  479. mark {
  480. background: yellow;
  481. color: black;
  482. }
  483. /* titles */
  484. abbr[title], acronym[title] {
  485. text-decoration: dotted underline;
  486. }
  487. /* lists */
  488. ul, menu, dir {
  489. display: block;
  490. list-style-type: disc;
  491. margin-block-start: 1em;
  492. margin-block-end: 1em;
  493. padding-inline-start: 40px;
  494. }
  495. menu[type="context"] {
  496. display: none !important;
  497. }
  498. ol {
  499. display: block;
  500. list-style-type: decimal;
  501. margin-block-start: 1em;
  502. margin-block-end: 1em;
  503. padding-inline-start: 40px;
  504. }
  505. li {
  506. display: list-item;
  507. text-align: match-parent;
  508. }
  509. /* nested lists have no top/bottom margins */
  510. :matches(ul, ol, dir, menu, dl) ul,
  511. :matches(ul, ol, dir, menu, dl) ol,
  512. :matches(ul, ol, dir, menu, dl) dir,
  513. :matches(ul, ol, dir, menu, dl) menu,
  514. :matches(ul, ol, dir, menu, dl) dl {
  515. margin-block-start: 0;
  516. margin-block-end: 0;
  517. }
  518. /* 2 deep unordered lists use a circle */
  519. :matches(ol, ul, menu, dir) ul,
  520. :matches(ol, ul, menu, dir) menu,
  521. :matches(ol, ul, menu, dir) dir {
  522. list-style-type: circle;
  523. }
  524. /* 3 deep (or more) unordered lists use a square */
  525. :matches(ol, ul, menu, dir) :matches(ol, ul, menu, dir) ul,
  526. :matches(ol, ul, menu, dir) :matches(ol, ul, menu, dir) menu,
  527. :matches(ol, ul, menu, dir) :matches(ol, ul, menu, dir) dir {
  528. list-style-type: square;
  529. }
  530. /* leafs */
  531. /* <hr> noshade and color attributes are handled completely by
  532. * the nsHTMLHRElement attribute mapping code
  533. */
  534. hr {
  535. display: block;
  536. border: 1px inset;
  537. margin-block-start: 0.5em;
  538. margin-block-end: 0.5em;
  539. margin-inline-start: auto;
  540. margin-inline-end: auto;
  541. color: gray;
  542. float-edge: margin-box;
  543. box-sizing: content-box;
  544. }
  545. hr[size="1"] {
  546. border-style: solid none none none;
  547. }
  548. img:broken::before, input:broken::before,
  549. img:user-disabled::before, input:user-disabled::before,
  550. img:loading::before, input:loading::before {
  551. content: alt-content !important;
  552. unicode-bidi: isolate;
  553. }
  554. object:matches(:broken,:user-disabled) > *|* {
  555. /*
  556. Inherit in the object's alignment so that if we aren't aligned explicitly
  557. we'll end up in the right place vertically. See bug 36997. Note that this
  558. is not !important because we _might_ be aligned explicitly.
  559. */
  560. vertical-align: inherit;
  561. }
  562. img:suppressed, input:suppressed, object:suppressed,
  563. embed:suppressed {
  564. /*
  565. Set visibility too in case the page changes display. Note that we _may_
  566. want to just set visibility and not display, in general, if we find that
  567. display:none breaks too many layouts. And if we decide we really do want
  568. people to be able to right-click blocked images, etc, we need to set
  569. neither one, and hack the painting code.... :(
  570. */
  571. display: none !important;
  572. visibility: hidden !important;
  573. }
  574. img[usemap], object[usemap] {
  575. color: blue;
  576. }
  577. frameset {
  578. display: block ! important;
  579. overflow: hidden-unscrollable;
  580. position: static ! important;
  581. float: none ! important;
  582. border: none ! important;
  583. }
  584. link {
  585. display: none;
  586. }
  587. frame {
  588. border-radius: 0 ! important;
  589. }
  590. iframe {
  591. border: 2px inset;
  592. }
  593. noframes {
  594. display: none;
  595. }
  596. spacer {
  597. position: static ! important;
  598. float: none ! important;
  599. }
  600. canvas {
  601. user-select: none;
  602. }
  603. /* focusable content: anything w/ tabindex >=0 is focusable, but we
  604. skip drawing a focus outline on a few things that handle it
  605. themselves. */
  606. :focusring:not(input):not(button):not(select):not(textarea):not(iframe):not(frame):not(body):not(html) {
  607. /* Don't specify the outline-color, we should always use initial value. */
  608. outline: 1px dotted;
  609. }
  610. /* hidden elements */
  611. base, basefont, datalist, head, meta, script, style, title,
  612. noembed, param, template {
  613. display: none;
  614. }
  615. area {
  616. /* Don't give it frames other than its imageframe */
  617. display: none ! important;
  618. }
  619. iframe:fullscreen {
  620. /* iframes in full-screen mode don't show a border. */
  621. border: none !important;
  622. padding: 0 !important;
  623. }
  624. /* media elements */
  625. video > xul|videocontrols, audio > xul|videocontrols {
  626. display: flex;
  627. box-orient: vertical;
  628. }
  629. video:not([controls]) > xul|videocontrols,
  630. audio:not([controls]) > xul|videocontrols {
  631. visibility: hidden;
  632. binding: none;
  633. }
  634. video {
  635. object-fit: contain;
  636. }
  637. video > img:native-anonymous {
  638. /* Video poster images should render with the video element's "object-fit" &
  639. "object-position" properties */
  640. object-fit: inherit !important;
  641. object-position: inherit !important;
  642. }
  643. audio:not([controls]) {
  644. display: none;
  645. }
  646. audio[controls] {
  647. /* This ensures that intrinsic sizing can reliably shrinkwrap our
  648. controls (which are also always horizontal) and produce a
  649. reasonable intrinsic size from them. */
  650. writing-mode: horizontal-tb !important;
  651. }
  652. *|*::html-canvas-content {
  653. display: block !important;
  654. /* we want to be an absolute and fixed container */
  655. transform: translate(0) !important;
  656. }
  657. video > .caption-box {
  658. width: 100%;
  659. height: 100%;
  660. position: relative;
  661. }
  662. /* ::cue default settings */
  663. ::cue {
  664. color: rgba(255, 255, 255, 1);
  665. white-space: pre-line;
  666. background-color: rgba(0, 0, 0, 0.8);
  667. font: var(--cue-font-size) sans-serif;
  668. }
  669. /* datetime elements */
  670. input[type="time"] > xul|datetimebox {
  671. display: flex;
  672. }
  673. input[type="date"] > xul|datetimebox {
  674. display: flex;
  675. }
  676. /* details & summary */
  677. details > summary:first-of-type,
  678. details > summary:native-anonymous {
  679. display: list-item;
  680. list-style: disclosure-closed inside;
  681. }
  682. details[open] > summary:first-of-type,
  683. details[open] > summary:native-anonymous {
  684. list-style-type: disclosure-open;
  685. }
  686. details > summary:first-of-type > *|* {
  687. /* Cancel "list-style-position: inside" inherited from summary. */
  688. list-style-position: initial;
  689. }
  690. /* <dialog> element styles */
  691. dialog {
  692. position: absolute;
  693. offset-inline-start: 0;
  694. offset-inline-end: 0;
  695. color: black;
  696. margin: auto;
  697. border-width: initial;
  698. border-style: solid;
  699. border-color: initial;
  700. border-image: initial;
  701. padding: 1em;
  702. background: white;
  703. width: fit-content;
  704. }
  705. dialog:not([open]) {
  706. display: none;
  707. }
  708. /* emulation of non-standard HTML <marquee> tag */
  709. marquee {
  710. inline-size: available;
  711. display: inline-block;
  712. vertical-align: text-bottom;
  713. text-align: start;
  714. }
  715. marquee[direction="up"], marquee[direction="down"] {
  716. block-size: 200px;
  717. }
  718. /* PRINT ONLY rules follow */
  719. @media print {
  720. marquee { binding: none; }
  721. }
  722. /* Ruby */
  723. ruby {
  724. display: ruby;
  725. }
  726. rb {
  727. display: ruby-base;
  728. white-space: nowrap;
  729. }
  730. rp {
  731. display: none;
  732. }
  733. rt {
  734. display: ruby-text;
  735. }
  736. rtc {
  737. display: ruby-text-container;
  738. }
  739. rtc, rt {
  740. white-space: nowrap;
  741. font-size: 50%;
  742. moz-min-font-size-ratio: 50%;
  743. line-height: 1;
  744. }
  745. rtc, rt {
  746. text-emphasis: none;
  747. }
  748. rtc:lang(zh), rt:lang(zh) {
  749. ruby-align: center;
  750. }
  751. rtc:lang(zh-TW), rt:lang(zh-TW) {
  752. font-size: 30%; /* bopomofo */
  753. moz-min-font-size-ratio: 30%;
  754. }
  755. rtc > rt {
  756. font-size: inherit;
  757. }
  758. ruby, rb, rt, rtc {
  759. unicode-bidi: isolate;
  760. }
  761. /* This Source Code Form is subject to the terms of the Mozilla Public
  762. * License, v. 2.0. If a copy of the MPL was not distributed with this
  763. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  764. pre {
  765. white-space: pre-wrap;
  766. word-wrap: break-word;
  767. control-character-visibility: visible;
  768. }
  769. /* Make text go with the rules of dir=auto, but allow it to be overriden if 'Switch Text Direction' is triggered */
  770. html:not([dir]) pre { /* Not a UA sheet, so doesn't use :has-dir-attr */
  771. unicode-bidi: plaintext;
  772. }
  773. /* This Source Code Form is subject to the terms of the Mozilla Public
  774. * License, v. 2.0. If a copy of the MPL was not distributed with this
  775. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  776. @namespace parsererror url(http://www.mozilla.org/newlayout/xml/parsererror.xml);
  777. @namespace xul url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
  778. /* magic -- some of these rules are important to keep pages from overriding
  779. them
  780. */
  781. /* Tables */
  782. *|*::table {
  783. display: table;
  784. box-sizing: border-box; /* XXX do we really want this? */
  785. }
  786. *|*::inline-table {
  787. display: inline-table;
  788. box-sizing: border-box; /* XXX do we really want this? */
  789. }
  790. *|*::table-wrapper {
  791. /* The inherited properties here need to be safe to have on both the
  792. * table and the table wrapper, generally because code ignores them
  793. * for the table. */
  794. display: inherit; /* table or inline-table */
  795. top-layer: inherit;
  796. margin: inherit;
  797. float: inherit;
  798. clear: inherit;
  799. position: inherit;
  800. top: inherit;
  801. right: inherit;
  802. bottom: inherit;
  803. left: inherit;
  804. z-index: inherit;
  805. page-break-before: inherit;
  806. page-break-after: inherit;
  807. page-break-inside: inherit;
  808. vertical-align: inherit; /* needed for inline-table */
  809. line-height: inherit; /* needed for vertical-align on inline-table */
  810. /* Bug 722777 */
  811. transform: inherit;
  812. transform-origin: inherit;
  813. /* Bug 724750 */
  814. backface-visibility: inherit;
  815. clip: inherit;
  816. /* When the table wrapper is a Flex/Grid item we need these: */
  817. align-self: inherit;
  818. justify-self: inherit;
  819. grid-column-start: inherit;
  820. grid-column-end: inherit;
  821. grid-row-start: inherit;
  822. grid-row-end: inherit;
  823. order: inherit;
  824. }
  825. *|*::table-row {
  826. display: table-row;
  827. }
  828. /* The ::table-column pseudo-element is for extra columns at the end
  829. of a table. */
  830. *|*::table-column {
  831. display: table-column;
  832. /* Make sure anonymous columns don't interfere with hit testing. Basically,
  833. * they should pretend as much as possible to not exist (since in the spec
  834. * they do not exist).
  835. *
  836. * Please make sure to not reintroduce
  837. * https://bugzilla.mozilla.org/show_bug.cgi?id=1403293 if you change this
  838. * bit!
  839. */
  840. visibility: hidden;
  841. }
  842. *|*::table-column-group {
  843. display: table-column-group;
  844. /* Make sure anonymous colgroups don't interfere with hit testing. Basically,
  845. * they should pretend as much as possible to not exist (since in the spec
  846. * they do not exist).
  847. *
  848. * Please make sure to not reintroduce
  849. * https://bugzilla.mozilla.org/show_bug.cgi?id=1403293 if you change this
  850. * bit!
  851. */
  852. visibility: hidden;
  853. }
  854. *|*::table-row-group {
  855. display: table-row-group;
  856. }
  857. *|*::table-cell {
  858. display: table-cell;
  859. white-space: inherit;
  860. }
  861. /* Ruby */
  862. *|*::ruby {
  863. display: ruby;
  864. unicode-bidi: isolate;
  865. }
  866. *|*::ruby-base {
  867. display: ruby-base;
  868. unicode-bidi: isolate;
  869. }
  870. *|*::ruby-text {
  871. display: ruby-text;
  872. unicode-bidi: isolate;
  873. }
  874. *|*::ruby-base-container {
  875. display: ruby-base-container;
  876. unicode-bidi: isolate;
  877. }
  878. *|*::ruby-text-container {
  879. display: ruby-text-container;
  880. unicode-bidi: isolate;
  881. }
  882. /* Lists */
  883. *|*::list-bullet, *|*::list-number {
  884. display: inline;
  885. vertical-align: baseline;
  886. font-variant-numeric: tabular-nums;
  887. /* Prevent the element from being selected when clicking on the marker. */
  888. user-select: none;
  889. }
  890. /* SVG documents don't always load this file but they do have links.
  891. * If you change the link rules, consider carefully whether to make
  892. * the same changes to svg.css.
  893. */
  894. /* Links */
  895. *|*:any-link {
  896. cursor: pointer;
  897. text-decoration: underline;
  898. }
  899. *|*:visited {
  900. color: rgb(85, 26, 139);
  901. color: -moz-visitedhyperlinktext;
  902. color: -webkit-link;
  903. }
  904. *|*:link {
  905. color: rgb(0, 0, 238);
  906. color: -moz-hyperlinktext;
  907. color: -webkit-link;
  908. }
  909. *|*:any-link:focusring {
  910. /* Don't specify the outline-color, we should always use initial value. */
  911. outline: 1px dotted;
  912. }
  913. /* Miscellaneous */
  914. *|*::cell-content {
  915. display: block;
  916. unicode-bidi: inherit;
  917. text-overflow: inherit;
  918. overflow-clip-box: inherit;
  919. }
  920. *|*::block-inside-inline-wrapper {
  921. display: block;
  922. /* we currently inherit from the inline that is split */
  923. position: inherit; /* static or relative or sticky */
  924. outline: inherit;
  925. outline-offset: inherit;
  926. clip-path: inherit;
  927. filter: inherit;
  928. mask: inherit;
  929. opacity: inherit;
  930. text-decoration: inherit;
  931. box-ordinal-group: inherit;
  932. overflow-clip-box: inherit;
  933. unicode-bidi: inherit;
  934. text-overflow: inherit;
  935. /* The properties below here don't apply if our position is static,
  936. and we do want them to have an effect if it's not, so it's fine
  937. to always inherit them. */
  938. top: inherit;
  939. left: inherit;
  940. bottom: inherit;
  941. right: inherit;
  942. z-index: inherit;
  943. }
  944. *|*::xul-anonymous-block {
  945. display: block;
  946. box-ordinal-group: inherit;
  947. text-overflow: inherit;
  948. overflow-clip-box: inherit;
  949. }
  950. *|*::scrolled-content, *|*::scrolled-canvas,
  951. *|*::scrolled-page-sequence {
  952. /* e.g., text inputs, select boxes */
  953. padding: inherit;
  954. /* The display doesn't affect the kind of frame constructed here. This just
  955. affects auto-width sizing of the block we create. */
  956. display: block;
  957. /* make unicode-bidi inherit, otherwise it has no effect on text inputs and
  958. blocks with overflow: scroll; */
  959. unicode-bidi: inherit;
  960. text-overflow: inherit;
  961. /* Please keep the Multicol/Flex/Grid/Align sections below in sync with
  962. ::fieldset-content/::button-content in forms.css */
  963. /* Multicol container */
  964. column-count: inherit;
  965. column-width: inherit;
  966. column-gap: inherit;
  967. column-rule: inherit;
  968. column-fill: inherit;
  969. /* Flex container */
  970. flex-direction: inherit;
  971. flex-wrap: inherit;
  972. /* -webkit-box container (aliased from -webkit versions to -moz versions) */
  973. box-orient: inherit;
  974. box-direction: inherit;
  975. box-pack: inherit;
  976. box-align: inherit;
  977. /* Grid container */
  978. grid-auto-columns: inherit;
  979. grid-auto-rows: inherit;
  980. grid-auto-flow: inherit;
  981. grid-column-gap: inherit;
  982. grid-row-gap: inherit;
  983. grid-template-areas: inherit;
  984. grid-template-columns: inherit;
  985. grid-template-rows: inherit;
  986. /* CSS Align */
  987. align-content: inherit;
  988. align-items: inherit;
  989. justify-content: inherit;
  990. justify-items: inherit;
  991. /* Do not change these. nsCSSFrameConstructor depends on them to create a good
  992. frame tree. */
  993. overflow-clip-box: inherit;
  994. }
  995. *|*::viewport, *|*::viewport-scroll, *|*::canvas, *|*::scrolled-canvas {
  996. display: block;
  997. background-color: inherit;
  998. }
  999. *|*::viewport-scroll {
  1000. overflow: auto;
  1001. }
  1002. *|*::column-content {
  1003. /* the column boxes inside a column-flowed block */
  1004. /* make unicode-bidi inherit, otherwise it has no effect on column boxes */
  1005. unicode-bidi: inherit;
  1006. text-overflow: inherit;
  1007. /* inherit the outer frame's display, otherwise we turn into an inline */
  1008. display: inherit;
  1009. /* Carry through our parent's height so that %-height children get
  1010. their heights set */
  1011. height: 100%;
  1012. }
  1013. *|*::anonymous-flex-item,
  1014. *|*::anonymous-grid-item {
  1015. /* Anonymous blocks that wrap contiguous runs of text
  1016. * inside of a flex or grid container. */
  1017. display: block;
  1018. }
  1019. *|*::page-sequence, *|*::scrolled-page-sequence {
  1020. /* Collection of pages in print/print preview. Visual styles may only appear
  1021. * in print preview. */
  1022. display: block;
  1023. background: linear-gradient(#606060, #8a8a8a) fixed;
  1024. height: 100%;
  1025. }
  1026. *|*::page {
  1027. /* Individual page in print/print preview. Visual styles may only appear
  1028. * in print preview. */
  1029. display: block;
  1030. background: white;
  1031. box-shadow: 5px 5px 8px #202020;
  1032. box-decoration-break: clone;
  1033. margin: 0.125in 0.25in;
  1034. }
  1035. *|*::pagecontent {
  1036. display: block;
  1037. margin: auto;
  1038. }
  1039. *|*::pagebreak {
  1040. display: block;
  1041. }
  1042. /* Printing */
  1043. @media print {
  1044. * {
  1045. cursor: default !important;
  1046. }
  1047. }
  1048. *|*:fullscreen:not(:root) {
  1049. position: fixed !important;
  1050. top: 0 !important;
  1051. left: 0 !important;
  1052. right: 0 !important;
  1053. bottom: 0 !important;
  1054. width: 100% !important;
  1055. height: 100% !important;
  1056. margin: 0 !important;
  1057. min-width: 0 !important;
  1058. max-width: none !important;
  1059. min-height: 0 !important;
  1060. max-height: none !important;
  1061. box-sizing: border-box !important;
  1062. object-fit: contain;
  1063. transform: none !important;
  1064. }
  1065. /* Selectors here should match the check in
  1066. * nsViewportFrame.cpp:ShouldInTopLayerForFullscreen() */
  1067. *|*:fullscreen:not(:root):not(:browser-frame) {
  1068. top-layer: top !important;
  1069. }
  1070. *|*::backdrop {
  1071. top-layer: top !important;
  1072. display: block;
  1073. position: fixed;
  1074. top: 0; left: 0;
  1075. right: 0; bottom: 0;
  1076. }
  1077. *|*:full-screen:not(:root)::backdrop {
  1078. background: black;
  1079. }
  1080. /* XML parse error reporting */
  1081. parsererror|parsererror {
  1082. display: block;
  1083. font-family: sans-serif;
  1084. font-weight: bold;
  1085. white-space: pre;
  1086. margin: 1em;
  1087. padding: 1em;
  1088. border-width: thin;
  1089. border-style: inset;
  1090. border-color: red;
  1091. font-size: 14pt;
  1092. background-color: lightyellow;
  1093. color: black;
  1094. }
  1095. parsererror|sourcetext {
  1096. display: block;
  1097. white-space: pre;
  1098. font-family: fixed;
  1099. margin-top: 2em;
  1100. margin-bottom: 1em;
  1101. color: red;
  1102. font-weight: bold;
  1103. font-size: 12pt;
  1104. }
  1105. div:native-anonymous.moz-accessiblecaret {
  1106. /* Add transition effect to make caret size changing smoother. */
  1107. transition-duration: 250ms;
  1108. transition-property: width, height, margin-left;
  1109. }
  1110. div:native-anonymous.moz-accessiblecaret,
  1111. div:native-anonymous.moz-accessiblecaret > #text-overlay,
  1112. div:native-anonymous.moz-accessiblecaret > #image,
  1113. div:native-anonymous.moz-accessiblecaret > #bar {
  1114. position: absolute;
  1115. z-index: 2147483647;
  1116. }
  1117. div:native-anonymous.moz-accessiblecaret > #text-overlay,
  1118. div:native-anonymous.moz-accessiblecaret > #image {
  1119. top: 0;
  1120. width: 100%;
  1121. /* Override this property in moz-custom-content-container to make dummy touch
  1122. * listener work. */
  1123. pointer-events: auto;
  1124. }
  1125. div:native-anonymous.moz-accessiblecaret > #image {
  1126. background-position: center top;
  1127. background-size: 100%;
  1128. background-repeat: no-repeat;
  1129. background-origin: content-box;
  1130. height: 100%;
  1131. }
  1132. div:native-anonymous.moz-accessiblecaret > #bar {
  1133. margin-left: 49%;
  1134. background-color: #008aa0;
  1135. }
  1136. div:native-anonymous.moz-accessiblecaret.no-bar > #bar {
  1137. display: none;
  1138. }
  1139. div:native-anonymous.moz-accessiblecaret.left > #text-overlay,
  1140. div:native-anonymous.moz-accessiblecaret.left > #image {
  1141. margin-left: -39%;
  1142. }
  1143. div:native-anonymous.moz-accessiblecaret.right > #text-overlay,
  1144. div:native-anonymous.moz-accessiblecaret.right > #image {
  1145. margin-left: 41%;
  1146. }
  1147. div:native-anonymous.moz-accessiblecaret.none {
  1148. display: none;
  1149. }
  1150. /* Custom content container in the CanvasFrame, positioned on top of everything
  1151. everything else, not reacting to pointer events. */
  1152. div:native-anonymous.moz-custom-content-container {
  1153. pointer-events: none;
  1154. top-layer: top;
  1155. position: absolute;
  1156. top: 0;
  1157. left: 0;
  1158. width: 100%;
  1159. height: 100%;
  1160. }
  1161. /* Shadow DOM v1
  1162. * https://drafts.csswg.org/css-scoping/#slots-in-shadow-tree */
  1163. slot {
  1164. display: contents;
  1165. }
  1166. /* This Source Code Form is subject to the terms of the Mozilla Public
  1167. * License, v. 2.0. If a copy of the MPL was not distributed with this
  1168. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  1169. /**
  1170. Styles for old GFX form widgets
  1171. **/
  1172. @namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */
  1173. @namespace xul url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
  1174. *|*::fieldset-content {
  1175. display: block; /* nsRuleNode::ComputeDisplayData overrules this in some cases */
  1176. unicode-bidi: inherit;
  1177. text-overflow: inherit;
  1178. overflow: inherit;
  1179. overflow-clip-box: inherit;
  1180. /* Need to inherit border-radius too, so when the fieldset has rounded
  1181. borders we don't leak out the corners for hit-testing purposes. */
  1182. border-radius: inherit;
  1183. padding: inherit;
  1184. block-size: 100%; /* Need this so percentage block-sizes of kids work right */
  1185. /* Please keep the Multicol/Flex/Grid/Align sections below in sync with
  1186. ::scrolled-content in ua.css and ::button-content below. */
  1187. /* Multicol container */
  1188. column-count: inherit;
  1189. column-width: inherit;
  1190. column-gap: inherit;
  1191. column-rule: inherit;
  1192. column-fill: inherit;
  1193. /* Flex container */
  1194. flex-direction: inherit;
  1195. flex-wrap: inherit;
  1196. /* -webkit-box container (aliased from -webkit versions to -moz versions) */
  1197. box-orient: inherit;
  1198. box-direction: inherit;
  1199. box-pack: inherit;
  1200. box-align: inherit;
  1201. /* Grid container */
  1202. grid-auto-columns: inherit;
  1203. grid-auto-rows: inherit;
  1204. grid-auto-flow: inherit;
  1205. grid-column-gap: inherit;
  1206. grid-row-gap: inherit;
  1207. grid-template-areas: inherit;
  1208. grid-template-columns: inherit;
  1209. grid-template-rows: inherit;
  1210. /* CSS Align */
  1211. align-content: inherit;
  1212. align-items: inherit;
  1213. justify-content: inherit;
  1214. justify-items: inherit;
  1215. }
  1216. /* miscellaneous form elements */
  1217. fieldset > legend {
  1218. padding-inline-start: 2px;
  1219. padding-inline-end: 2px;
  1220. inline-size: fit-content;
  1221. }
  1222. legend {
  1223. display: block;
  1224. }
  1225. fieldset {
  1226. display: block;
  1227. margin-inline-start: 2px;
  1228. margin-inline-end: 2px;
  1229. padding-block-start: 0.35em;
  1230. padding-block-end: 0.75em;
  1231. padding-inline-start: 0.625em;
  1232. padding-inline-end: 0.625em;
  1233. border: 2px groove ThreeDLightShadow;
  1234. min-width: min-content;
  1235. }
  1236. label {
  1237. cursor: default;
  1238. }
  1239. /* default inputs, text inputs, and selects */
  1240. /* Note: Values in nsNativeTheme IsWidgetStyled function
  1241. need to match textfield background/border values here */
  1242. input {
  1243. appearance: textfield;
  1244. /* The sum of border and padding on block-start and block-end
  1245. must be the same here, for buttons, and for <select> (including its
  1246. internal padding magic) */
  1247. padding: 1px;
  1248. border: 2px inset rgb(227, 227, 227);
  1249. background-color: transparent;
  1250. color: rgb(0, 0, 0);
  1251. font: field;
  1252. text-rendering: optimizeLegibility;
  1253. line-height: normal;
  1254. text-align: start;
  1255. text-transform: none;
  1256. word-spacing: normal;
  1257. letter-spacing: normal;
  1258. cursor: text;
  1259. text-indent: 0;
  1260. user-select: text;
  1261. text-shadow: none;
  1262. overflow-clip-box: padding-box content-box;
  1263. }
  1264. input > .anonymous-div,
  1265. input::placeholder {
  1266. word-wrap: normal !important;
  1267. /* Make the line-height equal to the available height */
  1268. line-height: block-height;
  1269. }
  1270. textarea {
  1271. margin-block-start: 1px;
  1272. margin-block-end: 1px;
  1273. border: 2px inset ThreeDLightShadow;
  1274. /* The 1px inline padding is for parity with Win/IE */
  1275. padding-inline-start: 1px;
  1276. padding-inline-end: 1px;
  1277. background-color: transparent;
  1278. color: rgb(0, 0, 0);
  1279. font: medium fixed;
  1280. text-rendering: optimizeLegibility;
  1281. text-align: start;
  1282. text-transform: none;
  1283. word-spacing: normal;
  1284. letter-spacing: normal;
  1285. vertical-align: text-bottom;
  1286. cursor: text;
  1287. resize: both;
  1288. appearance: textfield-multiline;
  1289. text-indent: 0;
  1290. user-select: text;
  1291. text-shadow: none;
  1292. white-space: pre-wrap;
  1293. word-wrap: break-word;
  1294. overflow-clip-box: content-box;
  1295. }
  1296. textarea > scrollbar {
  1297. cursor: default;
  1298. }
  1299. textarea > .anonymous-div,
  1300. input > .anonymous-div,
  1301. input::placeholder,
  1302. textarea::placeholder,
  1303. input > .preview-div
  1304. textarea > .preview-div {
  1305. overflow: auto;
  1306. border: 0px !important;
  1307. padding: inherit !important;
  1308. margin: 0px;
  1309. text-decoration: inherit;
  1310. text-decoration-color: inherit;
  1311. text-decoration-style: inherit;
  1312. display: inline-block;
  1313. ime-mode: inherit;
  1314. resize: inherit;
  1315. control-character-visibility: visible;
  1316. overflow-clip-box: inherit;
  1317. }
  1318. input > .anonymous-div,
  1319. input::placeholder,
  1320. input > .preview-div {
  1321. white-space: pre;
  1322. }
  1323. input > .anonymous-div.wrap {
  1324. white-space: pre-wrap;
  1325. }
  1326. textarea > .anonymous-div.inherit-overflow,
  1327. input > .anonymous-div.inherit-overflow {
  1328. overflow: inherit;
  1329. }
  1330. textarea > .anonymous-div.inherit-scroll-behavior,
  1331. input > .anonymous-div.inherit-scroll-behavior {
  1332. scroll-behavior: inherit;
  1333. overscroll-behavior: inherit;
  1334. }
  1335. input::placeholder,
  1336. textarea::placeholder,
  1337. input > .preview-div,
  1338. textarea > .preview-div {
  1339. /*
  1340. * Changing display to inline can leads to broken behaviour and will assert.
  1341. */
  1342. display: inline-block !important;
  1343. /*
  1344. * Changing resize would display a broken behaviour and will assert.
  1345. */
  1346. resize: none !important;
  1347. overflow: hidden !important;
  1348. /*
  1349. * The placeholder or preview should be ignored by pointer otherwise, we might have some
  1350. * unexpected behavior like the resize handle not being selectable.
  1351. */
  1352. pointer-events: none !important;
  1353. }
  1354. input::placeholder,
  1355. textarea::placeholder {
  1356. opacity: 0.54;
  1357. }
  1358. textarea::placeholder,
  1359. textarea > .preview-div {
  1360. white-space: pre-wrap !important;
  1361. }
  1362. input:read-write,
  1363. textarea:read-write {
  1364. user-modify: read-write !important;
  1365. }
  1366. select {
  1367. margin: 0;
  1368. border-color: rgb(227, 227, 227);
  1369. background-color: Combobox;
  1370. color: ComboboxText;
  1371. font: list;
  1372. /*
  1373. * Note that the "UA !important" tests in
  1374. * layout/style/test/test_animations.html depend on this rule, because
  1375. * they need some UA !important rule to test. If this changes, use a
  1376. * different one there.
  1377. */
  1378. line-height: normal !important;
  1379. white-space: nowrap !important;
  1380. word-wrap: normal !important;
  1381. text-align: start;
  1382. cursor: default;
  1383. box-sizing: border-box;
  1384. user-select: none;
  1385. appearance: menulist;
  1386. border-width: 2px;
  1387. border-style: inset;
  1388. text-indent: 0;
  1389. overflow: hidden-unscrollable;
  1390. text-shadow: none;
  1391. /* No text-decoration reaching inside, by default */
  1392. display: inline-block;
  1393. page-break-inside: avoid;
  1394. overflow-clip-box: padding-box !important; /* bug 992447 */
  1395. }
  1396. /* Need the "select[size][multiple]" selector to override the settings on
  1397. 'select[size="1"]', eg if one has <select size="1" multiple> */
  1398. select[size],
  1399. select[multiple],
  1400. select[size][multiple] {
  1401. /* Different alignment and padding for listbox vs combobox */
  1402. background-color: transparent;
  1403. color: rgb(0, 0, 0);
  1404. vertical-align: text-bottom;
  1405. padding-block-start: 1px;
  1406. padding-block-end: 1px;
  1407. padding-inline-start: 0;
  1408. padding-inline-end: 0;
  1409. appearance: listbox;
  1410. }
  1411. select[size="0"],
  1412. select[size="1"] {
  1413. /* Except this is not a listbox */
  1414. background-color: Combobox;
  1415. color: ComboboxText;
  1416. vertical-align: baseline;
  1417. padding: 0;
  1418. appearance: menulist;
  1419. }
  1420. select > button {
  1421. inline-size: 12px;
  1422. white-space: nowrap;
  1423. position: static !important;
  1424. background-repeat: no-repeat !important;
  1425. background-position: center !important;
  1426. appearance: menulist-button;
  1427. /* Make sure to size correctly if the combobox has a non-auto height. */
  1428. block-size: 100% ! important;
  1429. box-sizing: border-box ! important;
  1430. /*
  1431. Make sure to align properly with the display frame. Note that we
  1432. want the baseline of the combobox to match the baseline of the
  1433. display frame, so the dropmarker is what gets the vertical-align.
  1434. */
  1435. vertical-align: top !important;
  1436. }
  1437. select:empty {
  1438. inline-size: 2.5em;
  1439. }
  1440. *|*::display-comboboxcontrol-frame {
  1441. overflow: hidden-unscrollable;
  1442. /* This block-start/end padding plus the combobox block-start/end border need to
  1443. add up to the block-start/end borderpadding of text inputs and buttons */
  1444. padding-block-start: 1px;
  1445. padding-block-end: 1px;
  1446. padding-inline-start: 4px;
  1447. padding-inline-end: 0;
  1448. color: inherit;
  1449. white-space: nowrap;
  1450. text-align: inherit;
  1451. user-select: none;
  1452. /* Make sure to size correctly if the combobox has a non-auto block-size. */
  1453. block-size: 100% ! important;
  1454. box-sizing: border-box ! important;
  1455. line-height: block-height;
  1456. }
  1457. option {
  1458. display: block;
  1459. float: none !important;
  1460. position: static !important;
  1461. min-block-size: 1em;
  1462. line-height: normal !important;
  1463. user-select: none;
  1464. text-indent: 0;
  1465. white-space: nowrap !important;
  1466. word-wrap: normal !important;
  1467. text-align: match-parent;
  1468. }
  1469. select > option {
  1470. padding-block-start : 0;
  1471. padding-block-end: 0;
  1472. padding-inline-start: 3px;
  1473. padding-inline-end: 5px;
  1474. }
  1475. option:checked {
  1476. background-color: html-cellhighlight !important;
  1477. color: html-cellhighlighttext !important;
  1478. }
  1479. select:focus > option:checked,
  1480. select:focus > optgroup > option:checked {
  1481. background-color: Highlight ! important;
  1482. color: HighlightText ! important;
  1483. }
  1484. optgroup {
  1485. display: block;
  1486. float: none !important;
  1487. position: static !important;
  1488. font: list;
  1489. line-height: normal !important;
  1490. font-style: italic;
  1491. font-weight: bold;
  1492. font-size: inherit;
  1493. user-select: none;
  1494. text-indent: 0;
  1495. white-space: nowrap !important;
  1496. word-wrap: normal !important;
  1497. }
  1498. optgroup > option {
  1499. padding-inline-start: 20px;
  1500. font-style: normal;
  1501. font-weight: normal;
  1502. }
  1503. optgroup:before {
  1504. display: block;
  1505. content: attr(label);
  1506. }
  1507. *|*::dropdown-list {
  1508. z-index: 2147483647;
  1509. background-color: inherit;
  1510. user-select: none;
  1511. position: static !important;
  1512. float: none !important;
  1513. /*
  1514. * We can't change the padding here, because that would affect our
  1515. * intrinsic inline-size, since we scroll. But at the same time, we want
  1516. * to make sure that our inline-start border+padding matches the inline-start
  1517. * border+padding of a combobox so that our scrollbar will line up
  1518. * with the dropmarker. So set our inline-start border to 2px.
  1519. */
  1520. border: 1px outset black !important;
  1521. border-inline-start-width: 2px ! important;
  1522. }
  1523. input:disabled,
  1524. textarea:disabled,
  1525. option:disabled,
  1526. optgroup:disabled,
  1527. select:disabled:disabled /* Need the pseudo-class twice to have the specificity
  1528. be at least the same as select[size][multiple] above */
  1529. {
  1530. color: GrayText;
  1531. background-color: ThreeDLightShadow;
  1532. cursor: inherit;
  1533. }
  1534. input:disabled,
  1535. textarea:disabled {
  1536. cursor: default;
  1537. }
  1538. option:disabled,
  1539. optgroup:disabled {
  1540. background-color: transparent;
  1541. }
  1542. /* hidden inputs */
  1543. input[type="hidden"] {
  1544. appearance: none;
  1545. display: none !important;
  1546. padding: 0;
  1547. border: 0;
  1548. cursor: auto;
  1549. user-focus: ignore;
  1550. binding: none;
  1551. }
  1552. /* image buttons */
  1553. input[type="image"] {
  1554. appearance: none;
  1555. padding: 0;
  1556. border: none;
  1557. background-color: transparent;
  1558. font-family: sans-serif;
  1559. font-size: small;
  1560. cursor: pointer;
  1561. binding: none;
  1562. }
  1563. input[type="image"]:disabled {
  1564. cursor: inherit;
  1565. }
  1566. input[type="image"]:focusring {
  1567. /* Don't specify the outline-color, we should always use initial value. */
  1568. outline: 1px dotted;
  1569. }
  1570. /* file selector */
  1571. input[type="file"] {
  1572. display: inline-block;
  1573. white-space: nowrap;
  1574. overflow: hidden;
  1575. overflow-clip-box: padding-box;
  1576. color: inherit;
  1577. /* Revert rules which apply on all inputs. */
  1578. appearance: none;
  1579. binding: none;
  1580. cursor: default;
  1581. border: none;
  1582. background-color: transparent;
  1583. padding: 0;
  1584. }
  1585. input[type="file"] > xul|label {
  1586. min-inline-size: 12em;
  1587. padding-inline-start: 5px;
  1588. text-align: match-parent;
  1589. color: inherit;
  1590. font-size: inherit;
  1591. letter-spacing: inherit;
  1592. /*
  1593. * Force the text to have LTR directionality. Otherwise filenames containing
  1594. * RTL characters will be reordered with chaotic results.
  1595. */
  1596. direction: ltr !important;
  1597. }
  1598. /* button part of file selector */
  1599. input[type="file"] > button[type="button"] {
  1600. block-size: inherit;
  1601. font-size: inherit;
  1602. letter-spacing: inherit;
  1603. cursor: inherit;
  1604. }
  1605. /* colored part of the color selector button */
  1606. input[type="color"]::color-swatch {
  1607. width: 100%;
  1608. height: 100%;
  1609. min-width: 3px;
  1610. min-height: 3px;
  1611. margin-inline-start: auto;
  1612. margin-inline-end: auto;
  1613. box-sizing: border-box;
  1614. border: 1px solid grey;
  1615. display: block;
  1616. }
  1617. /* Try to make RTL <input type='file'> look nicer. */
  1618. /* TODO: find a better solution than forcing direction: ltr on all file
  1619. input labels and remove this override -- bug 1161482 */
  1620. input[type="file"]:dir(rtl) > xul|label {
  1621. padding-inline-start: 0px;
  1622. padding-inline-end: 5px;
  1623. }
  1624. /* radio buttons */
  1625. input[type="radio"] {
  1626. display: inline-block;
  1627. appearance: radio;
  1628. margin-block-start: 3px;
  1629. margin-block-end: 0px;
  1630. margin-inline-start: 5px;
  1631. margin-inline-end: 3px;
  1632. }
  1633. /* check boxes */
  1634. input[type="checkbox"] {
  1635. display: inline-block;
  1636. appearance: checkbox;
  1637. margin-block-start: 3px;
  1638. margin-block-end: 3px;
  1639. margin-inline-start: 4px;
  1640. margin-inline-end: 3px;
  1641. }
  1642. /* common features of radio buttons and check boxes */
  1643. input[type="radio"],
  1644. input[type="checkbox"] {
  1645. box-sizing: border-box;
  1646. cursor: default;
  1647. /* unset some values from the general 'input' rule above: */
  1648. padding: unset;
  1649. binding: unset;
  1650. border: unset;
  1651. background-color: unset;
  1652. color: unset;
  1653. }
  1654. input[type="radio"]:disabled,
  1655. input[type="radio"]:disabled:active,
  1656. input[type="radio"]:disabled:hover,
  1657. input[type="radio"]:disabled:hover:active,
  1658. input[type="checkbox"]:disabled,
  1659. input[type="checkbox"]:disabled:active,
  1660. input[type="checkbox"]:disabled:hover,
  1661. input[type="checkbox"]:disabled:hover:active {
  1662. cursor: inherit;
  1663. }
  1664. input[type="search"] {
  1665. box-sizing: border-box;
  1666. }
  1667. /* buttons */
  1668. /* Note: Values in nsNativeTheme IsWidgetStyled function
  1669. need to match button background/border values here */
  1670. /* Non text-related properties for buttons: these ones are shared with
  1671. input[type="color"] */
  1672. button,
  1673. input[type="color"],
  1674. input[type="reset"],
  1675. input[type="button"],
  1676. input[type="submit"] {
  1677. appearance: button;
  1678. /* The sum of border and padding on block-start and block-end
  1679. must be the same here, for text inputs, and for <select>.
  1680. Note focus-inner padding does not affect button size. */
  1681. padding-block-start: 0px;
  1682. padding-inline-end: 8px;
  1683. padding-block-end: 0px;
  1684. padding-inline-start: 8px;
  1685. border: 2px outset ThreeDLightShadow;
  1686. background-color: ButtonFace;
  1687. cursor: default;
  1688. box-sizing: border-box;
  1689. user-select: none;
  1690. binding: none;
  1691. }
  1692. /* Text-related properties for buttons: these ones are not shared with
  1693. input[type="color"] */
  1694. button,
  1695. input[type="reset"],
  1696. input[type="button"],
  1697. input[type="submit"] {
  1698. color: ButtonText;
  1699. font: button;
  1700. line-height: normal;
  1701. white-space: pre;
  1702. text-align: center;
  1703. text-shadow: none;
  1704. overflow-clip-box: padding-box;
  1705. }
  1706. input[type="color"] {
  1707. inline-size: 64px;
  1708. block-size: 23px;
  1709. }
  1710. button {
  1711. /* Buttons should lay out like "normal" html, mostly */
  1712. white-space: inherit;
  1713. text-indent: 0;
  1714. /* But no text-decoration reaching inside, by default */
  1715. display: inline-block;
  1716. }
  1717. *|*::button-content {
  1718. display: block;
  1719. /* Please keep the Multicol/Flex/Grid/Align sections below in sync with
  1720. ::scrolled-content in ua.css and ::fieldset-content above. */
  1721. /* Multicol container */
  1722. column-count: inherit;
  1723. column-width: inherit;
  1724. column-gap: inherit;
  1725. column-rule: inherit;
  1726. column-fill: inherit;
  1727. /* Flex container */
  1728. flex-direction: inherit;
  1729. flex-wrap: inherit;
  1730. /* -webkit-box container (aliased from -webkit versions to -moz versions) */
  1731. box-orient: inherit;
  1732. box-direction: inherit;
  1733. box-pack: inherit;
  1734. box-align: inherit;
  1735. /* Grid container */
  1736. grid-auto-columns: inherit;
  1737. grid-auto-rows: inherit;
  1738. grid-auto-flow: inherit;
  1739. grid-column-gap: inherit;
  1740. grid-row-gap: inherit;
  1741. grid-template-areas: inherit;
  1742. grid-template-columns: inherit;
  1743. grid-template-rows: inherit;
  1744. /* CSS Align */
  1745. align-content: inherit;
  1746. align-items: inherit;
  1747. justify-content: inherit;
  1748. justify-items: inherit;
  1749. }
  1750. button:hover,
  1751. input[type="color"]:hover,
  1752. input[type="reset"]:hover,
  1753. input[type="button"]:hover,
  1754. input[type="submit"]:hover {
  1755. background-color: buttonhoverface;
  1756. }
  1757. button:hover,
  1758. input[type="reset"]:hover,
  1759. input[type="button"]:hover,
  1760. input[type="submit"]:hover {
  1761. color: buttonhovertext;
  1762. }
  1763. button:active:hover,
  1764. input[type="color"]:active:hover,
  1765. input[type="reset"]:active:hover,
  1766. input[type="button"]:active:hover,
  1767. input[type="submit"]:active:hover {
  1768. border-style: inset;
  1769. background-color: ButtonFace;
  1770. }
  1771. button:active:hover,
  1772. input[type="reset"]:active:hover,
  1773. input[type="button"]:active:hover,
  1774. input[type="submit"]:active:hover {
  1775. color: ButtonText;
  1776. }
  1777. button::focus-inner,
  1778. input[type="color"]::focus-inner,
  1779. input[type="reset"]::focus-inner,
  1780. input[type="button"]::focus-inner,
  1781. input[type="submit"]::focus-inner,
  1782. input[type="file"] > button[type="button"]::focus-inner {
  1783. /* Note this padding only affects the focus-inner ring, not the button itself */
  1784. padding-block-start: 0px;
  1785. padding-inline-end: 2px;
  1786. padding-block-end: 0px;
  1787. padding-inline-start: 2px;
  1788. border: 1px dotted transparent;
  1789. }
  1790. button:focusring::focus-inner,
  1791. input[type="color"]:focusring::focus-inner,
  1792. input[type="reset"]:focusring::focus-inner,
  1793. input[type="button"]:focusring::focus-inner,
  1794. input[type="submit"]:focusring::focus-inner,
  1795. input[type="file"] > button[type="button"]:focusring::focus-inner {
  1796. border-color: ButtonText;
  1797. }
  1798. button:disabled:active, button:disabled,
  1799. input[type="color"]:disabled:active,
  1800. input[type="color"]:disabled,
  1801. input[type="reset"]:disabled:active,
  1802. input[type="reset"]:disabled,
  1803. input[type="button"]:disabled:active,
  1804. input[type="button"]:disabled,
  1805. select:disabled > button,
  1806. select:disabled > button,
  1807. input[type="submit"]:disabled:active,
  1808. input[type="submit"]:disabled {
  1809. /* The sum of border and padding on block-start and block-end
  1810. must be the same here and for text inputs */
  1811. padding-block-start: 0px;
  1812. padding-inline-end: 8px;
  1813. padding-block-end: 0px;
  1814. padding-inline-start: 8px;
  1815. border: 2px outset ThreeDLightShadow;
  1816. cursor: inherit;
  1817. }
  1818. button:disabled:active, button:disabled,
  1819. input[type="reset"]:disabled:active,
  1820. input[type="reset"]:disabled,
  1821. input[type="button"]:disabled:active,
  1822. input[type="button"]:disabled,
  1823. select:disabled > button,
  1824. select:disabled > button,
  1825. input[type="submit"]:disabled:active,
  1826. input[type="submit"]:disabled {
  1827. color: GrayText;
  1828. }
  1829. /*
  1830. * Make form controls inherit 'unicode-bidi' transparently as required by
  1831. * their various anonymous descendants and pseudo-elements:
  1832. *
  1833. * <textarea> and <input type="text">:
  1834. * inherit into the XULScroll frame with class 'anonymous-div' which is a
  1835. * child of the text control.
  1836. *
  1837. * Buttons (either <button>, <input type="submit">, <input type="button">
  1838. * or <input type="reset">)
  1839. * inherit into the ':button-content' pseudo-element.
  1840. *
  1841. * <select>:
  1842. * inherit into the ':display-comboboxcontrol-frame' pseudo-element and
  1843. * the <optgroup>'s ':before' pseudo-element, which is where the label of
  1844. * the <optgroup> gets displayed. The <option>s don't use anonymous boxes,
  1845. * so they need no special rules.
  1846. */
  1847. textarea > .anonymous-div,
  1848. input > .anonymous-div,
  1849. input::placeholder,
  1850. textarea::placeholder,
  1851. *|*::button-content,
  1852. *|*::display-comboboxcontrol-frame,
  1853. optgroup:before {
  1854. unicode-bidi: inherit;
  1855. text-overflow: inherit;
  1856. }
  1857. /**
  1858. * Set default style for invalid elements.
  1859. */
  1860. :not(output):ui-invalid {
  1861. box-shadow: 0 0 1.5px 1px red;
  1862. }
  1863. :not(output):ui-invalid:focusring {
  1864. box-shadow: 0 0 2px 2px rgba(255,0,0,0.4);
  1865. }
  1866. output:ui-invalid {
  1867. color: red;
  1868. }
  1869. @media print {
  1870. input, textarea, select, button {
  1871. user-input: none !important;
  1872. }
  1873. input[type="file"] { height: 2em; }
  1874. }
  1875. progress {
  1876. appearance: progressbar;
  1877. display: inline-block;
  1878. vertical-align: -0.2em;
  1879. /* Default style in case of there is appearance: none; */
  1880. border: 1px solid ThreeDShadow;
  1881. border-right-color: ThreeDHighlight;
  1882. border-bottom-color: ThreeDHighlight;
  1883. /* #e6e6e6 is a light gray. */
  1884. background-color: #e6e6e6;
  1885. }
  1886. ::progress-bar {
  1887. /* Prevent styling that would change the type of frame we construct. */
  1888. display: inline-block ! important;
  1889. float: none ! important;
  1890. position: static ! important;
  1891. overflow: visible ! important;
  1892. box-sizing: border-box ! important;
  1893. appearance: progresschunk;
  1894. height: 100%;
  1895. width: 100%;
  1896. /* Default style in case of there is appearance: none; */
  1897. background-color: #0064b4; /* blue */
  1898. }
  1899. meter {
  1900. appearance: meterbar;
  1901. display: inline-block;
  1902. vertical-align: -0.2em;
  1903. background: linear-gradient(#e6e6e6, #e6e6e6, #eeeeee 20%, #cccccc 45%, #cccccc 55%);
  1904. }
  1905. ::meter-bar {
  1906. /* Block styles that would change the type of frame we construct. */
  1907. display: inline-block ! important;
  1908. float: none ! important;
  1909. position: static ! important;
  1910. overflow: visible ! important;
  1911. appearance: meterchunk;
  1912. height: 100%;
  1913. width: 100%;
  1914. }
  1915. :meter-optimum::meter-bar {
  1916. /* green. */
  1917. background: linear-gradient(#ad7, #ad7, #cea 20%, #7a3 45%, #7a3 55%);
  1918. }
  1919. :meter-sub-optimum::meter-bar {
  1920. /* orange. */
  1921. background: linear-gradient(#fe7, #fe7, #ffc 20%, #db3 45%, #db3 55%);
  1922. }
  1923. :meter-sub-sub-optimum::meter-bar {
  1924. /* red. */
  1925. background: linear-gradient(#f77, #f77, #fcc 20%, #d44 45%, #d44 55%);
  1926. }
  1927. input[type=range] {
  1928. appearance: range;
  1929. display: inline-block;
  1930. inline-size: 12em;
  1931. block-size: 1.3em;
  1932. margin-inline-start: 0.7em;
  1933. margin-inline-end: 0.7em;
  1934. margin-block-start: 0;
  1935. margin-block-end: 0;
  1936. /* Override some rules that apply on all input types: */
  1937. cursor: default;
  1938. background: none;
  1939. border: none;
  1940. binding: none; /* we don't want any of platformHTMLBindings.xml#inputFields */
  1941. /* Prevent nsFrame::HandlePress setting mouse capture to this element. */
  1942. user-select: none ! important;
  1943. }
  1944. input[type=range][orient=block] {
  1945. inline-size: 1.3em;
  1946. block-size: 12em;
  1947. margin-inline-start: 0;
  1948. margin-inline-end: 0;
  1949. margin-block-start: 0.7em;
  1950. margin-block-end: 0.7em;
  1951. }
  1952. input[type=range][orient=horizontal] {
  1953. width: 12em;
  1954. height: 1.3em;
  1955. margin: 0 0.7em;
  1956. }
  1957. input[type=range][orient=vertical] {
  1958. width: 1.3em;
  1959. height: 12em;
  1960. margin: 0.7em 0;
  1961. }
  1962. /**
  1963. * Ideally we'd also require :focusring here, but that doesn't currently
  1964. * work. Instead we only use the focus-outer border style if
  1965. * NS_EVENT_STATE_FOCUSRING is set (the check is in
  1966. * nsRangeFrame::BuildDisplayList).
  1967. */
  1968. input[type=range]::focus-outer {
  1969. border: 1px dotted black;
  1970. }
  1971. /**
  1972. * Layout handles positioning of this pseudo-element specially (so that content
  1973. * authors can concentrate on styling the thumb without worrying about the
  1974. * logic to position it). Specifically the 'margin', 'top' and 'left'
  1975. * properties are ignored.
  1976. *
  1977. * If content authors want to have a vertical range, they will also need to
  1978. * set the width/height of this pseudo-element.
  1979. */
  1980. input[type=range]::range-track {
  1981. /* Prevent styling that would change the type of frame we construct. */
  1982. display: inline-block !important;
  1983. float: none !important;
  1984. position: static !important;
  1985. border: none;
  1986. background-color: #999;
  1987. inline-size: 100%;
  1988. block-size: 0.2em;
  1989. /* Prevent nsFrame::HandlePress setting mouse capture to this element. */
  1990. user-select: none ! important;
  1991. }
  1992. input[type=range][orient=block]::range-track {
  1993. inline-size: 0.2em;
  1994. block-size: 100%;
  1995. }
  1996. input[type=range][orient=horizontal]::range-track {
  1997. width: 100%;
  1998. height: 0.2em;
  1999. }
  2000. input[type=range][orient=vertical]::range-track {
  2001. width: 0.2em;
  2002. height: 100%;
  2003. }
  2004. /**
  2005. * Layout handles positioning of this pseudo-element specially (so that content
  2006. * authors can concentrate on styling this pseudo-element without worrying
  2007. * about the logic to position it). Specifically the 'margin', 'top' and 'left'
  2008. * properties are ignored. Additionally, if the range is horizontal, the width
  2009. * property is ignored, and if the range range is vertical, the height property
  2010. * is ignored.
  2011. */
  2012. input[type=range]::range-progress {
  2013. /* Prevent styling that would change the type of frame we construct. */
  2014. display: inline-block !important;
  2015. float: none !important;
  2016. position: static !important;
  2017. /* Since one of width/height will be ignored, this just sets the "other"
  2018. dimension.
  2019. */
  2020. width: 0.2em;
  2021. height: 0.2em;
  2022. /* Prevent nsFrame::HandlePress setting mouse capture to this element. */
  2023. user-select: none ! important;
  2024. }
  2025. /**
  2026. * Layout handles positioning of this pseudo-element specially (so that content
  2027. * authors can concentrate on styling the thumb without worrying about the
  2028. * logic to position it). Specifically the 'margin', 'top' and 'left'
  2029. * properties are ignored.
  2030. */
  2031. input[type=range]::range-thumb {
  2032. /* Native theming is atomic for range. Set appearance on the range
  2033. * to get rid of it. The thumb's appearance is fixed.
  2034. */
  2035. appearance: range-thumb !important;
  2036. /* Prevent styling that would change the type of frame we construct. */
  2037. display: inline-block !important;
  2038. float: none !important;
  2039. position: static !important;
  2040. width: 1em;
  2041. height: 1em;
  2042. border: 0.1em solid #999;
  2043. border-radius: 0.5em;
  2044. background-color: #F0F0F0;
  2045. /* Prevent nsFrame::HandlePress setting mouse capture to this element. */
  2046. user-select: none ! important;
  2047. }
  2048. /* As a temporary workaround until bug 677302 the rule for input[type=number]
  2049. * has moved to number-control.css
  2050. */
  2051. input[type=number]::number-wrapper {
  2052. /* Prevent styling that would change the type of frame we construct. */
  2053. display: flex;
  2054. float: none !important;
  2055. position: static !important;
  2056. block-size: 100%;
  2057. }
  2058. input[type=number]::number-text {
  2059. display: block; /* Flex items must be block-level. Normally we do fixup in
  2060. the style system to ensure this, but that fixup is disabled
  2061. inside of form controls. So, we hardcode display here. */
  2062. appearance: none;
  2063. /* work around autofocus bug 939248 on initial load */
  2064. user-modify: read-write;
  2065. /* This pseudo-element is also an 'input' element (nested inside and
  2066. * distinct from the <input type=number> element) so we need to prevent the
  2067. * explicit setting of 'text-align' by the general CSS rule for 'input'
  2068. * above. We want to inherit its value from its <input type=number>
  2069. * ancestor, not have that general CSS rule reset it.
  2070. */
  2071. text-align: inherit;
  2072. flex: 1;
  2073. min-inline-size: 0;
  2074. padding: 0;
  2075. border: 0;
  2076. margin: 0;
  2077. }
  2078. input[type=number]::number-spin-box {
  2079. writing-mode: horizontal-tb;
  2080. display: flex;
  2081. flex-direction: column;
  2082. /* If the spin-box has auto height, it ends up enlarging the default height
  2083. * of the control, so we limit it to 1em here. The height doesn't affect
  2084. * the rendering of the spinner-buttons; it's only for layout purposes.
  2085. *
  2086. * This is a temporary hack until we implement better positioning for the
  2087. * spin-box in vertical mode; it works OK at default size but less well
  2088. * if the font-size is made substantially larger or smaller. (Bug 1175074.)
  2089. */
  2090. max-height: 1em;
  2091. align-self: center;
  2092. justify-content: center;
  2093. }
  2094. input[type=number]::number-spin-up {
  2095. writing-mode: horizontal-tb;
  2096. appearance: spinner-upbutton;
  2097. display: block; /* bug 926670 */
  2098. flex: none;
  2099. cursor: default;
  2100. /* Style for when native theming is off: */
  2101. background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="6" height="5"><path d="M1,4 L3,0 5,4" fill="dimgrey"/></svg>');
  2102. background-repeat: no-repeat;
  2103. background-position: center bottom;
  2104. border: 1px solid darkgray;
  2105. border-bottom: none;
  2106. /* [JK] I think the border-*-*-radius properties here can remain physical,
  2107. as we probably don't want to turn the spinner sideways in vertical writing mode */
  2108. border-top-left-radius: 4px;
  2109. border-top-right-radius: 4px;
  2110. }
  2111. input[type=number]::number-spin-down {
  2112. writing-mode: horizontal-tb;
  2113. appearance: spinner-downbutton;
  2114. display: block; /* bug 926670 */
  2115. flex: none;
  2116. cursor: default;
  2117. /* Style for when native theming is off: */
  2118. background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="6" height="5"><path d="M1,1 L3,5 5,1" fill="dimgrey"/></svg>');
  2119. background-repeat: no-repeat;
  2120. background-position: center top;
  2121. border: 1px solid darkgray;
  2122. border-top: none;
  2123. border-bottom-left-radius: 4px;
  2124. border-bottom-right-radius: 4px;
  2125. }
  2126. input[type="number"] > div > div > div:hover {
  2127. /* give some indication of hover state for the up/down buttons */
  2128. background-color: lightblue;
  2129. }
  2130. input[type="date"],
  2131. input[type="time"] {
  2132. overflow: hidden !important;
  2133. font-family: fixed;
  2134. }
  2135. :autofill, :autofill-preview {
  2136. filter: grayscale(21%) brightness(88%) contrast(161%) invert(10%) sepia(40%) saturate(206%);
  2137. }
  2138. :autofill-preview {
  2139. color: GrayText;
  2140. }