Default.css 18 KB

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