template-styles.css 18 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039
  1. /* Fonts */
  2. @font-face {
  3. font-family: 'Miriam Libre';
  4. src: url('{{ "css/fonts/miriamlibre-bold.woff2" | absURL }}') format('woff2'), url('{{ "css/fonts/miriamlibre-bold.woff" | absURL }}') format('woff');
  5. font-weight: bold;
  6. font-style: normal;
  7. }
  8. *,
  9. *::before,
  10. *::after {
  11. font-family: inherit;
  12. background-color: inherit;
  13. color: inherit;
  14. margin: 0;
  15. padding: 0;
  16. box-sizing: border-box;
  17. }
  18. html {
  19. font-size: calc(1em + 0.33vw);
  20. font-family: Arial, Helvetica Neue, sans-serif;
  21. line-height: 1.5;
  22. color: #111;
  23. background-color: #fefefe;
  24. }
  25. template {
  26. display: none !important;
  27. }
  28. * + * {
  29. margin-top: 2.25rem;
  30. }
  31. br,
  32. dt,
  33. dd,
  34. th,
  35. td,
  36. option,
  37. [hidden] + *,
  38. li + li,
  39. body,
  40. .main-and-footer {
  41. margin-top: 0;
  42. }
  43. p + p {
  44. margin-top: 0.75rem;
  45. }
  46. .priority {
  47. margin-top: 0;
  48. }
  49. a {
  50. text-decoration: none;
  51. border-bottom: 1px solid;
  52. }
  53. abbr {
  54. text-decoration: none;
  55. cursor: help;
  56. border-bottom: 1px dashed;
  57. }
  58. img {
  59. max-width: 100%;
  60. max-height: 50vh;
  61. }
  62. .img-link {
  63. border-bottom: none;
  64. }
  65. p img {
  66. margin: 0.75rem 0;
  67. }
  68. figure p img {
  69. margin: 0;
  70. }
  71. :focus:not([tabindex="-1"]),
  72. [data-expands]:focus svg,
  73. .patterns a:focus .text,
  74. [for="themer"] :focus + [aria-hidden] {
  75. outline: 4px solid #999;
  76. }
  77. a {
  78. outline-offset: 2px;
  79. }
  80. /* Katex math typesetting */
  81. .katex * {
  82. margin-top: 0;
  83. background-color: transparent;
  84. }
  85. /* Fix for IE :( */
  86. [tabindex="-1"]:focus,
  87. div:not([tabindex]):focus {
  88. outline: none;
  89. }
  90. [hidden] {
  91. display: none;
  92. }
  93. /* Skip link */
  94. [href="#main"] {
  95. display: block;
  96. width: 100%;
  97. padding: 0.75rem;
  98. color: #fefefe;
  99. background: #000;
  100. position: absolute;
  101. top: -3rem;
  102. text-align: center;
  103. z-index: 1;
  104. }
  105. [href="#main"]:focus {
  106. top: 0;
  107. outline: none;
  108. }
  109. /* Text styles */
  110. h1,
  111. h2,
  112. h3,
  113. h4 {
  114. font-family: Miriam Libre, serif;
  115. line-height: 1.125;
  116. }
  117. h1 {
  118. font-size: 2rem;
  119. }
  120. h2 {
  121. font-size: 1.66rem;
  122. }
  123. h3 {
  124. font-size: 1.25rem;
  125. }
  126. h4,
  127. h5 {
  128. font-size: 1rem;
  129. font-family: PT Sans, sans-serif;
  130. }
  131. h5 {
  132. font-size: 0.85rem;
  133. text-transform: uppercase;
  134. }
  135. kbd {
  136. line-height: 1;
  137. font-size: 0.66rem;
  138. padding: 0.1rem 0.33rem;
  139. border-radius: 0.25rem;
  140. border: 2px solid;
  141. box-shadow: 0.125rem 0.125rem 0 #111;
  142. vertical-align: 0.33em;
  143. }
  144. pre,
  145. .file-tree {
  146. overflow-x: auto;
  147. padding: 1.5rem;
  148. border: 1px solid;
  149. }
  150. code {
  151. font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
  152. font-size: 0.85em;
  153. }
  154. .cmd {
  155. padding: 0.75rem;
  156. background: #111;
  157. }
  158. .cmd code {
  159. color: #fefefe;
  160. white-space: pre-wrap;
  161. }
  162. .cmd code::before {
  163. content: '$';
  164. font-weight: bold;
  165. padding-right: 0.25em;
  166. }
  167. .cmd code::selection{
  168. background: #fefefe;
  169. color: rgba(0,0,0,.8);
  170. }
  171. /* Lists */
  172. main ul,
  173. main ol {
  174. margin-left: 2.25rem;
  175. }
  176. main li + li {
  177. margin-top: 0.5rem;
  178. }
  179. main ul ul, main ol ol, main li ul, main li ol {
  180. margin-top: 0.5rem;
  181. }
  182. ol ol {
  183. list-style: lower-latin;
  184. }
  185. ol ol ol {
  186. list-style: lower-roman;
  187. }
  188. main dt {
  189. font-weight: bold;
  190. }
  191. main dd {
  192. padding-left: 2rem;
  193. }
  194. dd ul {
  195. margin-left: 0;
  196. }
  197. dd li + li {
  198. margin: 0;
  199. }
  200. /* Blockquotes */
  201. blockquote {
  202. border-left: 0.5rem solid;
  203. padding-left: 0.75rem;
  204. }
  205. blockquote .author {
  206. font-size: 0.85rem;
  207. }
  208. /* Buttons */
  209. button {
  210. font-size: 1.25rem;
  211. border-radius: 0.33em;
  212. font-family: inherit;
  213. background: #111;
  214. color: #fefefe;
  215. padding: 0.75rem;
  216. border: 0;
  217. }
  218. [data-launch] {
  219. font-size: 0.66rem !important;
  220. padding: 0.5rem !important;
  221. margin-top: 0 !important;
  222. border-radius: 0 !important;
  223. border-top-left-radius: 0.33rem !important;
  224. box-shadow: none !important;
  225. background: #111 !important;
  226. color: #fefefe !important;
  227. position: absolute !important;
  228. right: 0 !important;
  229. bottom: 0 !important;
  230. }
  231. /* Forms */
  232. label {
  233. display: inline-block;
  234. font-weight: bold;
  235. }
  236. [for="themer"] {
  237. background: #111;
  238. border-radius: 0.33em;
  239. color: #fefefe;
  240. padding: 0.25em 0.75em;
  241. margin: 0.5rem;
  242. }
  243. [for="themer"] [aria-hidden]::before {
  244. content: 'off';
  245. }
  246. [for="themer"] :checked + [aria-hidden]::before {
  247. content: 'on';
  248. }
  249. /* Tables */
  250. table {
  251. text-align: left;
  252. table-layout: fixed;
  253. width: 100%;
  254. border-collapse: collapse;
  255. }
  256. th,
  257. td {
  258. border: 2px solid;
  259. padding: 0.5rem;
  260. line-height: 1.25;
  261. margin: 0;
  262. }
  263. th {
  264. font-weight: bold;
  265. }
  266. th:empty {
  267. border: 0;
  268. }
  269. /* Tested using... table */
  270. .tested {
  271. text-align: center;
  272. border: 1px solid #111;
  273. }
  274. .tested tr {
  275. display: flex;
  276. flex-flow: row wrap;
  277. }
  278. .tested td, .tested th {
  279. vertical-align: middle;
  280. overflow: hidden;
  281. flex: 1 0 auto;
  282. border: 1px solid #111;
  283. }
  284. .tested th {
  285. width: 100%;
  286. background-color: #111;
  287. color: #fefefe;
  288. outline-color: #111;
  289. }
  290. .tested img {
  291. max-width: 3rem;
  292. }
  293. .tested span {
  294. display: block;
  295. margin: 0;
  296. }
  297. .tested .additional {
  298. font-size: 0.85rem;
  299. }
  300. caption {
  301. font-size: 1.125rem;
  302. padding-bottom: 0.25rem;
  303. font-style: italic;
  304. }
  305. /* Page structure */
  306. .wrapper {
  307. position: relative;
  308. margin-top: 0;
  309. overflow-x: hidden;
  310. }
  311. .intro-and-nav {
  312. font-size: 0.8rem;
  313. width: 15rem;
  314. height: 100vh;
  315. position: fixed;
  316. top: 0;
  317. left: 0;
  318. border-right: 2px solid;
  319. }
  320. .intro-and-nav > div {
  321. padding: 2.25rem;
  322. display: flex;
  323. flex-direction: column;
  324. height: 100%;
  325. }
  326. .intro {
  327. flex: 0 0 auto;
  328. }
  329. .patterns {
  330. flex: 1 1 auto;
  331. }
  332. .logo {
  333. border: 0;
  334. }
  335. .logo img {
  336. width: 100%;
  337. max-width: 12rem;
  338. }
  339. .library-desc {
  340. margin-top: 0.5rem;
  341. margin-left: auto;
  342. margin-right: auto;
  343. max-width: 25rem;
  344. }
  345. .main-and-footer {
  346. margin-left: 15rem;
  347. }
  348. .main-and-footer > div {
  349. max-width: 40rem;
  350. margin: 0 auto;
  351. padding: 2.25rem;
  352. }
  353. [role="contentinfo"] {
  354. font-size: 0.85rem;
  355. margin-top: 4rem;
  356. text-align: center;
  357. }
  358. /* Patterns navigation */
  359. .patterns {
  360. overflow: auto;
  361. margin-top: 1.5rem;
  362. min-width: max-content;
  363. }
  364. .patterns * {
  365. margin-top: 0;
  366. }
  367. .patterns h3 {
  368. font-size: 1rem;
  369. }
  370. .patterns h3 + ul {
  371. margin-top: 0.75rem;
  372. }
  373. .patterns li {
  374. line-height: 1.125;
  375. list-style: none;
  376. }
  377. .patterns li + li {
  378. }
  379. .patterns ul ul {
  380. margin-left: 0.75rem;
  381. }
  382. .pattern a {
  383. border: 0;
  384. display: flex;
  385. flex-wrap: nowrap;
  386. align-items: baseline;
  387. font-weight: bold;
  388. padding: 0 1rem;
  389. padding-top: 0.5em;
  390. padding-bottom: 0.5em;
  391. }
  392. .pattern a:focus {
  393. outline: none;
  394. }
  395. .pattern span {
  396. margin-left: 0.125rem;
  397. }
  398. /* After */
  399. .pattern [aria-current] {
  400. background-color: #111;
  401. clip-path: polygon(0% 0%, 90% 0%, 100% 50%, 90% 100%, 0% 100%);
  402. color: #fefefe;
  403. }
  404. /* Menu button */
  405. #menu-button {
  406. display: none;
  407. width: 100%;
  408. text-align: center;
  409. }
  410. #menu-button:focus {
  411. outline: none;
  412. box-shadow: inset 0 0 0 0.25rem #999;
  413. }
  414. /* Tables of contents */
  415. .toc {
  416. font-size: 0.85rem;
  417. border: 1px solid;
  418. padding: 1.5rem;
  419. }
  420. .toc h2 {
  421. font-size: 1rem;
  422. }
  423. .toc ol {
  424. margin-left: 0.75rem;
  425. margin-top: 0.5rem;
  426. }
  427. /* Disqus Comments */
  428. #disqus-container {
  429. text-align: center;
  430. }
  431. #disqus-button {
  432. width: 100%;
  433. padding: 0.25em 0.75em;
  434. }
  435. #disqus-comments {
  436. display: none;
  437. }
  438. /* Pattern lists */
  439. .patterns-list {
  440. list-style: none;
  441. margin-left: 0;
  442. }
  443. .patterns-list h2 {
  444. font-size: 1.25rem;
  445. line-height: 1.6;
  446. }
  447. .patterns-list li + li {
  448. margin-top: 1rem;
  449. padding-top: 1rem;
  450. border-top: 2px solid;
  451. }
  452. .patterns-list a {
  453. border: 0;
  454. }
  455. /* Tags */
  456. .tags {
  457. margin-top: 0;
  458. font-size: 0.85rem;
  459. }
  460. .tags * {
  461. display: inline;
  462. margin: 0;
  463. }
  464. .tags strong {
  465. margin-right: 0.25rem;
  466. }
  467. .tags li {
  468. white-space: nowrap;
  469. margin: 0 0.25rem 0 0;
  470. }
  471. /* Date */
  472. .date {
  473. margin-top: 0;
  474. font-size: 0.85rem;
  475. }
  476. /* Notes and warnings */
  477. .note {
  478. border-left: 0.5rem solid;
  479. font-size: 0.85rem;
  480. }
  481. .note .sign {
  482. height: 2.25rem;
  483. width: 2.25rem;
  484. }
  485. .note > div {
  486. margin-left: 0.75rem;
  487. }
  488. .note > div > img:first-child {
  489. height: 1.5rem;
  490. }
  491. .note > div >:first-child + * {
  492. margin-top: 0;
  493. }
  494. .note.warning {
  495. border-left: 0;
  496. background-image: url({{ "css/images/stripe.svg" | absURL }});
  497. background-size: 0.5rem auto;
  498. background-repeat: repeat-y;
  499. }
  500. .note.warning > div {
  501. margin-left: 1.25rem;
  502. }
  503. /* Tick lists */
  504. .ticks li {
  505. list-style: none;
  506. position: relative;
  507. }
  508. .ticks li::before {
  509. content: '';
  510. display: inline-block;
  511. width: 1rem;
  512. height: 1rem;
  513. margin-right: 0.25rem;
  514. background-image: url({{ "css/images/icon-tick.svg" | absURL }});
  515. background-size: 100% auto;
  516. position: absolute;
  517. left: -1.25rem;
  518. top: 0.25rem;
  519. }
  520. /* Figures */
  521. figure {
  522. text-align: center;
  523. }
  524. figcaption {
  525. font-size: 0.85rem;
  526. font-style: italic;
  527. margin-top: 0.5rem;
  528. }
  529. main {
  530. display: block;
  531. counter-reset: fig;
  532. min-height: 100vh;
  533. }
  534. figcaption::before {
  535. counter-increment: fig;
  536. content: 'Figure ' counter(fig) ':\0020';
  537. font-weight: bold;
  538. }
  539. /* Code blocks */
  540. pre[class*=language-] {
  541. background: none;
  542. margin-top: 2.25rem;
  543. margin-bottom: 0;
  544. overflow-y: hidden;
  545. overflow-x: auto;
  546. }
  547. code[class*="language-"], pre[class*="language-"] {
  548. text-shadow: none;
  549. /* filter: grayscale(100%); */
  550. }
  551. pre[class*=language-][data-line] {
  552. padding: 1em 0 0 2.25rem;
  553. }
  554. pre[class*=language-] code * {
  555. margin-top: 0 !important;
  556. }
  557. [data-codeblock-shortcode], .code-annotated code {
  558. display: inline-block;
  559. margin-top: -1rem;
  560. }
  561. .code-annotated {
  562. overflow-y: hidden;
  563. overflow-x: auto;
  564. padding: 1.5rem;
  565. border: 1px solid;
  566. white-space: pre;
  567. counter-reset: annotation;
  568. }
  569. .highlight {
  570. background: #ddd;
  571. padding: 0.0625rem 0.33rem;
  572. border-radius: 0.5rem;
  573. }
  574. .numbered .highlight::after,
  575. .code-annotated.numbered + ol li::before {
  576. counter-increment: annotation;
  577. content: counter(annotation);
  578. font-weight: bold;
  579. font-size: 0.5rem;
  580. background: #111;
  581. color: #fefefe;
  582. border-radius: 1rem;
  583. margin-left: 0.25rem;
  584. padding: 0.125em 0.5em;
  585. vertical-align: 0.33em;
  586. }
  587. .code-annotated.numbered + ol {
  588. list-style: none;
  589. counter-reset: annotation;
  590. }
  591. .code-annotated.numbered + ol li::before {
  592. font-size: 0.66em;
  593. margin-right: 0.33em;
  594. vertical-align: 0.25em;
  595. }
  596. /* File tree lists */
  597. .file-tree {
  598. overflow-x: auto;
  599. }
  600. .file-tree ul {
  601. font-family: Courier, monospace;
  602. margin: 0;
  603. padding: 0;
  604. padding-left: 3rem;
  605. list-style: none;
  606. line-height: 1.25;
  607. position: relative;
  608. }
  609. .file-tree > ul {
  610. padding-left: 0;
  611. overflow-x: auto;
  612. overflow-y: hidden;
  613. }
  614. .file-tree li {
  615. background: #fefefe;
  616. position: relative;
  617. white-space: nowrap;
  618. }
  619. .file-tree li + li {
  620. margin-top: 0;
  621. }
  622. .file-tree li:not(:last-child) > ul::before {
  623. content: '\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020\2502\0020';
  624. position: absolute;
  625. left: 0;
  626. top: 0;
  627. bottom: 0;
  628. width: 1em;
  629. white-space: normal;
  630. }
  631. .file-tree li::before {
  632. content: '\251C\2500\2500\0020';
  633. }
  634. .file-tree li:last-child::before {
  635. content: '\2514\2500\2500\0020';
  636. }
  637. /* Expandable sections */
  638. .expandable-section {
  639. border-top: 1px solid;
  640. border-bottom: 1px solid;
  641. padding: 0.75rem 0;
  642. }
  643. [id^="js-expandable-"] {
  644. margin: 0;
  645. padding: 1.5rem 0 0.75rem;
  646. }
  647. @media screen {
  648. .expandable-section + .expandable-section {
  649. margin-top: 0;
  650. border-top: 0;
  651. }
  652. }
  653. [data-expands] {
  654. text-align: left;
  655. color: #111;
  656. border: 0;
  657. background: none;
  658. width: 100%;
  659. padding: 0;
  660. margin: 0;
  661. display: flex;
  662. align-items: center;
  663. justify-content: space-between;
  664. cursor: pointer;
  665. }
  666. [data-expands] svg {
  667. margin-top: 0;
  668. width: 1em;
  669. height: 1em;
  670. }
  671. [data-expands][aria-expanded="true"] svg .up-strut {
  672. display: none;
  673. }
  674. [data-expands]:focus {
  675. outline: none;
  676. }
  677. p:empty {
  678. display: none;
  679. }
  680. *:not(p) + p:empty + p {
  681. margin-top: 2.25rem;
  682. }
  683. /* WCAG and principles */
  684. .wcag li {
  685. font-size: 0.85em;
  686. }
  687. .principles p {
  688. font-size: 0.85rem;
  689. margin-top: 0.75rem;
  690. }
  691. .principles.with-desc > li + li,
  692. .wcag.with-desc > li + li {
  693. border-top: 1px solid;
  694. margin-top: 0.75rem;
  695. padding-top: 0.75rem;
  696. }
  697. /* Site errors */
  698. .site-error {
  699. padding: 1.5rem;
  700. background: #efefef;
  701. }
  702. .site-error strong {
  703. color: #C83737;
  704. }
  705. /* SVG icons */
  706. a svg,
  707. button svg,
  708. h1 svg,
  709. th svg,
  710. li > svg {
  711. height: 0.75em;
  712. width: 0.75em;
  713. margin-right: 0.25em;
  714. }
  715. h1 svg {
  716. margin-right: 0;
  717. width: 0.85em;
  718. height: 0.85em;
  719. }
  720. .wcag-icon {
  721. width: 1.25em;
  722. }
  723. .bookmark-icon {
  724. vertical-align: middle;
  725. }
  726. .link-icon {
  727. width: 0.75em;
  728. height: 0.75em;
  729. }
  730. .tags svg, .link-icon {
  731. vertical-align: middle;
  732. }
  733. .balloon-icon {
  734. width: 0.75em;
  735. margin-right: 0;
  736. }
  737. .print {
  738. white-space: nowrap;
  739. font-style: normal;
  740. }
  741. /* Color palettes */
  742. .colors {
  743. display: flex;
  744. height: 5rem;
  745. margin: -0.25rem;
  746. list-style: none;
  747. flex-wrap: nowrap;
  748. }
  749. .colors li {
  750. margin: 0.25rem;
  751. flex: 1 0 auto;
  752. position: relative;
  753. }
  754. .colors span {
  755. line-height: 1;
  756. background-color: #111;
  757. color: #fefefe;
  758. font-size: 0.75rem;
  759. padding: 0.25rem;
  760. position: absolute;
  761. bottom: 0.25rem;
  762. right: 0.25rem;
  763. }
  764. /* Cross references */
  765. .pattern-link {
  766. font-weight: bold;
  767. }
  768. /* Inline demos */
  769. .demo-inner {
  770. border-top: 1px solid;
  771. border-bottom: 1px solid;
  772. padding: 1.5rem 0;
  773. position: relative;
  774. }
  775. [id^="js-demo-"] {
  776. all: initial;
  777. display: block;
  778. }
  779. /* Section links */
  780. .h2-container {
  781. position: relative;
  782. font-size: 1.66rem;
  783. }
  784. .h2-container a {
  785. position: absolute;
  786. margin-top: 0;
  787. top: 0;
  788. line-height: 1;
  789. left: -1em;
  790. border: 0;
  791. }
  792. /* Single page layout */
  793. .wrapper.print-version .main-and-footer {
  794. margin-left: 0;
  795. }
  796. .wrapper.print-version .intro-and-nav {
  797. position: static;
  798. border: 0;
  799. width: auto;
  800. text-align: center;
  801. display: flex;
  802. align-items: center;
  803. justify-content: center;
  804. }
  805. .wrapper.print-version main {
  806. min-height: 0;
  807. }
  808. .wrapper.print-version .library-desc {
  809. font-size: 1rem;
  810. }
  811. .wrapper.print-version .intro-and-nav > div {
  812. height: auto;
  813. }
  814. .wrapper.print-version #patterns-list {
  815. margin-left: 0;
  816. margin-top: 1.5rem;
  817. display: block;
  818. }
  819. .wrapper.print-version .toc {
  820. font-size: 1rem;
  821. }
  822. .wrapper.print-version .toc h2 {
  823. font-size: 1.66rem;
  824. }
  825. .wrapper.print-version #patterns-list h3 {
  826. font-size: 1.25rem;
  827. }
  828. .wrapper.print-version .patterns {
  829. margin-top: 0;
  830. }
  831. .pattern-section:not(:last-child) {
  832. padding-bottom: 2.25rem;
  833. border-bottom: 2px solid;
  834. }
  835. .pattern-section h1 {
  836. padding: 0 !important;
  837. }
  838. /* Custom 404 */
  839. .custom-404 {
  840. text-align: center;
  841. }
  842. .custom-404 * {
  843. margin: 0;
  844. }
  845. .custom-404 svg {
  846. max-width: 100%;
  847. }
  848. /* Utilities */
  849. .vh {
  850. clip: rect(1px, 1px, 1px, 1px);
  851. height: 1px;
  852. overflow: hidden;
  853. position: absolute;
  854. white-space: nowrap;
  855. width: 1px;
  856. }
  857. .gallery {
  858. display: flex;
  859. justify-content: center;
  860. }
  861. /* Media queries */
  862. @media screen and (max-width: 45em) {
  863. body a {
  864. hyphens: auto;
  865. }
  866. [role="banner"] {
  867. position: static;
  868. width: auto;
  869. height: auto;
  870. }
  871. .intro {
  872. text-align: center;
  873. }
  874. .intro-and-nav {
  875. border-right: none;
  876. }
  877. .intro-and-nav > div {
  878. padding: 1.5rem;
  879. }
  880. .main-and-footer {
  881. margin: 0;
  882. }
  883. main {
  884. min-height: auto;
  885. }
  886. #patterns-list {
  887. margin-top: 0.5rem;
  888. border: 1px solid;
  889. }
  890. .patterns h3 {
  891. font-size: 1.5rem;
  892. padding: 1.5rem 1rem 0.75rem;
  893. }
  894. .patterns li:not(.pattern) {
  895. margin-top: 0;
  896. }
  897. .patterns ul ul {
  898. margin: 0;
  899. }
  900. .patterns li {
  901. margin-top: 0;
  902. }
  903. .pattern {
  904. font-size: 1rem;
  905. }
  906. .pattern a {
  907. padding: 1rem;
  908. }
  909. .pattern [aria-current] {
  910. clip-path: none;
  911. padding: 1rem;
  912. }
  913. .pattern + .pattern {
  914. border-top: 1px solid;
  915. margin-top: 0;
  916. }
  917. #menu-button {
  918. display: block;
  919. }
  920. #patterns-list {
  921. display: none;
  922. }
  923. .toc-link {
  924. display: none;
  925. }
  926. [aria-expanded="true"] + #patterns-list {
  927. display: block;
  928. }
  929. code {
  930. word-break: break-all;
  931. }
  932. }
  933. @media print {
  934. .wrapper:not(.print-version) .intro-and-nav,
  935. .wrapper:not(.print-version) [role="contentinfo"] {
  936. display: none;
  937. }
  938. .main-and-footer {
  939. margin-left: 0;
  940. }
  941. a {
  942. border: 0;
  943. }
  944. main a::after {
  945. content: " (" attr(href) ")";
  946. word-break: break-word;
  947. }
  948. main nav a::after {
  949. content: '';
  950. }
  951. .cmd code {
  952. background: #fefefe;
  953. color: #111;
  954. }
  955. pre code {
  956. white-space: pre-wrap !important;
  957. }
  958. .expandable-section {
  959. border: 0;
  960. padding: 0;
  961. }
  962. .expandable-section + p {
  963. margin-top: 0.75rem;
  964. }
  965. [id^="js-expandable-"] {
  966. display: block;
  967. }
  968. [data-expands] svg {
  969. display: none;
  970. }
  971. main *:not(.with-desc) {
  972. page-break-inside: avoid;
  973. }
  974. .note.warning {
  975. border-left: 0.5rem solid;
  976. background: none;
  977. }
  978. }
  979. @media (-ms-high-contrast: active) {
  980. img[src*=".svg"] {
  981. background: #fefefe;
  982. padding: 0.5rem;
  983. }
  984. .ticks li::before {
  985. content: '✓';
  986. background: none;
  987. width: auto;
  988. top: 0;
  989. }
  990. .note.warning {
  991. border-left: 0.5rem solid;
  992. background: none;
  993. }
  994. }
  995. ::-moz-selection { /* Code for Firefox */
  996. background: rgba(0,0,0,.8);
  997. color: #fefefe;
  998. }
  999. ::selection {
  1000. background: rgba(0,0,0,.8);
  1001. color: #fefefe;
  1002. }