Default.css 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690
  1. html {
  2. font-family: sans-serif;
  3. color: -libweb-palette-base-text;
  4. }
  5. body {
  6. margin: 8px;
  7. }
  8. center {
  9. text-align: -libweb-center;
  10. }
  11. hr {
  12. margin-top: 0.5em;
  13. margin-bottom: 0.5em;
  14. border: 1px inset #888888;
  15. }
  16. blink {
  17. display: inline;
  18. }
  19. /* FIXME: This is a temporary hack until we can render a native-looking frame for these. */
  20. input, textarea {
  21. border: 1px solid -libweb-palette-threed-shadow1;
  22. min-width: 80px;
  23. min-height: 16px;
  24. width: 120px;
  25. cursor: text;
  26. overflow: hidden;
  27. }
  28. textarea {
  29. padding: 2px;
  30. display: inline-block;
  31. overflow: scroll;
  32. }
  33. input[type=submit], input[type=button], input[type=reset], input[type=checkbox], input[type=radio] {
  34. border: none;
  35. min-width: unset;
  36. min-height: unset;
  37. width: unset;
  38. cursor: unset;
  39. }
  40. button, input[type=submit], input[type=button], input[type=reset] {
  41. padding: 1px 4px;
  42. background-color: -libweb-palette-button;
  43. border: 1px solid -libweb-palette-threed-shadow1;
  44. color: -libweb-palette-button-text;
  45. }
  46. button:hover, input[type=submit]:hover, input[type=button]:hover, input[type=reset]:hover {
  47. background-color: -libweb-palette-hover-highlight;
  48. }
  49. option {
  50. display: none;
  51. }
  52. /* 15.3.1 Hidden elements
  53. * https://html.spec.whatwg.org/multipage/rendering.html#hidden-elements
  54. */
  55. area, base, basefont, datalist, head, link, meta, noembed,
  56. noframes, param, rp, script, style, template, title {
  57. display: none;
  58. }
  59. [hidden]:not([hidden=until-found i]) {
  60. display: none;
  61. }
  62. [hidden=until-found i]:not(embed) {
  63. content-visibility: hidden;
  64. }
  65. embed[hidden] {
  66. display: inline;
  67. height: 0;
  68. width: 0;
  69. }
  70. input[type=hidden i] {
  71. display: none !important;
  72. }
  73. @media (scripting) {
  74. noscript {
  75. display: none !important;
  76. }
  77. }
  78. /* 15.3.2 The page
  79. * https://html.spec.whatwg.org/multipage/rendering.html#the-page
  80. */
  81. html, body {
  82. display: block;
  83. }
  84. /* 15.3.3 Flow content
  85. * https://html.spec.whatwg.org/multipage/rendering.html#flow-content-3
  86. */
  87. address, blockquote, center, dialog, div, figure, figcaption, footer, form,
  88. header, hr, legend, listing, main, p, plaintext, pre, xmp {
  89. display: block;
  90. }
  91. blockquote, figure, listing, p, plaintext, pre, xmp {
  92. margin-top: 1em;
  93. margin-bottom: 1em;
  94. }
  95. blockquote, figure {
  96. margin-left: 40px;
  97. margin-right: 40px;
  98. }
  99. address {
  100. font-style: italic;
  101. }
  102. listing, plaintext, pre, xmp {
  103. font-family: monospace;
  104. white-space: pre;
  105. }
  106. dialog:not([open]) {
  107. display: none;
  108. }
  109. dialog {
  110. position: absolute;
  111. inset-left: 0;
  112. inset-right: 0;
  113. width: fit-content;
  114. height: fit-content;
  115. margin: auto;
  116. border: solid;
  117. padding: 1em;
  118. background-color: Canvas;
  119. color: CanvasText;
  120. }
  121. dialog::backdrop {
  122. background: rgba(0, 0, 0, 0.1);
  123. }
  124. slot {
  125. display: contents;
  126. }
  127. /* 15.3.4 Phrasing content
  128. * https://html.spec.whatwg.org/multipage/rendering.html#phrasing-content-3
  129. */
  130. cite, dfn, em, i, var {
  131. font-style: italic;
  132. }
  133. b, strong {
  134. font-weight: bolder;
  135. }
  136. code, kbd, samp, tt {
  137. font-family: monospace;
  138. }
  139. big {
  140. font-size: larger;
  141. }
  142. small {
  143. font-size: smaller;
  144. }
  145. sub {
  146. vertical-align: sub;
  147. }
  148. sup {
  149. vertical-align: super;
  150. }
  151. sub, sup {
  152. line-height: normal;
  153. font-size: smaller;
  154. }
  155. ruby {
  156. display: ruby;
  157. }
  158. rt {
  159. display: ruby-text;
  160. }
  161. :link {
  162. color: -libweb-link;
  163. }
  164. :visited {
  165. color: -libweb-palette-visited-link;
  166. }
  167. :link:active, :visited:active {
  168. color: -libweb-palette-active-link;
  169. }
  170. :link, :visited {
  171. text-decoration: underline;
  172. cursor: pointer;
  173. }
  174. :focus-visible {
  175. outline: auto;
  176. }
  177. mark {
  178. background: yellow;
  179. color: black;
  180. }
  181. /* this color is just a suggestion and can be changed based on implementation feedback */
  182. abbr[title], acronym[title] {
  183. text-decoration: dotted underline;
  184. }
  185. ins, u {
  186. text-decoration: underline;
  187. }
  188. del, s, strike {
  189. text-decoration: line-through;
  190. }
  191. q::before {
  192. content: open-quote;
  193. }
  194. q::after {
  195. content: close-quote;
  196. }
  197. br {
  198. display-outside: newline;
  199. }
  200. /* this also has bidi implications */
  201. nobr {
  202. white-space: nowrap;
  203. }
  204. wbr {
  205. display-outside: break-opportunity;
  206. }
  207. /* this also has bidi implications */
  208. nobr wbr {
  209. white-space: normal;
  210. }
  211. /* 15.3.5 Bidirectional text
  212. * https://html.spec.whatwg.org/multipage/rendering.html#bidi-rendering
  213. */
  214. [dir]:dir(ltr), bdi:dir(ltr), input[type=tel i]:dir(ltr) {
  215. direction: ltr;
  216. }
  217. [dir]:dir(rtl), bdi:dir(rtl) {
  218. direction: rtl;
  219. }
  220. address, blockquote, center, div, figure, figcaption, footer, form, header, hr,
  221. legend, listing, main, p, plaintext, pre, summary, xmp, article, aside, h1, h2,
  222. h3, h4, h5, h6, hgroup, nav, section, table, caption, colgroup, col, thead,
  223. tbody, tfoot, tr, td, th, dir, dd, dl, dt, menu, ol, ul, li, bdi, output,
  224. [dir=ltr i], [dir=rtl i], [dir=auto i] {
  225. unicode-bidi: isolate;
  226. }
  227. bdo, bdo[dir] {
  228. unicode-bidi: isolate-override;
  229. }
  230. input[dir=auto i]:is([type=search i], [type=tel i], [type=url i],
  231. [type=email i]), textarea[dir=auto i], pre[dir=auto i] {
  232. unicode-bidi: plaintext;
  233. }
  234. /* 15.3.6 Sections and headings
  235. * https://html.spec.whatwg.org/multipage/rendering.html#sections-and-headings
  236. */
  237. article, aside, h1, h2, h3, h4, h5, h6, hgroup, nav, section {
  238. display: block;
  239. }
  240. h1 {
  241. margin-top: 0.67em;
  242. margin-bottom: 0.67em;
  243. font-size: 2.00em;
  244. font-weight: bold;
  245. }
  246. h2 {
  247. margin-top: 0.83em;
  248. margin-bottom: 0.83em;
  249. font-size: 1.50em;
  250. font-weight: bold;
  251. }
  252. h3 {
  253. margin-top: 1.00em;
  254. margin-bottom: 1.00em;
  255. font-size: 1.17em;
  256. font-weight: bold;
  257. }
  258. h4 {
  259. margin-top: 1.33em;
  260. margin-bottom: 1.33em;
  261. font-size: 1.00em;
  262. font-weight: bold;
  263. }
  264. h5 {
  265. margin-top: 1.67em;
  266. margin-bottom: 1.67em;
  267. font-size: 0.83em;
  268. font-weight: bold;
  269. }
  270. h6 {
  271. margin-top: 2.33em;
  272. margin-bottom: 2.33em;
  273. font-size: 0.67em;
  274. font-weight: bold;
  275. }
  276. :is(article, aside, nav, section) h1 {
  277. margin-top: 0.83em;
  278. margin-bottom: 0.83em;
  279. font-size: 1.50em;
  280. }
  281. :is(article, aside, nav, section) :is(article, aside, nav, section) h1 {
  282. margin-top: 1.00em;
  283. margin-bottom: 1.00em;
  284. font-size: 1.17em;
  285. }
  286. :is(article, aside, nav, section) :is(article, aside, nav, section) :is(article, aside, nav, section) h1 {
  287. margin-top: 1.33em;
  288. margin-bottom: 1.33em;
  289. font-size: 1.00em;
  290. }
  291. :is(article, aside, nav, section) :is(article, aside, nav, section) :is(article, aside, nav, section) :is(article, aside, nav, section) h1 {
  292. margin-top: 1.67em;
  293. margin-bottom: 1.67em;
  294. font-size: 0.83em;
  295. }
  296. :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 {
  297. margin-top: 2.33em;
  298. margin-bottom: 2.33em;
  299. font-size: 0.67em;
  300. }
  301. /* 15.3.7 Lists
  302. * https://html.spec.whatwg.org/multipage/rendering.html#lists
  303. */
  304. dir, dd, dl, dt, menu, ol, ul {
  305. display: block;
  306. }
  307. li {
  308. display: list-item;
  309. text-align: match-parent;
  310. }
  311. dir, dl, menu, ol, ul {
  312. margin-top: 1em;
  313. margin-bottom: 1em;
  314. }
  315. :is(dir, dl, menu, ol, ul) :is(dir, dl, menu, ol, ul) {
  316. margin-top: 0;
  317. margin-bottom: 0;
  318. }
  319. dd {
  320. margin-left: 40px;
  321. }
  322. dir, menu, ol, ul {
  323. padding-left: 40px;
  324. }
  325. ol, ul, menu {
  326. counter-reset: list-item;
  327. }
  328. ol {
  329. list-style-type: decimal;
  330. }
  331. dir, menu, ul {
  332. list-style-type: disc;
  333. }
  334. :is(dir, menu, ol, ul) :is(dir, menu, ul) {
  335. list-style-type: circle;
  336. }
  337. :is(dir, menu, ol, ul) :is(dir, menu, ol, ul) :is(dir, menu, ul) {
  338. list-style-type: square;
  339. }
  340. /* 15.3.8 Tables
  341. * https://html.spec.whatwg.org/multipage/rendering.html#tables-2
  342. */
  343. table {
  344. display: table;
  345. }
  346. caption {
  347. display: table-caption;
  348. }
  349. colgroup, colgroup[hidden] {
  350. display: table-column-group;
  351. }
  352. col, col[hidden] {
  353. display: table-column;
  354. }
  355. thead, thead[hidden] {
  356. display: table-header-group;
  357. }
  358. tbody, tbody[hidden] {
  359. display: table-row-group;
  360. }
  361. tfoot, tfoot[hidden] {
  362. display: table-footer-group;
  363. }
  364. tr, tr[hidden] {
  365. display: table-row;
  366. }
  367. td, th {
  368. display: table-cell;
  369. }
  370. colgroup[hidden], col[hidden], thead[hidden], tbody[hidden],
  371. tfoot[hidden], tr[hidden] {
  372. visibility: collapse;
  373. }
  374. table {
  375. box-sizing: border-box;
  376. border-spacing: 2px;
  377. border-collapse: separate;
  378. text-indent: initial;
  379. }
  380. td, th {
  381. padding: 1px;
  382. }
  383. th {
  384. font-weight: bold;
  385. }
  386. caption {
  387. text-align: center;
  388. }
  389. thead, tbody, tfoot, table > tr {
  390. vertical-align: middle;
  391. }
  392. tr, td, th {
  393. vertical-align: inherit;
  394. }
  395. thead, tbody, tfoot, tr {
  396. border-color: inherit;
  397. }
  398. table[rules=none i], table[rules=groups i], table[rules=rows i],
  399. table[rules=cols i], table[rules=all i], table[frame=void i],
  400. table[frame=above i], table[frame=below i], table[frame=hsides i],
  401. table[frame=lhs i], table[frame=rhs i], table[frame=vsides i],
  402. table[frame=box i], table[frame=border i],
  403. table[rules=none i] > tr > td, table[rules=none i] > tr > th,
  404. table[rules=groups i] > tr > td, table[rules=groups i] > tr > th,
  405. table[rules=rows i] > tr > td, table[rules=rows i] > tr > th,
  406. table[rules=cols i] > tr > td, table[rules=cols i] > tr > th,
  407. table[rules=all i] > tr > td, table[rules=all i] > tr > th,
  408. table[rules=none i] > thead > tr > td, table[rules=none i] > thead > tr > th,
  409. table[rules=groups i] > thead > tr > td, table[rules=groups i] > thead > tr > th,
  410. table[rules=rows i] > thead > tr > td, table[rules=rows i] > thead > tr > th,
  411. table[rules=cols i] > thead > tr > td, table[rules=cols i] > thead > tr > th,
  412. table[rules=all i] > thead > tr > td, table[rules=all i] > thead > tr > th,
  413. table[rules=none i] > tbody > tr > td, table[rules=none i] > tbody > tr > th,
  414. table[rules=groups i] > tbody > tr > td, table[rules=groups i] > tbody > tr > th,
  415. table[rules=rows i] > tbody > tr > td, table[rules=rows i] > tbody > tr > th,
  416. table[rules=cols i] > tbody > tr > td, table[rules=cols i] > tbody > tr > th,
  417. table[rules=all i] > tbody > tr > td, table[rules=all i] > tbody > tr > th,
  418. table[rules=none i] > tfoot > tr > td, table[rules=none i] > tfoot > tr > th,
  419. table[rules=groups i] > tfoot > tr > td, table[rules=groups i] > tfoot > tr > th,
  420. table[rules=rows i] > tfoot > tr > td, table[rules=rows i] > tfoot > tr > th,
  421. table[rules=cols i] > tfoot > tr > td, table[rules=cols i] > tfoot > tr > th,
  422. table[rules=all i] > tfoot > tr > td, table[rules=all i] > tfoot > tr > th {
  423. border-color: black;
  424. }
  425. /* 15.3.10 Form controls
  426. * https://html.spec.whatwg.org/multipage/rendering.html#form-controls
  427. */
  428. input, select, button, textarea {
  429. letter-spacing: initial;
  430. word-spacing: initial;
  431. line-height: initial;
  432. text-transform: initial;
  433. text-indent: initial;
  434. text-shadow: initial;
  435. appearance: auto;
  436. }
  437. input, select, textarea {
  438. text-align: initial;
  439. }
  440. input:is([type=reset i], [type=button i], [type=submit i]), button {
  441. text-align: center;
  442. }
  443. input, button {
  444. display: inline-block;
  445. }
  446. input[type=hidden i], input[type=file i], input[type=image i] {
  447. appearance: none;
  448. }
  449. input:is([type=radio i], [type=checkbox i], [type=reset i], [type=button i],
  450. [type=submit i], [type=color i], [type=search i]), select, button {
  451. box-sizing: border-box;
  452. }
  453. textarea {
  454. white-space: pre-wrap;
  455. }
  456. /* 15.3.11 The hr element
  457. * https://html.spec.whatwg.org/multipage/rendering.html#the-hr-element-2
  458. */
  459. hr {
  460. color: gray;
  461. border-style: inset;
  462. border-width: 1px;
  463. margin: 0.5em auto;
  464. overflow: hidden;
  465. }
  466. /* 15.3.12 The fieldset and legend elements
  467. * https://html.spec.whatwg.org/multipage/rendering.html#the-fieldset-and-legend-elements
  468. */
  469. fieldset {
  470. display: block;
  471. margin-left: 2px;
  472. margin-right: 2px;
  473. border: groove 2px ThreeDFace;
  474. padding: 0.35em 0.75em 0.625em;
  475. min-inline-size: min-content;
  476. }
  477. legend {
  478. padding-left: 2px;
  479. padding-right: 2px;
  480. }
  481. legend[align=left i] {
  482. justify-self: left;
  483. }
  484. legend[align=center i] {
  485. justify-self: center;
  486. }
  487. legend[align=right i] {
  488. justify-self: right;
  489. }
  490. /* 15.4.1 Embedded content
  491. * https://html.spec.whatwg.org/multipage/rendering.html#embedded-content-rendering-rules
  492. */
  493. iframe {
  494. border: 2px inset;
  495. }
  496. video {
  497. object-fit: contain;
  498. }
  499. /* 15.5.4 The details and summary elements
  500. * https://html.spec.whatwg.org/multipage/rendering.html#the-details-and-summary-elements
  501. */
  502. summary {
  503. display: list-item;
  504. counter-increment: list-item 0;
  505. list-style: disclosure-closed inside;
  506. }
  507. details[open] > summary {
  508. list-style-type: disclosure-open;
  509. }
  510. /* 15.5.12 The marquee element
  511. * https://html.spec.whatwg.org/multipage/rendering.html#the-marquee-element-2
  512. */
  513. marquee {
  514. display: inline-block;
  515. text-align: initial;
  516. }
  517. /* 15.5.13 The meter element
  518. * https://html.spec.whatwg.org/multipage/rendering.html#the-meter-element-2
  519. */
  520. meter {
  521. appearance: auto;
  522. }
  523. /* 15.5.14 The progress element
  524. * https://html.spec.whatwg.org/multipage/rendering.html#the-progress-element-2
  525. */
  526. progress {
  527. appearance: auto;
  528. }
  529. /* https://www.w3.org/TR/mediaqueries-5/#descdef-media-inverted-colors
  530. */
  531. @media (inverted-colors) {
  532. img:not(picture>img),
  533. picture,
  534. video {
  535. filter: invert(100%);
  536. }
  537. }
  538. /* This is the same as default intrinsic size of a <progress> element */
  539. progress {
  540. width: 300px;
  541. height: 12px;
  542. }
  543. /* The default progress-value/bar CSS below is the same as Blink/WebKit.
  544. * Note: Setting any more than the backgrond-color may have unintended consequences, as sites don't expect to unset more than that.
  545. */
  546. progress::-webkit-progress-bar {
  547. width: inherit;
  548. height: inherit;
  549. background-color: grey;
  550. }
  551. progress::-webkit-progress-value {
  552. height: inherit;
  553. background-color: green;
  554. }