Default.css 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841
  1. /* Default user-agent stylesheet for LibWeb
  2. * Note: This stylesheet starts with a bunch of ad-hoc custom rules.
  3. * After that, rules from the HTML spec follow.
  4. */
  5. html {
  6. font-family: serif;
  7. color: CanvasText;
  8. }
  9. body {
  10. margin: 8px;
  11. }
  12. center {
  13. text-align: -libweb-center;
  14. }
  15. blink {
  16. display: inline;
  17. }
  18. /* FIXME: This doesn't seem right. */
  19. label {
  20. display: inline-block;
  21. }
  22. /* FIXME: This is a temporary hack until we can render a native-looking frame for these. */
  23. input:not([type=submit], input[type=button], input[type=reset], input[type=color], input[type=checkbox], input[type=radio], input[type=range]), textarea {
  24. border: 1px solid ButtonBorder;
  25. min-height: 16px;
  26. width: attr(size ch, 20ch);
  27. cursor: text;
  28. overflow: hidden;
  29. }
  30. textarea {
  31. padding: 2px;
  32. display: inline-block;
  33. overflow: auto;
  34. font-family: monospace;
  35. width: attr(cols ch, 20ch);
  36. height: attr(rows lh, 2lh);
  37. }
  38. input::placeholder, textarea::placeholder {
  39. color: GrayText;
  40. }
  41. button, input[type=submit], input[type=button], input[type=reset], select {
  42. padding: 1px 4px;
  43. background-color: ButtonFace;
  44. border: 1px solid ButtonBorder;
  45. color: ButtonText;
  46. }
  47. button:hover, input[type=submit]:hover, input[type=button]:hover, input[type=reset]:hover, select:hover {
  48. /* FIXME: There isn't a <system-color> keyword for this, so this is a slightly lightened
  49. * version of our light ButtonFace color. Once we support `color-scheme: dark`
  50. * we'll need to use a different color for that.
  51. */
  52. background-color: #e5e0d7;
  53. }
  54. option {
  55. display: none;
  56. }
  57. /* Custom <input type="range"> styles */
  58. input[type=range] {
  59. display: inline-block;
  60. width: 20ch;
  61. height: 16px;
  62. }
  63. input[type=range]::-webkit-slider-runnable-track, input[type=range]::-webkit-slider-thumb {
  64. display: block;
  65. }
  66. input[type=range]::-webkit-slider-runnable-track {
  67. height: 4px;
  68. margin-top: 6px;
  69. background-color: hsl(217, 71%, 53%);
  70. border: 1px solid rgba(0, 0, 0, 0.5);
  71. }
  72. input[type=range]::-webkit-slider-thumb {
  73. margin-top: -6px;
  74. width: 16px;
  75. height: 16px;
  76. transform: translateX(-50%);
  77. border-radius: 50%;
  78. background-color: hsl(0, 0%, 96%);
  79. outline: 1px solid rgba(0, 0, 0, 0.5);
  80. }
  81. /* Custom <meter> styles */
  82. meter {
  83. display: inline-block;
  84. width: 300px;
  85. height: 12px;
  86. }
  87. meter::-webkit-meter-bar, meter::-webkit-meter-optimum-value, meter::-webkit-meter-suboptimum-value, meter::-webkit-meter-even-less-good-value {
  88. display: block;
  89. height: 100%;
  90. }
  91. meter::-webkit-meter-bar {
  92. background-color: hsl(0, 0%, 96%);
  93. border: 1px solid rgba(0, 0, 0, 0.5);
  94. }
  95. meter::-webkit-meter-optimum-value {
  96. background-color: hsl(141, 53%, 53%);
  97. }
  98. meter::-webkit-meter-suboptimum-value {
  99. background-color: hsl(48, 100%, 67%);
  100. }
  101. meter::-webkit-meter-even-less-good-value {
  102. background-color: hsl(348, 100%, 61%);
  103. }
  104. /* Custom <progress> styles */
  105. progress {
  106. display: inline-block;
  107. width: 300px;
  108. height: 12px;
  109. }
  110. progress::-webkit-progress-bar, progress::-webkit-progress-value {
  111. display: block;
  112. height: 100%;
  113. }
  114. progress::-webkit-progress-bar {
  115. background-color: hsl(0, 0%, 96%);
  116. border: 1px solid rgba(0, 0, 0, 0.5);
  117. }
  118. progress::-webkit-progress-value {
  119. background-color: hsl(204, 86%, 53%);
  120. }
  121. /* 15.3.1 Hidden elements
  122. * https://html.spec.whatwg.org/multipage/rendering.html#hidden-elements
  123. */
  124. area, base, basefont, datalist, head, link, meta, noembed,
  125. noframes, param, rp, script, style, template, title {
  126. display: none;
  127. }
  128. [hidden]:not([hidden=until-found i]) {
  129. display: none;
  130. }
  131. [hidden=until-found i]:not(embed) {
  132. content-visibility: hidden;
  133. }
  134. embed[hidden] {
  135. display: inline;
  136. height: 0;
  137. width: 0;
  138. }
  139. input[type=hidden i] {
  140. display: none !important;
  141. }
  142. @media (scripting) {
  143. noscript {
  144. display: none !important;
  145. }
  146. }
  147. /* 15.3.2 The page
  148. * https://html.spec.whatwg.org/multipage/rendering.html#the-page
  149. */
  150. html, body {
  151. display: block;
  152. }
  153. /* 15.3.3 Flow content
  154. * https://html.spec.whatwg.org/multipage/rendering.html#flow-content-3
  155. */
  156. address, blockquote, center, dialog, div, figure, figcaption, footer, form,
  157. header, hr, legend, listing, main, p, plaintext, pre, search, xmp {
  158. display: block;
  159. }
  160. blockquote, figure, listing, p, plaintext, pre, xmp {
  161. margin-top: 1em;
  162. margin-bottom: 1em;
  163. }
  164. blockquote, figure {
  165. margin-left: 40px;
  166. margin-right: 40px;
  167. }
  168. address {
  169. font-style: italic;
  170. }
  171. listing, plaintext, pre, xmp {
  172. font-family: monospace;
  173. white-space: pre;
  174. }
  175. dialog:not([open]) {
  176. display: none;
  177. }
  178. dialog {
  179. position: absolute;
  180. inset-inline-start: 0;
  181. inset-inline-end: 0;
  182. width: fit-content;
  183. height: fit-content;
  184. margin: auto;
  185. border: solid;
  186. padding: 1em;
  187. background-color: Canvas;
  188. color: CanvasText;
  189. }
  190. dialog:modal {
  191. position: fixed;
  192. overflow: auto;
  193. inset-block: 0;
  194. max-width: calc(100% - 6px - 2em);
  195. max-height: calc(100% - 6px - 2em);
  196. }
  197. dialog::backdrop {
  198. background: rgba(0, 0, 0, 0.1);
  199. }
  200. [popover]:not(:popover-open):not(dialog[open]) {
  201. display:none;
  202. }
  203. dialog:popover-open {
  204. display:block;
  205. }
  206. [popover] {
  207. position: fixed;
  208. inset: 0;
  209. width: fit-content;
  210. height: fit-content;
  211. margin: auto;
  212. border: solid;
  213. padding: 0.25em;
  214. overflow: auto;
  215. color: CanvasText;
  216. background-color: Canvas;
  217. }
  218. :popover-open::backdrop {
  219. position: fixed;
  220. inset: 0;
  221. pointer-events: none !important;
  222. background-color: transparent;
  223. }
  224. slot {
  225. display: contents;
  226. }
  227. /* 15.3.4 Phrasing content
  228. * https://html.spec.whatwg.org/multipage/rendering.html#phrasing-content-3
  229. */
  230. cite, dfn, em, i, var {
  231. font-style: italic;
  232. }
  233. b, strong {
  234. font-weight: bolder;
  235. }
  236. code, kbd, samp, tt {
  237. font-family: monospace;
  238. }
  239. big {
  240. font-size: larger;
  241. }
  242. small {
  243. font-size: smaller;
  244. }
  245. sub {
  246. vertical-align: sub;
  247. }
  248. sup {
  249. vertical-align: super;
  250. }
  251. sub, sup {
  252. line-height: normal;
  253. font-size: smaller;
  254. }
  255. ruby {
  256. display: ruby;
  257. }
  258. rt {
  259. display: ruby-text;
  260. }
  261. :link {
  262. color: LinkText;
  263. }
  264. :visited {
  265. color: VisitedText;
  266. }
  267. :link:active, :visited:active {
  268. color: ActiveText;
  269. }
  270. :link, :visited {
  271. text-decoration: underline;
  272. cursor: pointer;
  273. }
  274. :focus-visible {
  275. outline: auto;
  276. }
  277. mark {
  278. background: Mark;
  279. color: MarkText;
  280. }
  281. abbr[title], acronym[title] {
  282. text-decoration: dotted underline;
  283. }
  284. ins, u {
  285. text-decoration: underline;
  286. }
  287. del, s, strike {
  288. text-decoration: line-through;
  289. }
  290. q::before {
  291. content: open-quote;
  292. }
  293. q::after {
  294. content: close-quote;
  295. }
  296. /*
  297. NOTE: This isn't a real property and value. See https://github.com/whatwg/html/issues/2291
  298. br {
  299. display-outside: newline;
  300. }
  301. */
  302. /* this also has bidi implications */
  303. nobr {
  304. white-space: nowrap;
  305. }
  306. /*
  307. NOTE: This isn't a real property and value. See https://github.com/whatwg/html/issues/2291
  308. wbr {
  309. display-outside: break-opportunity;
  310. }
  311. */
  312. /* this also has bidi implications */
  313. nobr wbr {
  314. white-space: normal;
  315. }
  316. /* 15.3.5 Bidirectional text
  317. * https://html.spec.whatwg.org/multipage/rendering.html#bidi-rendering
  318. */
  319. [dir]:dir(ltr), bdi:dir(ltr), input[type=tel i]:dir(ltr) {
  320. direction: ltr;
  321. }
  322. [dir]:dir(rtl), bdi:dir(rtl) {
  323. direction: rtl;
  324. }
  325. address, blockquote, center, div, figure, figcaption, footer, form, header, hr,
  326. legend, listing, main, p, plaintext, pre, summary, xmp, article, aside, h1, h2,
  327. h3, h4, h5, h6, hgroup, nav, section, table, caption, colgroup, col, thead,
  328. tbody, tfoot, tr, td, th, dir, dd, dl, dt, menu, ol, ul, li, bdi, output,
  329. [dir=ltr i], [dir=rtl i], [dir=auto i] {
  330. unicode-bidi: isolate;
  331. }
  332. bdo, bdo[dir] {
  333. unicode-bidi: isolate-override;
  334. }
  335. input[dir=auto i]:is([type=search i], [type=tel i], [type=url i],
  336. [type=email i]), textarea[dir=auto i], pre[dir=auto i] {
  337. unicode-bidi: plaintext;
  338. }
  339. /* 15.3.6 Sections and headings
  340. * https://html.spec.whatwg.org/multipage/rendering.html#sections-and-headings
  341. */
  342. article, aside, h1, h2, h3, h4, h5, h6, hgroup, nav, section {
  343. display: block;
  344. }
  345. h1 {
  346. margin-top: 0.67em;
  347. margin-bottom: 0.67em;
  348. font-size: 2.00em;
  349. font-weight: bold;
  350. }
  351. h2 {
  352. margin-top: 0.83em;
  353. margin-bottom: 0.83em;
  354. font-size: 1.50em;
  355. font-weight: bold;
  356. }
  357. h3 {
  358. margin-top: 1.00em;
  359. margin-bottom: 1.00em;
  360. font-size: 1.17em;
  361. font-weight: bold;
  362. }
  363. h4 {
  364. margin-top: 1.33em;
  365. margin-bottom: 1.33em;
  366. font-size: 1.00em;
  367. font-weight: bold;
  368. }
  369. h5 {
  370. margin-top: 1.67em;
  371. margin-bottom: 1.67em;
  372. font-size: 0.83em;
  373. font-weight: bold;
  374. }
  375. h6 {
  376. margin-top: 2.33em;
  377. margin-bottom: 2.33em;
  378. font-size: 0.67em;
  379. font-weight: bold;
  380. }
  381. :is(article, aside, nav, section) h1 {
  382. margin-top: 0.83em;
  383. margin-bottom: 0.83em;
  384. font-size: 1.50em;
  385. }
  386. :is(article, aside, nav, section) :is(article, aside, nav, section) h1 {
  387. margin-top: 1.00em;
  388. margin-bottom: 1.00em;
  389. font-size: 1.17em;
  390. }
  391. :is(article, aside, nav, section) :is(article, aside, nav, section) :is(article, aside, nav, section) h1 {
  392. margin-top: 1.33em;
  393. margin-bottom: 1.33em;
  394. font-size: 1.00em;
  395. }
  396. :is(article, aside, nav, section) :is(article, aside, nav, section) :is(article, aside, nav, section) :is(article, aside, nav, section) h1 {
  397. margin-top: 1.67em;
  398. margin-bottom: 1.67em;
  399. font-size: 0.83em;
  400. }
  401. :is(article, aside, nav, section) :is(article, aside, nav, section) :is(article, aside, nav, section) :is(article, aside, nav, section) :is(article, aside, nav, section) h1 {
  402. margin-top: 2.33em;
  403. margin-bottom: 2.33em;
  404. font-size: 0.67em;
  405. }
  406. /* 15.3.7 Lists
  407. * https://html.spec.whatwg.org/multipage/rendering.html#lists
  408. */
  409. dir, dd, dl, dt, menu, ol, ul {
  410. display: block;
  411. }
  412. li {
  413. display: list-item;
  414. text-align: match-parent;
  415. }
  416. dir, dl, menu, ol, ul {
  417. margin-block-start: 1em;
  418. margin-block-end: 1em;
  419. }
  420. :is(dir, dl, menu, ol, ul) :is(dir, dl, menu, ol, ul) {
  421. margin-block-start: 0;
  422. margin-block-end: 0;
  423. }
  424. dd {
  425. margin-inline-start: 40px;
  426. }
  427. dir, menu, ol, ul {
  428. padding-inline-start: 40px;
  429. }
  430. ol, ul, menu {
  431. counter-reset: list-item;
  432. }
  433. ol {
  434. list-style-type: decimal;
  435. }
  436. dir, menu, ul {
  437. list-style-type: disc;
  438. }
  439. :is(dir, menu, ol, ul) :is(dir, menu, ul) {
  440. list-style-type: circle;
  441. }
  442. :is(dir, menu, ol, ul) :is(dir, menu, ol, ul) :is(dir, menu, ul) {
  443. list-style-type: square;
  444. }
  445. /* 15.3.8 Tables
  446. * https://html.spec.whatwg.org/multipage/rendering.html#tables-2
  447. */
  448. table {
  449. display: table;
  450. }
  451. caption {
  452. display: table-caption;
  453. }
  454. colgroup, colgroup[hidden] {
  455. display: table-column-group;
  456. }
  457. col, col[hidden] {
  458. display: table-column;
  459. }
  460. thead, thead[hidden] {
  461. display: table-header-group;
  462. }
  463. tbody, tbody[hidden] {
  464. display: table-row-group;
  465. }
  466. tfoot, tfoot[hidden] {
  467. display: table-footer-group;
  468. }
  469. tr, tr[hidden] {
  470. display: table-row;
  471. }
  472. td, th {
  473. display: table-cell;
  474. }
  475. colgroup[hidden], col[hidden], thead[hidden], tbody[hidden],
  476. tfoot[hidden], tr[hidden] {
  477. visibility: collapse;
  478. }
  479. table {
  480. box-sizing: border-box;
  481. border-spacing: 2px;
  482. border-collapse: separate;
  483. text-indent: initial;
  484. }
  485. td, th {
  486. padding: 1px;
  487. }
  488. th {
  489. font-weight: bold;
  490. /*
  491. The text-align property for table headings is non-standard, but all
  492. existing user-agents seem to render them centered by default.
  493. See:
  494. - https://trac.webkit.org/browser/trunk/Source/WebCore/css/html.css?rev=295625#L272
  495. - https://searchfox.org/mozilla-central/rev/0b55b868c17835942d40ca3fedfca8057481207b/layout/style/res/html.css#473
  496. */
  497. text-align: center;
  498. }
  499. caption {
  500. text-align: center;
  501. }
  502. thead, tbody, tfoot, table > tr {
  503. vertical-align: middle;
  504. }
  505. tr, td, th {
  506. vertical-align: inherit;
  507. }
  508. thead, tbody, tfoot, tr {
  509. border-color: inherit;
  510. }
  511. table[rules=none i], table[rules=groups i], table[rules=rows i],
  512. table[rules=cols i], table[rules=all i], table[frame=void i],
  513. table[frame=above i], table[frame=below i], table[frame=hsides i],
  514. table[frame=lhs i], table[frame=rhs i], table[frame=vsides i],
  515. table[frame=box i], table[frame=border i],
  516. table[rules=none i] > tr > td, table[rules=none i] > tr > th,
  517. table[rules=groups i] > tr > td, table[rules=groups i] > tr > th,
  518. table[rules=rows i] > tr > td, table[rules=rows i] > tr > th,
  519. table[rules=cols i] > tr > td, table[rules=cols i] > tr > th,
  520. table[rules=all i] > tr > td, table[rules=all i] > tr > th,
  521. table[rules=none i] > thead > tr > td, table[rules=none i] > thead > tr > th,
  522. table[rules=groups i] > thead > tr > td, table[rules=groups i] > thead > tr > th,
  523. table[rules=rows i] > thead > tr > td, table[rules=rows i] > thead > tr > th,
  524. table[rules=cols i] > thead > tr > td, table[rules=cols i] > thead > tr > th,
  525. table[rules=all i] > thead > tr > td, table[rules=all i] > thead > tr > th,
  526. table[rules=none i] > tbody > tr > td, table[rules=none i] > tbody > tr > th,
  527. table[rules=groups i] > tbody > tr > td, table[rules=groups i] > tbody > tr > th,
  528. table[rules=rows i] > tbody > tr > td, table[rules=rows i] > tbody > tr > th,
  529. table[rules=cols i] > tbody > tr > td, table[rules=cols i] > tbody > tr > th,
  530. table[rules=all i] > tbody > tr > td, table[rules=all i] > tbody > tr > th,
  531. table[rules=none i] > tfoot > tr > td, table[rules=none i] > tfoot > tr > th,
  532. table[rules=groups i] > tfoot > tr > td, table[rules=groups i] > tfoot > tr > th,
  533. table[rules=rows i] > tfoot > tr > td, table[rules=rows i] > tfoot > tr > th,
  534. table[rules=cols i] > tfoot > tr > td, table[rules=cols i] > tfoot > tr > th,
  535. table[rules=all i] > tfoot > tr > td, table[rules=all i] > tfoot > tr > th {
  536. border-color: black;
  537. }
  538. /* 15.3.10 Form controls
  539. * https://html.spec.whatwg.org/multipage/rendering.html#form-controls
  540. */
  541. input, select, button, textarea {
  542. letter-spacing: initial;
  543. word-spacing: initial;
  544. line-height: initial;
  545. text-transform: initial;
  546. text-indent: initial;
  547. text-shadow: initial;
  548. appearance: auto;
  549. }
  550. input, select, textarea {
  551. text-align: initial;
  552. }
  553. input:is([type=reset i], [type=button i], [type=submit i]), button {
  554. text-align: center;
  555. }
  556. input, button {
  557. display: inline-block;
  558. }
  559. input[type=hidden i], input[type=file i], input[type=image i] {
  560. appearance: none;
  561. }
  562. input:is([type=radio i], [type=checkbox i], [type=reset i], [type=button i],
  563. [type=submit i], [type=color i], [type=search i]), select, button {
  564. box-sizing: border-box;
  565. }
  566. textarea {
  567. white-space: pre-wrap;
  568. }
  569. /* 15.3.11 The hr element
  570. * https://html.spec.whatwg.org/multipage/rendering.html#the-hr-element-2
  571. */
  572. hr {
  573. color: gray;
  574. border-style: inset;
  575. border-width: 1px;
  576. margin-block-start: 0.5em;
  577. margin-inline-end: auto;
  578. margin-block-end: 0.5em;
  579. margin-inline-start: auto;
  580. overflow: hidden;
  581. }
  582. /* 15.3.12 The fieldset and legend elements
  583. * https://html.spec.whatwg.org/multipage/rendering.html#the-fieldset-and-legend-elements
  584. */
  585. fieldset {
  586. display: block;
  587. margin-inline-start: 2px;
  588. margin-inline-end: 2px;
  589. border: groove 2px ThreeDFace;
  590. padding-block-start: 0.35em;
  591. padding-inline-end: 0.75em;
  592. padding-block-end: 0.625em;
  593. padding-inline-start: 0.75em;
  594. min-inline-size: min-content;
  595. }
  596. legend {
  597. padding-left: 2px;
  598. padding-right: 2px;
  599. }
  600. legend[align=left i] {
  601. justify-self: left;
  602. }
  603. legend[align=center i] {
  604. justify-self: center;
  605. }
  606. legend[align=right i] {
  607. justify-self: right;
  608. }
  609. /* 15.4.1 Embedded content
  610. * https://html.spec.whatwg.org/multipage/rendering.html#embedded-content-rendering-rules
  611. */
  612. iframe {
  613. border: 2px inset;
  614. }
  615. video {
  616. object-fit: contain;
  617. }
  618. /* 15.4.3 Attributes for embedded content and images
  619. * https://html.spec.whatwg.org/multipage/rendering.html#attributes-for-embedded-content-and-images
  620. */
  621. iframe[frameborder='0'], iframe[frameborder=no i] { border: none; }
  622. embed[align=left i], iframe[align=left i], img[align=left i],
  623. input[type=image i][align=left i], object[align=left i] {
  624. float: left;
  625. }
  626. embed[align=right i], iframe[align=right i], img[align=right i],
  627. input[type=image i][align=right i], object[align=right i] {
  628. float: right;
  629. }
  630. embed[align=top i], iframe[align=top i], img[align=top i],
  631. input[type=image i][align=top i], object[align=top i] {
  632. vertical-align: top;
  633. }
  634. embed[align=baseline i], iframe[align=baseline i], img[align=baseline i],
  635. input[type=image i][align=baseline i], object[align=baseline i] {
  636. vertical-align: baseline;
  637. }
  638. embed[align=texttop i], iframe[align=texttop i], img[align=texttop i],
  639. input[type=image i][align=texttop i], object[align=texttop i] {
  640. vertical-align: text-top;
  641. }
  642. embed[align=absmiddle i], iframe[align=absmiddle i], img[align=absmiddle i],
  643. input[type=image i][align=absmiddle i], object[align=absmiddle i],
  644. embed[align=abscenter i], iframe[align=abscenter i], img[align=abscenter i],
  645. input[type=image i][align=abscenter i], object[align=abscenter i] {
  646. vertical-align: middle;
  647. }
  648. embed[align=bottom i], iframe[align=bottom i], img[align=bottom i],
  649. input[type=image i][align=bottom i], object[align=bottom i] {
  650. vertical-align: bottom;
  651. }
  652. /* 15.5.4 The details and summary elements
  653. * https://html.spec.whatwg.org/multipage/rendering.html#the-details-and-summary-elements
  654. */
  655. details > summary:first-of-type {
  656. display: list-item;
  657. counter-increment: list-item 0;
  658. list-style: disclosure-closed inside;
  659. }
  660. details[open] > summary:first-of-type {
  661. list-style-type: disclosure-open;
  662. }
  663. /* 15.5.12 The marquee element
  664. * https://html.spec.whatwg.org/multipage/rendering.html#the-marquee-element-2
  665. */
  666. marquee {
  667. display: inline-block;
  668. text-align: initial;
  669. }
  670. /* 15.5.13 The meter element
  671. * https://html.spec.whatwg.org/multipage/rendering.html#the-meter-element-2
  672. */
  673. meter {
  674. appearance: auto;
  675. }
  676. /* 15.5.14 The progress element
  677. * https://html.spec.whatwg.org/multipage/rendering.html#the-progress-element-2
  678. */
  679. progress {
  680. appearance: auto;
  681. }
  682. /* https://www.w3.org/TR/mediaqueries-5/#descdef-media-inverted-colors
  683. */
  684. @media (inverted-colors) {
  685. img:not(picture>img),
  686. picture,
  687. video {
  688. filter: invert(100%);
  689. }
  690. }