Default.css 18 KB

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