template-styles.css 18 KB

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