template-styles.css 18 KB

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