Default.css 18 KB

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