template-styles.css 17 KB

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