Default.css 18 KB

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