Return styles to browser defaults.

default.css 64KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649
  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. }
  898. *|*:any-link:focusring {
  899. /* Don't specify the outline-color, we should always use initial value. */
  900. outline: 1px dotted;
  901. }
  902. /* Miscellaneous */
  903. *|*::cell-content {
  904. display: block;
  905. unicode-bidi: inherit;
  906. text-overflow: inherit;
  907. overflow-clip-box: inherit;
  908. }
  909. *|*::block-inside-inline-wrapper {
  910. display: block;
  911. /* we currently inherit from the inline that is split */
  912. position: inherit; /* static or relative or sticky */
  913. outline: inherit;
  914. outline-offset: inherit;
  915. clip-path: inherit;
  916. filter: inherit;
  917. mask: inherit;
  918. opacity: inherit;
  919. text-decoration: inherit;
  920. box-ordinal-group: inherit;
  921. overflow-clip-box: inherit;
  922. unicode-bidi: inherit;
  923. text-overflow: inherit;
  924. /* The properties below here don't apply if our position is static,
  925. and we do want them to have an effect if it's not, so it's fine
  926. to always inherit them. */
  927. top: inherit;
  928. left: inherit;
  929. bottom: inherit;
  930. right: inherit;
  931. z-index: inherit;
  932. }
  933. *|*::xul-anonymous-block {
  934. display: block;
  935. box-ordinal-group: inherit;
  936. text-overflow: inherit;
  937. overflow-clip-box: inherit;
  938. }
  939. *|*::scrolled-content, *|*::scrolled-canvas,
  940. *|*::scrolled-page-sequence {
  941. /* e.g., text inputs, select boxes */
  942. padding: inherit;
  943. /* The display doesn't affect the kind of frame constructed here. This just
  944. affects auto-width sizing of the block we create. */
  945. display: block;
  946. /* make unicode-bidi inherit, otherwise it has no effect on text inputs and
  947. blocks with overflow: scroll; */
  948. unicode-bidi: inherit;
  949. text-overflow: inherit;
  950. /* Please keep the Multicol/Flex/Grid/Align sections below in sync with
  951. ::fieldset-content/::button-content in forms.css */
  952. /* Multicol container */
  953. column-count: inherit;
  954. column-width: inherit;
  955. column-gap: inherit;
  956. column-rule: inherit;
  957. column-fill: inherit;
  958. /* Flex container */
  959. flex-direction: inherit;
  960. flex-wrap: inherit;
  961. /* -webkit-box container (aliased from -webkit versions to -moz versions) */
  962. box-orient: inherit;
  963. box-direction: inherit;
  964. box-pack: inherit;
  965. box-align: inherit;
  966. /* Grid container */
  967. grid-auto-columns: inherit;
  968. grid-auto-rows: inherit;
  969. grid-auto-flow: inherit;
  970. grid-column-gap: inherit;
  971. grid-row-gap: inherit;
  972. grid-template-areas: inherit;
  973. grid-template-columns: inherit;
  974. grid-template-rows: inherit;
  975. /* CSS Align */
  976. align-content: inherit;
  977. align-items: inherit;
  978. justify-content: inherit;
  979. justify-items: inherit;
  980. /* Do not change these. nsCSSFrameConstructor depends on them to create a good
  981. frame tree. */
  982. overflow-clip-box: inherit;
  983. }
  984. *|*::viewport, *|*::viewport-scroll, *|*::canvas, *|*::scrolled-canvas {
  985. display: block;
  986. background-color: inherit;
  987. }
  988. *|*::viewport-scroll {
  989. overflow: auto;
  990. }
  991. *|*::column-content {
  992. /* the column boxes inside a column-flowed block */
  993. /* make unicode-bidi inherit, otherwise it has no effect on column boxes */
  994. unicode-bidi: inherit;
  995. text-overflow: inherit;
  996. /* inherit the outer frame's display, otherwise we turn into an inline */
  997. display: inherit;
  998. /* Carry through our parent's height so that %-height children get
  999. their heights set */
  1000. height: 100%;
  1001. }
  1002. *|*::anonymous-flex-item,
  1003. *|*::anonymous-grid-item {
  1004. /* Anonymous blocks that wrap contiguous runs of text
  1005. * inside of a flex or grid container. */
  1006. display: block;
  1007. }
  1008. *|*::page-sequence, *|*::scrolled-page-sequence {
  1009. /* Collection of pages in print/print preview. Visual styles may only appear
  1010. * in print preview. */
  1011. display: block;
  1012. background: linear-gradient(#606060, #8a8a8a) fixed;
  1013. height: 100%;
  1014. }
  1015. *|*::page {
  1016. /* Individual page in print/print preview. Visual styles may only appear
  1017. * in print preview. */
  1018. display: block;
  1019. background: white;
  1020. box-shadow: 5px 5px 8px #202020;
  1021. box-decoration-break: clone;
  1022. margin: 0.125in 0.25in;
  1023. }
  1024. *|*::pagecontent {
  1025. display: block;
  1026. margin: auto;
  1027. }
  1028. *|*::pagebreak {
  1029. display: block;
  1030. }
  1031. /* Printing */
  1032. @media print {
  1033. * {
  1034. cursor: default !important;
  1035. }
  1036. }
  1037. *|*:fullscreen:not(:root) {
  1038. position: fixed !important;
  1039. top: 0 !important;
  1040. left: 0 !important;
  1041. right: 0 !important;
  1042. bottom: 0 !important;
  1043. width: 100% !important;
  1044. height: 100% !important;
  1045. margin: 0 !important;
  1046. min-width: 0 !important;
  1047. max-width: none !important;
  1048. min-height: 0 !important;
  1049. max-height: none !important;
  1050. box-sizing: border-box !important;
  1051. object-fit: contain;
  1052. transform: none !important;
  1053. }
  1054. /* Selectors here should match the check in
  1055. * nsViewportFrame.cpp:ShouldInTopLayerForFullscreen() */
  1056. *|*:fullscreen:not(:root):not(:browser-frame) {
  1057. top-layer: top !important;
  1058. }
  1059. *|*::backdrop {
  1060. top-layer: top !important;
  1061. display: block;
  1062. position: fixed;
  1063. top: 0; left: 0;
  1064. right: 0; bottom: 0;
  1065. }
  1066. *|*:full-screen:not(:root)::backdrop {
  1067. background: black;
  1068. }
  1069. /* XML parse error reporting */
  1070. parsererror|parsererror {
  1071. display: block;
  1072. font-family: sans-serif;
  1073. font-weight: bold;
  1074. white-space: pre;
  1075. margin: 1em;
  1076. padding: 1em;
  1077. border-width: thin;
  1078. border-style: inset;
  1079. border-color: red;
  1080. font-size: 14pt;
  1081. background-color: lightyellow;
  1082. color: black;
  1083. }
  1084. parsererror|sourcetext {
  1085. display: block;
  1086. white-space: pre;
  1087. font-family: fixed;
  1088. margin-top: 2em;
  1089. margin-bottom: 1em;
  1090. color: red;
  1091. font-weight: bold;
  1092. font-size: 12pt;
  1093. }
  1094. div:native-anonymous.moz-accessiblecaret {
  1095. /* Add transition effect to make caret size changing smoother. */
  1096. transition-duration: 250ms;
  1097. transition-property: width, height, margin-left;
  1098. }
  1099. div:native-anonymous.moz-accessiblecaret,
  1100. div:native-anonymous.moz-accessiblecaret > #text-overlay,
  1101. div:native-anonymous.moz-accessiblecaret > #image,
  1102. div:native-anonymous.moz-accessiblecaret > #bar {
  1103. position: absolute;
  1104. z-index: 2147483647;
  1105. }
  1106. div:native-anonymous.moz-accessiblecaret > #text-overlay,
  1107. div:native-anonymous.moz-accessiblecaret > #image {
  1108. top: 0;
  1109. width: 100%;
  1110. /* Override this property in moz-custom-content-container to make dummy touch
  1111. * listener work. */
  1112. pointer-events: auto;
  1113. }
  1114. div:native-anonymous.moz-accessiblecaret > #image {
  1115. background-position: center top;
  1116. background-size: 100%;
  1117. background-repeat: no-repeat;
  1118. background-origin: content-box;
  1119. height: 100%;
  1120. }
  1121. div:native-anonymous.moz-accessiblecaret > #bar {
  1122. margin-left: 49%;
  1123. background-color: #008aa0;
  1124. }
  1125. div:native-anonymous.moz-accessiblecaret.no-bar > #bar {
  1126. display: none;
  1127. }
  1128. div:native-anonymous.moz-accessiblecaret.left > #text-overlay,
  1129. div:native-anonymous.moz-accessiblecaret.left > #image {
  1130. margin-left: -39%;
  1131. }
  1132. div:native-anonymous.moz-accessiblecaret.right > #text-overlay,
  1133. div:native-anonymous.moz-accessiblecaret.right > #image {
  1134. margin-left: 41%;
  1135. }
  1136. div:native-anonymous.moz-accessiblecaret.none {
  1137. display: none;
  1138. }
  1139. /* Custom content container in the CanvasFrame, positioned on top of everything
  1140. everything else, not reacting to pointer events. */
  1141. div:native-anonymous.moz-custom-content-container {
  1142. pointer-events: none;
  1143. top-layer: top;
  1144. position: absolute;
  1145. top: 0;
  1146. left: 0;
  1147. width: 100%;
  1148. height: 100%;
  1149. }
  1150. /* Shadow DOM v1
  1151. * https://drafts.csswg.org/css-scoping/#slots-in-shadow-tree */
  1152. slot {
  1153. display: contents;
  1154. }
  1155. /* This Source Code Form is subject to the terms of the Mozilla Public
  1156. * License, v. 2.0. If a copy of the MPL was not distributed with this
  1157. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  1158. /**
  1159. Styles for old GFX form widgets
  1160. **/
  1161. @namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */
  1162. @namespace xul url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
  1163. *|*::fieldset-content {
  1164. display: block; /* nsRuleNode::ComputeDisplayData overrules this in some cases */
  1165. unicode-bidi: inherit;
  1166. text-overflow: inherit;
  1167. overflow: inherit;
  1168. overflow-clip-box: inherit;
  1169. /* Need to inherit border-radius too, so when the fieldset has rounded
  1170. borders we don't leak out the corners for hit-testing purposes. */
  1171. border-radius: inherit;
  1172. padding: inherit;
  1173. block-size: 100%; /* Need this so percentage block-sizes of kids work right */
  1174. /* Please keep the Multicol/Flex/Grid/Align sections below in sync with
  1175. ::scrolled-content in ua.css and ::button-content below. */
  1176. /* Multicol container */
  1177. column-count: inherit;
  1178. column-width: inherit;
  1179. column-gap: inherit;
  1180. column-rule: inherit;
  1181. column-fill: inherit;
  1182. /* Flex container */
  1183. flex-direction: inherit;
  1184. flex-wrap: inherit;
  1185. /* -webkit-box container (aliased from -webkit versions to -moz versions) */
  1186. box-orient: inherit;
  1187. box-direction: inherit;
  1188. box-pack: inherit;
  1189. box-align: inherit;
  1190. /* Grid container */
  1191. grid-auto-columns: inherit;
  1192. grid-auto-rows: inherit;
  1193. grid-auto-flow: inherit;
  1194. grid-column-gap: inherit;
  1195. grid-row-gap: inherit;
  1196. grid-template-areas: inherit;
  1197. grid-template-columns: inherit;
  1198. grid-template-rows: inherit;
  1199. /* CSS Align */
  1200. align-content: inherit;
  1201. align-items: inherit;
  1202. justify-content: inherit;
  1203. justify-items: inherit;
  1204. }
  1205. /* miscellaneous form elements */
  1206. fieldset > legend {
  1207. padding-inline-start: 2px;
  1208. padding-inline-end: 2px;
  1209. inline-size: fit-content;
  1210. }
  1211. legend {
  1212. display: block;
  1213. }
  1214. fieldset {
  1215. display: block;
  1216. margin-inline-start: 2px;
  1217. margin-inline-end: 2px;
  1218. padding-block-start: 0.35em;
  1219. padding-block-end: 0.75em;
  1220. padding-inline-start: 0.625em;
  1221. padding-inline-end: 0.625em;
  1222. border: 2px groove ThreeDLightShadow;
  1223. min-width: min-content;
  1224. }
  1225. label {
  1226. cursor: default;
  1227. }
  1228. /* default inputs, text inputs, and selects */
  1229. /* Note: Values in nsNativeTheme IsWidgetStyled function
  1230. need to match textfield background/border values here */
  1231. input {
  1232. appearance: textfield;
  1233. /* The sum of border and padding on block-start and block-end
  1234. must be the same here, for buttons, and for <select> (including its
  1235. internal padding magic) */
  1236. padding: 1px;
  1237. border: 2px inset rgb(227, 227, 227);
  1238. background-color: transparent;
  1239. color: rgb(0, 0, 0);
  1240. font: field;
  1241. text-rendering: optimizeLegibility;
  1242. line-height: normal;
  1243. text-align: start;
  1244. text-transform: none;
  1245. word-spacing: normal;
  1246. letter-spacing: normal;
  1247. cursor: text;
  1248. text-indent: 0;
  1249. user-select: text;
  1250. text-shadow: none;
  1251. overflow-clip-box: padding-box content-box;
  1252. }
  1253. input > .anonymous-div,
  1254. input::placeholder {
  1255. word-wrap: normal !important;
  1256. /* Make the line-height equal to the available height */
  1257. line-height: block-height;
  1258. }
  1259. textarea {
  1260. margin-block-start: 1px;
  1261. margin-block-end: 1px;
  1262. border: 2px inset ThreeDLightShadow;
  1263. /* The 1px inline padding is for parity with Win/IE */
  1264. padding-inline-start: 1px;
  1265. padding-inline-end: 1px;
  1266. background-color: transparent;
  1267. color: rgb(0, 0, 0);
  1268. font: medium fixed;
  1269. text-rendering: optimizeLegibility;
  1270. text-align: start;
  1271. text-transform: none;
  1272. word-spacing: normal;
  1273. letter-spacing: normal;
  1274. vertical-align: text-bottom;
  1275. cursor: text;
  1276. resize: both;
  1277. appearance: textfield-multiline;
  1278. text-indent: 0;
  1279. user-select: text;
  1280. text-shadow: none;
  1281. white-space: pre-wrap;
  1282. word-wrap: break-word;
  1283. overflow-clip-box: content-box;
  1284. }
  1285. textarea > scrollbar {
  1286. cursor: default;
  1287. }
  1288. textarea > .anonymous-div,
  1289. input > .anonymous-div,
  1290. input::placeholder,
  1291. textarea::placeholder,
  1292. input > .preview-div
  1293. textarea > .preview-div {
  1294. overflow: auto;
  1295. border: 0px !important;
  1296. padding: inherit !important;
  1297. margin: 0px;
  1298. text-decoration: inherit;
  1299. text-decoration-color: inherit;
  1300. text-decoration-style: inherit;
  1301. display: inline-block;
  1302. ime-mode: inherit;
  1303. resize: inherit;
  1304. control-character-visibility: visible;
  1305. overflow-clip-box: inherit;
  1306. }
  1307. input > .anonymous-div,
  1308. input::placeholder,
  1309. input > .preview-div {
  1310. white-space: pre;
  1311. }
  1312. input > .anonymous-div.wrap {
  1313. white-space: pre-wrap;
  1314. }
  1315. textarea > .anonymous-div.inherit-overflow,
  1316. input > .anonymous-div.inherit-overflow {
  1317. overflow: inherit;
  1318. }
  1319. textarea > .anonymous-div.inherit-scroll-behavior,
  1320. input > .anonymous-div.inherit-scroll-behavior {
  1321. scroll-behavior: inherit;
  1322. overscroll-behavior: inherit;
  1323. }
  1324. input::placeholder,
  1325. textarea::placeholder,
  1326. input > .preview-div,
  1327. textarea > .preview-div {
  1328. /*
  1329. * Changing display to inline can leads to broken behaviour and will assert.
  1330. */
  1331. display: inline-block !important;
  1332. /*
  1333. * Changing resize would display a broken behaviour and will assert.
  1334. */
  1335. resize: none !important;
  1336. overflow: hidden !important;
  1337. /*
  1338. * The placeholder or preview should be ignored by pointer otherwise, we might have some
  1339. * unexpected behavior like the resize handle not being selectable.
  1340. */
  1341. pointer-events: none !important;
  1342. }
  1343. input::placeholder,
  1344. textarea::placeholder {
  1345. opacity: 0.54;
  1346. }
  1347. textarea::placeholder,
  1348. textarea > .preview-div {
  1349. white-space: pre-wrap !important;
  1350. }
  1351. input:read-write,
  1352. textarea:read-write {
  1353. user-modify: read-write !important;
  1354. }
  1355. select {
  1356. margin: 0;
  1357. border-color: rgb(227, 227, 227);
  1358. background-color: Combobox;
  1359. color: ComboboxText;
  1360. font: list;
  1361. /*
  1362. * Note that the "UA !important" tests in
  1363. * layout/style/test/test_animations.html depend on this rule, because
  1364. * they need some UA !important rule to test. If this changes, use a
  1365. * different one there.
  1366. */
  1367. line-height: normal !important;
  1368. white-space: nowrap !important;
  1369. word-wrap: normal !important;
  1370. text-align: start;
  1371. cursor: default;
  1372. box-sizing: border-box;
  1373. user-select: none;
  1374. appearance: menulist;
  1375. border-width: 2px;
  1376. border-style: inset;
  1377. text-indent: 0;
  1378. overflow: hidden-unscrollable;
  1379. text-shadow: none;
  1380. /* No text-decoration reaching inside, by default */
  1381. display: inline-block;
  1382. page-break-inside: avoid;
  1383. overflow-clip-box: padding-box !important; /* bug 992447 */
  1384. }
  1385. /* Need the "select[size][multiple]" selector to override the settings on
  1386. 'select[size="1"]', eg if one has <select size="1" multiple> */
  1387. select[size],
  1388. select[multiple],
  1389. select[size][multiple] {
  1390. /* Different alignment and padding for listbox vs combobox */
  1391. background-color: transparent;
  1392. color: rgb(0, 0, 0);
  1393. vertical-align: text-bottom;
  1394. padding-block-start: 1px;
  1395. padding-block-end: 1px;
  1396. padding-inline-start: 0;
  1397. padding-inline-end: 0;
  1398. appearance: listbox;
  1399. }
  1400. select[size="0"],
  1401. select[size="1"] {
  1402. /* Except this is not a listbox */
  1403. background-color: Combobox;
  1404. color: ComboboxText;
  1405. vertical-align: baseline;
  1406. padding: 0;
  1407. appearance: menulist;
  1408. }
  1409. select > button {
  1410. inline-size: 12px;
  1411. white-space: nowrap;
  1412. position: static !important;
  1413. background-repeat: no-repeat !important;
  1414. background-position: center !important;
  1415. appearance: menulist-button;
  1416. /* Make sure to size correctly if the combobox has a non-auto height. */
  1417. block-size: 100% ! important;
  1418. box-sizing: border-box ! important;
  1419. /*
  1420. Make sure to align properly with the display frame. Note that we
  1421. want the baseline of the combobox to match the baseline of the
  1422. display frame, so the dropmarker is what gets the vertical-align.
  1423. */
  1424. vertical-align: top !important;
  1425. }
  1426. select:empty {
  1427. inline-size: 2.5em;
  1428. }
  1429. *|*::display-comboboxcontrol-frame {
  1430. overflow: hidden-unscrollable;
  1431. /* This block-start/end padding plus the combobox block-start/end border need to
  1432. add up to the block-start/end borderpadding of text inputs and buttons */
  1433. padding-block-start: 1px;
  1434. padding-block-end: 1px;
  1435. padding-inline-start: 4px;
  1436. padding-inline-end: 0;
  1437. color: inherit;
  1438. white-space: nowrap;
  1439. text-align: inherit;
  1440. user-select: none;
  1441. /* Make sure to size correctly if the combobox has a non-auto block-size. */
  1442. block-size: 100% ! important;
  1443. box-sizing: border-box ! important;
  1444. line-height: block-height;
  1445. }
  1446. option {
  1447. display: block;
  1448. float: none !important;
  1449. position: static !important;
  1450. min-block-size: 1em;
  1451. line-height: normal !important;
  1452. user-select: none;
  1453. text-indent: 0;
  1454. white-space: nowrap !important;
  1455. word-wrap: normal !important;
  1456. text-align: match-parent;
  1457. }
  1458. select > option {
  1459. padding-block-start : 0;
  1460. padding-block-end: 0;
  1461. padding-inline-start: 3px;
  1462. padding-inline-end: 5px;
  1463. }
  1464. option:checked {
  1465. background-color: html-cellhighlight !important;
  1466. color: html-cellhighlighttext !important;
  1467. }
  1468. select:focus > option:checked,
  1469. select:focus > optgroup > option:checked {
  1470. background-color: Highlight ! important;
  1471. color: HighlightText ! important;
  1472. }
  1473. optgroup {
  1474. display: block;
  1475. float: none !important;
  1476. position: static !important;
  1477. font: list;
  1478. line-height: normal !important;
  1479. font-style: italic;
  1480. font-weight: bold;
  1481. font-size: inherit;
  1482. user-select: none;
  1483. text-indent: 0;
  1484. white-space: nowrap !important;
  1485. word-wrap: normal !important;
  1486. }
  1487. optgroup > option {
  1488. padding-inline-start: 20px;
  1489. font-style: normal;
  1490. font-weight: normal;
  1491. }
  1492. optgroup:before {
  1493. display: block;
  1494. content: attr(label);
  1495. }
  1496. *|*::dropdown-list {
  1497. z-index: 2147483647;
  1498. background-color: inherit;
  1499. user-select: none;
  1500. position: static !important;
  1501. float: none !important;
  1502. /*
  1503. * We can't change the padding here, because that would affect our
  1504. * intrinsic inline-size, since we scroll. But at the same time, we want
  1505. * to make sure that our inline-start border+padding matches the inline-start
  1506. * border+padding of a combobox so that our scrollbar will line up
  1507. * with the dropmarker. So set our inline-start border to 2px.
  1508. */
  1509. border: 1px outset black !important;
  1510. border-inline-start-width: 2px ! important;
  1511. }
  1512. input:disabled,
  1513. textarea:disabled,
  1514. option:disabled,
  1515. optgroup:disabled,
  1516. select:disabled:disabled /* Need the pseudo-class twice to have the specificity
  1517. be at least the same as select[size][multiple] above */
  1518. {
  1519. color: GrayText;
  1520. background-color: ThreeDLightShadow;
  1521. cursor: inherit;
  1522. }
  1523. input:disabled,
  1524. textarea:disabled {
  1525. cursor: default;
  1526. }
  1527. option:disabled,
  1528. optgroup:disabled {
  1529. background-color: transparent;
  1530. }
  1531. /* hidden inputs */
  1532. input[type="hidden"] {
  1533. appearance: none;
  1534. display: none !important;
  1535. padding: 0;
  1536. border: 0;
  1537. cursor: auto;
  1538. user-focus: ignore;
  1539. binding: none;
  1540. }
  1541. /* image buttons */
  1542. input[type="image"] {
  1543. appearance: none;
  1544. padding: 0;
  1545. border: none;
  1546. background-color: transparent;
  1547. font-family: sans-serif;
  1548. font-size: small;
  1549. cursor: pointer;
  1550. binding: none;
  1551. }
  1552. input[type="image"]:disabled {
  1553. cursor: inherit;
  1554. }
  1555. input[type="image"]:focusring {
  1556. /* Don't specify the outline-color, we should always use initial value. */
  1557. outline: 1px dotted;
  1558. }
  1559. /* file selector */
  1560. input[type="file"] {
  1561. display: inline-block;
  1562. white-space: nowrap;
  1563. overflow: hidden;
  1564. overflow-clip-box: padding-box;
  1565. color: inherit;
  1566. /* Revert rules which apply on all inputs. */
  1567. appearance: none;
  1568. binding: none;
  1569. cursor: default;
  1570. border: none;
  1571. background-color: transparent;
  1572. padding: 0;
  1573. }
  1574. input[type="file"] > xul|label {
  1575. min-inline-size: 12em;
  1576. padding-inline-start: 5px;
  1577. text-align: match-parent;
  1578. color: inherit;
  1579. font-size: inherit;
  1580. letter-spacing: inherit;
  1581. /*
  1582. * Force the text to have LTR directionality. Otherwise filenames containing
  1583. * RTL characters will be reordered with chaotic results.
  1584. */
  1585. direction: ltr !important;
  1586. }
  1587. /* button part of file selector */
  1588. input[type="file"] > button[type="button"] {
  1589. block-size: inherit;
  1590. font-size: inherit;
  1591. letter-spacing: inherit;
  1592. cursor: inherit;
  1593. }
  1594. /* colored part of the color selector button */
  1595. input[type="color"]::color-swatch {
  1596. width: 100%;
  1597. height: 100%;
  1598. min-width: 3px;
  1599. min-height: 3px;
  1600. margin-inline-start: auto;
  1601. margin-inline-end: auto;
  1602. box-sizing: border-box;
  1603. border: 1px solid grey;
  1604. display: block;
  1605. }
  1606. /* Try to make RTL <input type='file'> look nicer. */
  1607. /* TODO: find a better solution than forcing direction: ltr on all file
  1608. input labels and remove this override -- bug 1161482 */
  1609. input[type="file"]:dir(rtl) > xul|label {
  1610. padding-inline-start: 0px;
  1611. padding-inline-end: 5px;
  1612. }
  1613. /* radio buttons */
  1614. input[type="radio"] {
  1615. display: inline-block;
  1616. appearance: radio;
  1617. margin-block-start: 3px;
  1618. margin-block-end: 0px;
  1619. margin-inline-start: 5px;
  1620. margin-inline-end: 3px;
  1621. }
  1622. /* check boxes */
  1623. input[type="checkbox"] {
  1624. display: inline-block;
  1625. appearance: checkbox;
  1626. margin-block-start: 3px;
  1627. margin-block-end: 3px;
  1628. margin-inline-start: 4px;
  1629. margin-inline-end: 3px;
  1630. }
  1631. /* common features of radio buttons and check boxes */
  1632. input[type="radio"],
  1633. input[type="checkbox"] {
  1634. box-sizing: border-box;
  1635. cursor: default;
  1636. /* unset some values from the general 'input' rule above: */
  1637. padding: unset;
  1638. binding: unset;
  1639. border: unset;
  1640. background-color: unset;
  1641. color: unset;
  1642. }
  1643. input[type="radio"]:disabled,
  1644. input[type="radio"]:disabled:active,
  1645. input[type="radio"]:disabled:hover,
  1646. input[type="radio"]:disabled:hover:active,
  1647. input[type="checkbox"]:disabled,
  1648. input[type="checkbox"]:disabled:active,
  1649. input[type="checkbox"]:disabled:hover,
  1650. input[type="checkbox"]:disabled:hover:active {
  1651. cursor: inherit;
  1652. }
  1653. input[type="search"] {
  1654. box-sizing: border-box;
  1655. }
  1656. /* buttons */
  1657. /* Note: Values in nsNativeTheme IsWidgetStyled function
  1658. need to match button background/border values here */
  1659. /* Non text-related properties for buttons: these ones are shared with
  1660. input[type="color"] */
  1661. button,
  1662. input[type="color"],
  1663. input[type="reset"],
  1664. input[type="button"],
  1665. input[type="submit"] {
  1666. appearance: button;
  1667. /* The sum of border and padding on block-start and block-end
  1668. must be the same here, for text inputs, and for <select>.
  1669. Note focus-inner padding does not affect button size. */
  1670. padding-block-start: 0px;
  1671. padding-inline-end: 8px;
  1672. padding-block-end: 0px;
  1673. padding-inline-start: 8px;
  1674. border: 2px outset ThreeDLightShadow;
  1675. background-color: ButtonFace;
  1676. cursor: default;
  1677. box-sizing: border-box;
  1678. user-select: none;
  1679. binding: none;
  1680. }
  1681. /* Text-related properties for buttons: these ones are not shared with
  1682. input[type="color"] */
  1683. button,
  1684. input[type="reset"],
  1685. input[type="button"],
  1686. input[type="submit"] {
  1687. color: ButtonText;
  1688. font: button;
  1689. line-height: normal;
  1690. white-space: pre;
  1691. text-align: center;
  1692. text-shadow: none;
  1693. overflow-clip-box: padding-box;
  1694. }
  1695. input[type="color"] {
  1696. inline-size: 64px;
  1697. block-size: 23px;
  1698. }
  1699. button {
  1700. /* Buttons should lay out like "normal" html, mostly */
  1701. white-space: inherit;
  1702. text-indent: 0;
  1703. /* But no text-decoration reaching inside, by default */
  1704. display: inline-block;
  1705. }
  1706. *|*::button-content {
  1707. display: block;
  1708. /* Please keep the Multicol/Flex/Grid/Align sections below in sync with
  1709. ::scrolled-content in ua.css and ::fieldset-content above. */
  1710. /* Multicol container */
  1711. column-count: inherit;
  1712. column-width: inherit;
  1713. column-gap: inherit;
  1714. column-rule: inherit;
  1715. column-fill: inherit;
  1716. /* Flex container */
  1717. flex-direction: inherit;
  1718. flex-wrap: inherit;
  1719. /* -webkit-box container (aliased from -webkit versions to -moz versions) */
  1720. box-orient: inherit;
  1721. box-direction: inherit;
  1722. box-pack: inherit;
  1723. box-align: inherit;
  1724. /* Grid container */
  1725. grid-auto-columns: inherit;
  1726. grid-auto-rows: inherit;
  1727. grid-auto-flow: inherit;
  1728. grid-column-gap: inherit;
  1729. grid-row-gap: inherit;
  1730. grid-template-areas: inherit;
  1731. grid-template-columns: inherit;
  1732. grid-template-rows: inherit;
  1733. /* CSS Align */
  1734. align-content: inherit;
  1735. align-items: inherit;
  1736. justify-content: inherit;
  1737. justify-items: inherit;
  1738. }
  1739. button:hover,
  1740. input[type="color"]:hover,
  1741. input[type="reset"]:hover,
  1742. input[type="button"]:hover,
  1743. input[type="submit"]:hover {
  1744. background-color: buttonhoverface;
  1745. }
  1746. button:hover,
  1747. input[type="reset"]:hover,
  1748. input[type="button"]:hover,
  1749. input[type="submit"]:hover {
  1750. color: buttonhovertext;
  1751. }
  1752. button:active:hover,
  1753. input[type="color"]:active:hover,
  1754. input[type="reset"]:active:hover,
  1755. input[type="button"]:active:hover,
  1756. input[type="submit"]:active:hover {
  1757. border-style: inset;
  1758. background-color: ButtonFace;
  1759. }
  1760. button:active:hover,
  1761. input[type="reset"]:active:hover,
  1762. input[type="button"]:active:hover,
  1763. input[type="submit"]:active:hover {
  1764. color: ButtonText;
  1765. }
  1766. button::focus-inner,
  1767. input[type="color"]::focus-inner,
  1768. input[type="reset"]::focus-inner,
  1769. input[type="button"]::focus-inner,
  1770. input[type="submit"]::focus-inner,
  1771. input[type="file"] > button[type="button"]::focus-inner {
  1772. /* Note this padding only affects the focus-inner ring, not the button itself */
  1773. padding-block-start: 0px;
  1774. padding-inline-end: 2px;
  1775. padding-block-end: 0px;
  1776. padding-inline-start: 2px;
  1777. border: 1px dotted transparent;
  1778. }
  1779. button:focusring::focus-inner,
  1780. input[type="color"]:focusring::focus-inner,
  1781. input[type="reset"]:focusring::focus-inner,
  1782. input[type="button"]:focusring::focus-inner,
  1783. input[type="submit"]:focusring::focus-inner,
  1784. input[type="file"] > button[type="button"]:focusring::focus-inner {
  1785. border-color: ButtonText;
  1786. }
  1787. button:disabled:active, button:disabled,
  1788. input[type="color"]:disabled:active,
  1789. input[type="color"]:disabled,
  1790. input[type="reset"]:disabled:active,
  1791. input[type="reset"]:disabled,
  1792. input[type="button"]:disabled:active,
  1793. input[type="button"]:disabled,
  1794. select:disabled > button,
  1795. select:disabled > button,
  1796. input[type="submit"]:disabled:active,
  1797. input[type="submit"]:disabled {
  1798. /* The sum of border and padding on block-start and block-end
  1799. must be the same here and for text inputs */
  1800. padding-block-start: 0px;
  1801. padding-inline-end: 8px;
  1802. padding-block-end: 0px;
  1803. padding-inline-start: 8px;
  1804. border: 2px outset ThreeDLightShadow;
  1805. cursor: inherit;
  1806. }
  1807. button:disabled:active, button:disabled,
  1808. input[type="reset"]:disabled:active,
  1809. input[type="reset"]:disabled,
  1810. input[type="button"]:disabled:active,
  1811. input[type="button"]:disabled,
  1812. select:disabled > button,
  1813. select:disabled > button,
  1814. input[type="submit"]:disabled:active,
  1815. input[type="submit"]:disabled {
  1816. color: GrayText;
  1817. }
  1818. /*
  1819. * Make form controls inherit 'unicode-bidi' transparently as required by
  1820. * their various anonymous descendants and pseudo-elements:
  1821. *
  1822. * <textarea> and <input type="text">:
  1823. * inherit into the XULScroll frame with class 'anonymous-div' which is a
  1824. * child of the text control.
  1825. *
  1826. * Buttons (either <button>, <input type="submit">, <input type="button">
  1827. * or <input type="reset">)
  1828. * inherit into the ':button-content' pseudo-element.
  1829. *
  1830. * <select>:
  1831. * inherit into the ':display-comboboxcontrol-frame' pseudo-element and
  1832. * the <optgroup>'s ':before' pseudo-element, which is where the label of
  1833. * the <optgroup> gets displayed. The <option>s don't use anonymous boxes,
  1834. * so they need no special rules.
  1835. */
  1836. textarea > .anonymous-div,
  1837. input > .anonymous-div,
  1838. input::placeholder,
  1839. textarea::placeholder,
  1840. *|*::button-content,
  1841. *|*::display-comboboxcontrol-frame,
  1842. optgroup:before {
  1843. unicode-bidi: inherit;
  1844. text-overflow: inherit;
  1845. }
  1846. /**
  1847. * Set default style for invalid elements.
  1848. */
  1849. :not(output):ui-invalid {
  1850. box-shadow: 0 0 1.5px 1px red;
  1851. }
  1852. :not(output):ui-invalid:focusring {
  1853. box-shadow: 0 0 2px 2px rgba(255,0,0,0.4);
  1854. }
  1855. output:ui-invalid {
  1856. color: red;
  1857. }
  1858. @media print {
  1859. input, textarea, select, button {
  1860. user-input: none !important;
  1861. }
  1862. input[type="file"] { height: 2em; }
  1863. }
  1864. progress {
  1865. appearance: progressbar;
  1866. display: inline-block;
  1867. vertical-align: -0.2em;
  1868. /* Default style in case of there is appearance: none; */
  1869. border: 1px solid ThreeDShadow;
  1870. border-right-color: ThreeDHighlight;
  1871. border-bottom-color: ThreeDHighlight;
  1872. /* #e6e6e6 is a light gray. */
  1873. background-color: #e6e6e6;
  1874. }
  1875. ::progress-bar {
  1876. /* Prevent styling that would change the type of frame we construct. */
  1877. display: inline-block ! important;
  1878. float: none ! important;
  1879. position: static ! important;
  1880. overflow: visible ! important;
  1881. box-sizing: border-box ! important;
  1882. appearance: progresschunk;
  1883. height: 100%;
  1884. width: 100%;
  1885. /* Default style in case of there is appearance: none; */
  1886. background-color: #0064b4; /* blue */
  1887. }
  1888. meter {
  1889. appearance: meterbar;
  1890. display: inline-block;
  1891. vertical-align: -0.2em;
  1892. background: linear-gradient(#e6e6e6, #e6e6e6, #eeeeee 20%, #cccccc 45%, #cccccc 55%);
  1893. }
  1894. ::meter-bar {
  1895. /* Block styles that would change the type of frame we construct. */
  1896. display: inline-block ! important;
  1897. float: none ! important;
  1898. position: static ! important;
  1899. overflow: visible ! important;
  1900. appearance: meterchunk;
  1901. height: 100%;
  1902. width: 100%;
  1903. }
  1904. :meter-optimum::meter-bar {
  1905. /* green. */
  1906. background: linear-gradient(#ad7, #ad7, #cea 20%, #7a3 45%, #7a3 55%);
  1907. }
  1908. :meter-sub-optimum::meter-bar {
  1909. /* orange. */
  1910. background: linear-gradient(#fe7, #fe7, #ffc 20%, #db3 45%, #db3 55%);
  1911. }
  1912. :meter-sub-sub-optimum::meter-bar {
  1913. /* red. */
  1914. background: linear-gradient(#f77, #f77, #fcc 20%, #d44 45%, #d44 55%);
  1915. }
  1916. input[type=range] {
  1917. appearance: range;
  1918. display: inline-block;
  1919. inline-size: 12em;
  1920. block-size: 1.3em;
  1921. margin-inline-start: 0.7em;
  1922. margin-inline-end: 0.7em;
  1923. margin-block-start: 0;
  1924. margin-block-end: 0;
  1925. /* Override some rules that apply on all input types: */
  1926. cursor: default;
  1927. background: none;
  1928. border: none;
  1929. binding: none; /* we don't want any of platformHTMLBindings.xml#inputFields */
  1930. /* Prevent nsFrame::HandlePress setting mouse capture to this element. */
  1931. user-select: none ! important;
  1932. }
  1933. input[type=range][orient=block] {
  1934. inline-size: 1.3em;
  1935. block-size: 12em;
  1936. margin-inline-start: 0;
  1937. margin-inline-end: 0;
  1938. margin-block-start: 0.7em;
  1939. margin-block-end: 0.7em;
  1940. }
  1941. input[type=range][orient=horizontal] {
  1942. width: 12em;
  1943. height: 1.3em;
  1944. margin: 0 0.7em;
  1945. }
  1946. input[type=range][orient=vertical] {
  1947. width: 1.3em;
  1948. height: 12em;
  1949. margin: 0.7em 0;
  1950. }
  1951. /**
  1952. * Ideally we'd also require :focusring here, but that doesn't currently
  1953. * work. Instead we only use the focus-outer border style if
  1954. * NS_EVENT_STATE_FOCUSRING is set (the check is in
  1955. * nsRangeFrame::BuildDisplayList).
  1956. */
  1957. input[type=range]::focus-outer {
  1958. border: 1px dotted black;
  1959. }
  1960. /**
  1961. * Layout handles positioning of this pseudo-element specially (so that content
  1962. * authors can concentrate on styling the thumb without worrying about the
  1963. * logic to position it). Specifically the 'margin', 'top' and 'left'
  1964. * properties are ignored.
  1965. *
  1966. * If content authors want to have a vertical range, they will also need to
  1967. * set the width/height of this pseudo-element.
  1968. */
  1969. input[type=range]::range-track {
  1970. /* Prevent styling that would change the type of frame we construct. */
  1971. display: inline-block !important;
  1972. float: none !important;
  1973. position: static !important;
  1974. border: none;
  1975. background-color: #999;
  1976. inline-size: 100%;
  1977. block-size: 0.2em;
  1978. /* Prevent nsFrame::HandlePress setting mouse capture to this element. */
  1979. user-select: none ! important;
  1980. }
  1981. input[type=range][orient=block]::range-track {
  1982. inline-size: 0.2em;
  1983. block-size: 100%;
  1984. }
  1985. input[type=range][orient=horizontal]::range-track {
  1986. width: 100%;
  1987. height: 0.2em;
  1988. }
  1989. input[type=range][orient=vertical]::range-track {
  1990. width: 0.2em;
  1991. height: 100%;
  1992. }
  1993. /**
  1994. * Layout handles positioning of this pseudo-element specially (so that content
  1995. * authors can concentrate on styling this pseudo-element without worrying
  1996. * about the logic to position it). Specifically the 'margin', 'top' and 'left'
  1997. * properties are ignored. Additionally, if the range is horizontal, the width
  1998. * property is ignored, and if the range range is vertical, the height property
  1999. * is ignored.
  2000. */
  2001. input[type=range]::range-progress {
  2002. /* Prevent styling that would change the type of frame we construct. */
  2003. display: inline-block !important;
  2004. float: none !important;
  2005. position: static !important;
  2006. /* Since one of width/height will be ignored, this just sets the "other"
  2007. dimension.
  2008. */
  2009. width: 0.2em;
  2010. height: 0.2em;
  2011. /* Prevent nsFrame::HandlePress setting mouse capture to this element. */
  2012. user-select: none ! important;
  2013. }
  2014. /**
  2015. * Layout handles positioning of this pseudo-element specially (so that content
  2016. * authors can concentrate on styling the thumb without worrying about the
  2017. * logic to position it). Specifically the 'margin', 'top' and 'left'
  2018. * properties are ignored.
  2019. */
  2020. input[type=range]::range-thumb {
  2021. /* Native theming is atomic for range. Set appearance on the range
  2022. * to get rid of it. The thumb's appearance is fixed.
  2023. */
  2024. appearance: range-thumb !important;
  2025. /* Prevent styling that would change the type of frame we construct. */
  2026. display: inline-block !important;
  2027. float: none !important;
  2028. position: static !important;
  2029. width: 1em;
  2030. height: 1em;
  2031. border: 0.1em solid #999;
  2032. border-radius: 0.5em;
  2033. background-color: #F0F0F0;
  2034. /* Prevent nsFrame::HandlePress setting mouse capture to this element. */
  2035. user-select: none ! important;
  2036. }
  2037. /* As a temporary workaround until bug 677302 the rule for input[type=number]
  2038. * has moved to number-control.css
  2039. */
  2040. input[type=number]::number-wrapper {
  2041. /* Prevent styling that would change the type of frame we construct. */
  2042. display: flex;
  2043. float: none !important;
  2044. position: static !important;
  2045. block-size: 100%;
  2046. }
  2047. input[type=number]::number-text {
  2048. display: block; /* Flex items must be block-level. Normally we do fixup in
  2049. the style system to ensure this, but that fixup is disabled
  2050. inside of form controls. So, we hardcode display here. */
  2051. appearance: none;
  2052. /* work around autofocus bug 939248 on initial load */
  2053. user-modify: read-write;
  2054. /* This pseudo-element is also an 'input' element (nested inside and
  2055. * distinct from the <input type=number> element) so we need to prevent the
  2056. * explicit setting of 'text-align' by the general CSS rule for 'input'
  2057. * above. We want to inherit its value from its <input type=number>
  2058. * ancestor, not have that general CSS rule reset it.
  2059. */
  2060. text-align: inherit;
  2061. flex: 1;
  2062. min-inline-size: 0;
  2063. padding: 0;
  2064. border: 0;
  2065. margin: 0;
  2066. }
  2067. input[type=number]::number-spin-box {
  2068. writing-mode: horizontal-tb;
  2069. display: flex;
  2070. flex-direction: column;
  2071. /* If the spin-box has auto height, it ends up enlarging the default height
  2072. * of the control, so we limit it to 1em here. The height doesn't affect
  2073. * the rendering of the spinner-buttons; it's only for layout purposes.
  2074. *
  2075. * This is a temporary hack until we implement better positioning for the
  2076. * spin-box in vertical mode; it works OK at default size but less well
  2077. * if the font-size is made substantially larger or smaller. (Bug 1175074.)
  2078. */
  2079. max-height: 1em;
  2080. align-self: center;
  2081. justify-content: center;
  2082. }
  2083. input[type=number]::number-spin-up {
  2084. writing-mode: horizontal-tb;
  2085. appearance: spinner-upbutton;
  2086. display: block; /* bug 926670 */
  2087. flex: none;
  2088. cursor: default;
  2089. /* Style for when native theming is off: */
  2090. 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>');
  2091. background-repeat: no-repeat;
  2092. background-position: center bottom;
  2093. border: 1px solid darkgray;
  2094. border-bottom: none;
  2095. /* [JK] I think the border-*-*-radius properties here can remain physical,
  2096. as we probably don't want to turn the spinner sideways in vertical writing mode */
  2097. border-top-left-radius: 4px;
  2098. border-top-right-radius: 4px;
  2099. }
  2100. input[type=number]::number-spin-down {
  2101. writing-mode: horizontal-tb;
  2102. appearance: spinner-downbutton;
  2103. display: block; /* bug 926670 */
  2104. flex: none;
  2105. cursor: default;
  2106. /* Style for when native theming is off: */
  2107. 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>');
  2108. background-repeat: no-repeat;
  2109. background-position: center top;
  2110. border: 1px solid darkgray;
  2111. border-top: none;
  2112. border-bottom-left-radius: 4px;
  2113. border-bottom-right-radius: 4px;
  2114. }
  2115. input[type="number"] > div > div > div:hover {
  2116. /* give some indication of hover state for the up/down buttons */
  2117. background-color: lightblue;
  2118. }
  2119. input[type="date"],
  2120. input[type="time"] {
  2121. overflow: hidden !important;
  2122. font-family: fixed;
  2123. }
  2124. :autofill, :autofill-preview {
  2125. filter: grayscale(21%) brightness(88%) contrast(161%) invert(10%) sepia(40%) saturate(206%);
  2126. }
  2127. :autofill-preview {
  2128. color: GrayText;
  2129. }
  2130. /* This Source Code Form is subject to the terms of the Mozilla Public
  2131. * License, v. 2.0. If a copy of the MPL was not distributed with this
  2132. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  2133. @namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */
  2134. /* Quirk: make orphaned LIs have inside bullet (b=1049) */
  2135. /* force inside position for orphaned lis */
  2136. li {
  2137. list-style-position: inside;
  2138. }
  2139. /* restore outside position for lists inside LIs */
  2140. li ul, li ol, li dir, li menu {
  2141. list-style-position: outside;
  2142. }
  2143. /* undo previous two rules for properly nested lists */
  2144. ul ul, ul ol, ul dir, ul menu, ul li,
  2145. ol ul, ol ol, ol dir, ol menu, ol li,
  2146. dir ul, dir ol, dir dir, dir menu, dir li,
  2147. menu ul, menu ol, menu dir, menu menu, menu li {
  2148. list-style-position: inherit;
  2149. }
  2150. /* Quirk: ensure that we get proper padding if the very first
  2151. * node in an LI is another UL or OL. This is an ugly way to
  2152. * fix the problem, because it extends the LI up into what
  2153. * would otherwise appear to be the ULs space. (b=38832) */
  2154. /* Note: this fix will fail once we implement marker box
  2155. * alignment correctly. */
  2156. li > ul:first-node,
  2157. li > ol:first-node {
  2158. padding-block-start: 1em;
  2159. }
  2160. table {
  2161. text-align: start;
  2162. white-space: normal; /* compatible with IE & spec */
  2163. line-height: normal;
  2164. /* Quirk: cut off all font inheritance in tables except for family. */
  2165. font-size: initial;
  2166. font-weight: initial;
  2167. font-style: initial;
  2168. font-variant: initial;
  2169. }
  2170. /*
  2171. * Make table borders gray for compatibility with what other browsers do
  2172. * in all modes, rather than using the foreground color.
  2173. */
  2174. table, td, th, tr, thead, tbody, tfoot, colgroup, col {
  2175. border-color: gray;
  2176. }
  2177. /* Quirk: collapse top margin of BODY and TD and bottom margin of TD */
  2178. /*
  2179. * While it may seem simpler to use :first-node and :last-node without
  2180. * tags, it's slower, since we have to do the :first-node or :last-node
  2181. * check on every single element in the document. If we list all the
  2182. * element names for which the UA stylesheet specifies a margin, the
  2183. * selectors will be hashed in the RuleHash and things will be much more
  2184. * efficient.
  2185. */
  2186. body > p:first-node, td > p:first-node, th > p:first-node,
  2187. body > dl:first-node, td > dl:first-node, th > dl:first-node,
  2188. body > multicol:first-node, td > multicol:first-node, th > multicol:first-node,
  2189. body > blockquote:first-node, td > blockquote:first-node, th > blockquote:first-node,
  2190. body > h1:first-node, td > h1:first-node, th > h1:first-node,
  2191. body > h2:first-node, td > h2:first-node, th > h2:first-node,
  2192. body > h3:first-node, td > h3:first-node, th > h3:first-node,
  2193. body > h4:first-node, td > h4:first-node, th > h4:first-node,
  2194. body > h5:first-node, td > h5:first-node, th > h5:first-node,
  2195. body > h6:first-node, td > h6:first-node, th > h6:first-node,
  2196. body > listing:first-node, td > listing:first-node, th > listing:first-node,
  2197. body > plaintext:first-node, td > plaintext:first-node, th > plaintext:first-node,
  2198. body > xmp:first-node, td > xmp:first-node, th > xmp:first-node,
  2199. body > pre:first-node, td > pre:first-node, th > pre:first-node,
  2200. body > ul:first-node, td > ul:first-node, th > ul:first-node,
  2201. body > menu:first-node, td > menu:first-node, th > menu:first-node,
  2202. body > dir:first-node, td > dir:first-node, th > dir:first-node,
  2203. body > ol:first-node, td > ol:first-node, th > ol:first-node {
  2204. margin-block-start: 0;
  2205. }
  2206. td > p:last-node, th > p:last-node {
  2207. margin-block-end: 0;
  2208. }
  2209. /* Similar as above, but for empty elements
  2210. * collapse the bottom or top margins of empty elements
  2211. * - see bug 97361
  2212. */
  2213. body > p:only-whitespace:first-node,
  2214. td > p:only-whitespace:first-node, th > p:only-whitespace:first-node,
  2215. body > dl:only-whitespace:first-node, td > dl:only-whitespace:first-node,
  2216. th > dl:only-whitespace:first-node, body > multicol:only-whitespace:first-node,
  2217. td > multicol:only-whitespace:first-node, th > multicol:only-whitespace:first-node,
  2218. body > blockquote:only-whitespace:first-node, td > blockquote:only-whitespace:first-node,
  2219. th > blockquote:only-whitespace:first-node, body > h1:only-whitespace:first-node,
  2220. td > h1:only-whitespace:first-node, th > h1:only-whitespace:first-node,
  2221. body > h2:only-whitespace:first-node, td > h2:only-whitespace:first-node,
  2222. th > h2:only-whitespace:first-node, body > h3:only-whitespace:first-node,
  2223. td > h3:only-whitespace:first-node, th > h3:only-whitespace:first-node,
  2224. body > h4:only-whitespace:first-node, td > h4:only-whitespace:first-node,
  2225. th > h4:only-whitespace:first-node, body > h5:only-whitespace:first-node,
  2226. td > h5:only-whitespace:first-node, th > h5:only-whitespace:first-node,
  2227. body > h6:only-whitespace:first-node, td > h6:only-whitespace:first-node,
  2228. th > h6:only-whitespace:first-node, body > listing:only-whitespace:first-node,
  2229. td > listing:only-whitespace:first-node, th > listing:only-whitespace:first-node,
  2230. body > plaintext:only-whitespace:first-node, td > plaintext:only-whitespace:first-node,
  2231. th > plaintext:only-whitespace:first-node, body > xmp:only-whitespace:first-node,
  2232. td > xmp:only-whitespace:first-node, th > xmp:only-whitespace:first-node,
  2233. body > pre:only-whitespace:first-node, td > pre:only-whitespace:first-node,
  2234. th > pre:only-whitespace:first-node, body > ul:only-whitespace:first-node,
  2235. td > ul:only-whitespace:first-node, th > ul:only-whitespace:first-node,
  2236. body > menu:only-whitespace:first-node, td > menu:only-whitespace:first-node,
  2237. th > menu:only-whitespace:first-node, body > dir:only-whitespace:first-node,
  2238. td > dir:only-whitespace:first-node, th > dir:only-whitespace:first-node,
  2239. body > ol:only-whitespace:first-node, td > ol:only-whitespace:first-node,
  2240. th > ol:only-whitespace:first-node {
  2241. margin-block-end: 0;
  2242. }
  2243. td > p:only-whitespace:last-node, th > p:only-whitespace:last-node,
  2244. td > dl:only-whitespace:last-node, th > dl:only-whitespace:last-node,
  2245. td > multicol:only-whitespace:last-node, th > multicol:only-whitespace:last-node,
  2246. td > blockquote:only-whitespace:last-node, th > blockquote:only-whitespace:last-node,
  2247. td > h1:only-whitespace:last-node, th > h1:only-whitespace:last-node,
  2248. td > h2:only-whitespace:last-node, th > h2:only-whitespace:last-node,
  2249. td > h3:only-whitespace:last-node, th > h3:only-whitespace:last-node,
  2250. td > h4:only-whitespace:last-node, th > h4:only-whitespace:last-node,
  2251. td > h5:only-whitespace:last-node, th > h5:only-whitespace:last-node,
  2252. td > h6:only-whitespace:last-node, th > h6:only-whitespace:last-node,
  2253. td > listing:only-whitespace:last-node, th > listing:only-whitespace:last-node,
  2254. td > plaintext:only-whitespace:last-node, th > plaintext:only-whitespace:last-node,
  2255. td > xmp:only-whitespace:last-node, th > xmp:only-whitespace:last-node,
  2256. td > pre:only-whitespace:last-node, th > pre:only-whitespace:last-node,
  2257. td > ul:only-whitespace:last-node, th > ul:only-whitespace:last-node,
  2258. td > menu:only-whitespace:last-node, th > menu:only-whitespace:last-node,
  2259. td > dir:only-whitespace:last-node, th > dir:only-whitespace:last-node,
  2260. td > ol:only-whitespace:last-node, th > ol:only-whitespace:last-node {
  2261. margin-block-start: 0;
  2262. }
  2263. /* Quirk: DD not in DL has text-indent instead of margin (b=5119) */
  2264. :not(dl) > dd {
  2265. display: inline;
  2266. margin: 0;
  2267. }
  2268. :not(dl) > dd:before {
  2269. display: inline;
  2270. white-space: pre;
  2271. font-size: 1px;
  2272. line-height: 0;
  2273. content: "\A ";
  2274. margin-inline-end: 40px;
  2275. }
  2276. /* quirk to indent nested DL elements (b=8749) */
  2277. dl > dl {
  2278. display: block;
  2279. margin-inline-start: 40px;
  2280. }
  2281. /* Quirk: Make floated images have a margin (b=58899) */
  2282. img[align=left]:dir(ltr), img[align=right]:dir(rtl) {
  2283. margin-inline-end: 3px;
  2284. }
  2285. img[align=right]:dir(ltr), img[align=left]:dir(rtl) {
  2286. margin-inline-start: 3px;
  2287. }
  2288. /*
  2289. * Quirk: Use border-box box sizing for text inputs, password inputs, and
  2290. * textareas. (b=184478 on why we use content-box sizing in standards mode)
  2291. */
  2292. /* Note that all other <input>s already use border-box
  2293. sizing, so we're ok with this selector */
  2294. input:not([type=image]), textarea {
  2295. box-sizing: border-box;
  2296. }
  2297. /* Quirk: give form margin for compat (b=41806) */
  2298. form {
  2299. margin-block-end: 1em;
  2300. }