Default.css 18 KB

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