template-styles.css 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026
  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. #disqus-comments,
  431. #disqus-comments iframe {
  432. max-height: 65vh !important;
  433. overflow-y: auto;
  434. }
  435. /* Pattern lists */
  436. .patterns-list {
  437. list-style: none;
  438. margin-left: 0;
  439. }
  440. .patterns-list h2 {
  441. font-size: 1.25rem;
  442. line-height: 1.6;
  443. }
  444. .patterns-list li + li {
  445. margin-top: 1rem;
  446. padding-top: 1rem;
  447. border-top: 2px solid;
  448. }
  449. .patterns-list a {
  450. border: 0;
  451. }
  452. /* Tags */
  453. .tags {
  454. margin-top: 0;
  455. font-size: 0.85rem;
  456. }
  457. .tags * {
  458. display: inline;
  459. margin: 0;
  460. }
  461. .tags strong {
  462. margin-right: 0.25rem;
  463. }
  464. .tags li {
  465. white-space: nowrap;
  466. margin: 0 0.25rem 0 0;
  467. }
  468. /* Date */
  469. .date {
  470. margin-top: 0;
  471. font-size: 0.85rem;
  472. }
  473. /* Notes and warnings */
  474. .note {
  475. border-left: 0.5rem solid;
  476. font-size: 0.85rem;
  477. }
  478. .note .sign {
  479. height: 2.25rem;
  480. width: 2.25rem;
  481. }
  482. .note > div {
  483. margin-left: 0.75rem;
  484. }
  485. .note > div > img:first-child {
  486. height: 1.5rem;
  487. }
  488. .note > div >:first-child + * {
  489. margin-top: 0;
  490. }
  491. .note.warning {
  492. border-left: 0;
  493. background-image: url({{ "css/images/stripe.svg" | absURL }});
  494. background-size: 0.5rem auto;
  495. background-repeat: repeat-y;
  496. }
  497. .note.warning > div {
  498. margin-left: 1.25rem;
  499. }
  500. /* Tick lists */
  501. .ticks li {
  502. list-style: none;
  503. position: relative;
  504. }
  505. .ticks li::before {
  506. content: '';
  507. display: inline-block;
  508. width: 1rem;
  509. height: 1rem;
  510. margin-right: 0.25rem;
  511. background-image: url({{ "css/images/icon-tick.svg" | absURL }});
  512. background-size: 100% auto;
  513. position: absolute;
  514. left: -1.25rem;
  515. top: 0.25rem;
  516. }
  517. /* Figures */
  518. figure {
  519. text-align: center;
  520. }
  521. figcaption {
  522. font-size: 0.85rem;
  523. font-style: italic;
  524. margin-top: 0.5rem;
  525. }
  526. main {
  527. display: block;
  528. counter-reset: fig;
  529. min-height: 100vh;
  530. }
  531. figcaption::before {
  532. counter-increment: fig;
  533. content: 'Figure ' counter(fig) ':\0020';
  534. font-weight: bold;
  535. }
  536. /* Code blocks */
  537. pre[class*=language-] {
  538. background: none;
  539. margin-top: 2.25rem;
  540. margin-bottom: 0;
  541. overflow-y: hidden;
  542. overflow-x: auto;
  543. }
  544. code[class*="language-"], pre[class*="language-"] {
  545. text-shadow: none;
  546. /* filter: grayscale(100%); */
  547. }
  548. pre[class*=language-][data-line] {
  549. padding: 1em 0 0 2.25rem;
  550. }
  551. pre[class*=language-] code * {
  552. margin-top: 0 !important;
  553. }
  554. [data-codeblock-shortcode], .code-annotated code {
  555. display: inline-block;
  556. margin-top: -1rem;
  557. }
  558. .code-annotated {
  559. overflow-y: hidden;
  560. overflow-x: auto;
  561. padding: 1.5rem;
  562. border: 1px solid;
  563. white-space: pre;
  564. counter-reset: annotation;
  565. }
  566. .highlight {
  567. background: #ddd;
  568. padding: 0.0625rem 0.33rem;
  569. border-radius: 0.5rem;
  570. }
  571. .numbered .highlight::after,
  572. .code-annotated.numbered + ol li::before {
  573. counter-increment: annotation;
  574. content: counter(annotation);
  575. font-weight: bold;
  576. font-size: 0.5rem;
  577. background: #111;
  578. color: #fefefe;
  579. border-radius: 1rem;
  580. margin-left: 0.25rem;
  581. padding: 0.125em 0.5em;
  582. vertical-align: 0.33em;
  583. }
  584. .code-annotated.numbered + ol {
  585. list-style: none;
  586. counter-reset: annotation;
  587. }
  588. .code-annotated.numbered + ol li::before {
  589. font-size: 0.66em;
  590. margin-right: 0.33em;
  591. vertical-align: 0.25em;
  592. }
  593. /* File tree lists */
  594. .file-tree {
  595. overflow-x: auto;
  596. }
  597. .file-tree ul {
  598. font-family: Courier, monospace;
  599. margin: 0;
  600. padding: 0;
  601. padding-left: 3rem;
  602. list-style: none;
  603. line-height: 1.25;
  604. position: relative;
  605. }
  606. .file-tree > ul {
  607. padding-left: 0;
  608. overflow-x: auto;
  609. overflow-y: hidden;
  610. }
  611. .file-tree li {
  612. background: #fefefe;
  613. position: relative;
  614. white-space: nowrap;
  615. }
  616. .file-tree li + li {
  617. margin-top: 0;
  618. }
  619. .file-tree li:not(:last-child) > ul::before {
  620. 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';
  621. position: absolute;
  622. left: 0;
  623. top: 0;
  624. bottom: 0;
  625. width: 1em;
  626. white-space: normal;
  627. }
  628. .file-tree li::before {
  629. content: '\251C\2500\2500\0020';
  630. }
  631. .file-tree li:last-child::before {
  632. content: '\2514\2500\2500\0020';
  633. }
  634. /* Expandable sections */
  635. .expandable-section {
  636. border-top: 1px solid;
  637. border-bottom: 1px solid;
  638. padding: 0.75rem 0;
  639. }
  640. [id^="js-expandable-"] {
  641. margin: 0;
  642. padding: 1.5rem 0 0.75rem;
  643. }
  644. @media screen {
  645. .expandable-section + .expandable-section {
  646. margin-top: 0;
  647. border-top: 0;
  648. }
  649. }
  650. [data-expands] {
  651. text-align: left;
  652. color: #111;
  653. border: 0;
  654. background: none;
  655. width: 100%;
  656. padding: 0;
  657. margin: 0;
  658. display: flex;
  659. align-items: center;
  660. justify-content: space-between;
  661. cursor: pointer;
  662. }
  663. [data-expands] svg {
  664. margin-top: 0;
  665. width: 1em;
  666. height: 1em;
  667. }
  668. [data-expands][aria-expanded="true"] svg .up-strut {
  669. display: none;
  670. }
  671. [data-expands]:focus {
  672. outline: none;
  673. }
  674. p:empty {
  675. display: none;
  676. }
  677. *:not(p) + p:empty + p {
  678. margin-top: 2.25rem;
  679. }
  680. /* WCAG and principles */
  681. .wcag li {
  682. font-size: 0.85em;
  683. }
  684. .principles p {
  685. font-size: 0.85rem;
  686. margin-top: 0.75rem;
  687. }
  688. .principles.with-desc > li + li,
  689. .wcag.with-desc > li + li {
  690. border-top: 1px solid;
  691. margin-top: 0.75rem;
  692. padding-top: 0.75rem;
  693. }
  694. /* Site errors */
  695. .site-error {
  696. padding: 1.5rem;
  697. background: #efefef;
  698. }
  699. .site-error strong {
  700. color: #C83737;
  701. }
  702. /* SVG icons */
  703. a svg,
  704. button svg,
  705. h1 svg,
  706. th svg,
  707. li > svg {
  708. height: 0.75em;
  709. width: 0.75em;
  710. margin-right: 0.25em;
  711. }
  712. h1 svg {
  713. margin-right: 0;
  714. width: 0.85em;
  715. height: 0.85em;
  716. }
  717. .wcag-icon {
  718. width: 1.25em;
  719. }
  720. .bookmark-icon {
  721. vertical-align: middle;
  722. }
  723. .link-icon {
  724. width: 0.75em;
  725. height: 0.75em;
  726. }
  727. .tags svg, .link-icon {
  728. vertical-align: middle;
  729. }
  730. .balloon-icon {
  731. width: 0.75em;
  732. margin-right: 0;
  733. }
  734. .print {
  735. white-space: nowrap;
  736. font-style: normal;
  737. }
  738. /* Color palettes */
  739. .colors {
  740. display: flex;
  741. height: 5rem;
  742. margin: -0.25rem;
  743. list-style: none;
  744. flex-wrap: nowrap;
  745. }
  746. .colors li {
  747. margin: 0.25rem;
  748. flex: 1 0 auto;
  749. position: relative;
  750. }
  751. .colors span {
  752. line-height: 1;
  753. background-color: #111;
  754. color: #fefefe;
  755. font-size: 0.75rem;
  756. padding: 0.25rem;
  757. position: absolute;
  758. bottom: 0.25rem;
  759. right: 0.25rem;
  760. }
  761. /* Cross references */
  762. .pattern-link {
  763. font-weight: bold;
  764. }
  765. /* Inline demos */
  766. .demo-inner {
  767. border-top: 1px solid;
  768. border-bottom: 1px solid;
  769. padding: 1.5rem 0;
  770. position: relative;
  771. }
  772. [id^="js-demo-"] {
  773. all: initial;
  774. display: block;
  775. }
  776. /* Section links */
  777. .h2-container {
  778. position: relative;
  779. font-size: 1.66rem;
  780. }
  781. .h2-container a {
  782. position: absolute;
  783. margin-top: 0;
  784. top: 0;
  785. line-height: 1;
  786. left: -1em;
  787. border: 0;
  788. }
  789. /* Single page layout */
  790. .wrapper.print-version .main-and-footer {
  791. margin-left: 0;
  792. }
  793. .wrapper.print-version .intro-and-nav {
  794. position: static;
  795. border: 0;
  796. width: auto;
  797. text-align: center;
  798. display: flex;
  799. align-items: center;
  800. justify-content: center;
  801. }
  802. .wrapper.print-version main {
  803. min-height: 0;
  804. }
  805. .wrapper.print-version .library-desc {
  806. font-size: 1rem;
  807. }
  808. .wrapper.print-version .intro-and-nav > div {
  809. height: auto;
  810. }
  811. .wrapper.print-version #patterns-list {
  812. margin-left: 0;
  813. margin-top: 1.5rem;
  814. display: block;
  815. }
  816. .wrapper.print-version .toc {
  817. font-size: 1rem;
  818. }
  819. .wrapper.print-version .toc h2 {
  820. font-size: 1.66rem;
  821. }
  822. .wrapper.print-version #patterns-list h3 {
  823. font-size: 1.25rem;
  824. }
  825. .wrapper.print-version .patterns {
  826. margin-top: 0;
  827. }
  828. .pattern-section:not(:last-child) {
  829. padding-bottom: 2.25rem;
  830. border-bottom: 2px solid;
  831. }
  832. .pattern-section h1 {
  833. padding: 0 !important;
  834. }
  835. /* Custom 404 */
  836. .custom-404 {
  837. text-align: center;
  838. }
  839. .custom-404 * {
  840. margin: 0;
  841. }
  842. .custom-404 svg {
  843. max-width: 100%;
  844. }
  845. /* Utilities */
  846. .vh {
  847. clip: rect(1px, 1px, 1px, 1px);
  848. height: 1px;
  849. overflow: hidden;
  850. position: absolute;
  851. white-space: nowrap;
  852. width: 1px;
  853. }
  854. .gallery {
  855. display: flex;
  856. justify-content: center;
  857. }
  858. /* Media queries */
  859. @media screen and (max-width: 45em) {
  860. body a {
  861. hyphens: auto;
  862. }
  863. [role="banner"] {
  864. position: static;
  865. width: auto;
  866. height: auto;
  867. }
  868. .intro {
  869. text-align: center;
  870. }
  871. .intro-and-nav {
  872. border-right: none;
  873. }
  874. .intro-and-nav > div {
  875. padding: 1.5rem;
  876. }
  877. .main-and-footer {
  878. margin: 0;
  879. }
  880. main {
  881. min-height: auto;
  882. }
  883. #patterns-list {
  884. margin-top: 0.5rem;
  885. border: 1px solid;
  886. }
  887. .patterns h3 {
  888. font-size: 1.5rem;
  889. padding: 1.5rem 1rem 0.75rem;
  890. }
  891. .patterns li:not(.pattern) {
  892. margin-top: 0;
  893. }
  894. .patterns ul ul {
  895. margin: 0;
  896. }
  897. .patterns li {
  898. margin-top: 0;
  899. }
  900. .pattern {
  901. font-size: 1rem;
  902. }
  903. .pattern a {
  904. padding: 1rem;
  905. }
  906. .pattern [aria-current] {
  907. clip-path: none;
  908. padding: 1rem;
  909. }
  910. .pattern + .pattern {
  911. border-top: 1px solid;
  912. margin-top: 0;
  913. }
  914. #menu-button {
  915. display: block;
  916. }
  917. #patterns-list {
  918. display: none;
  919. }
  920. .toc-link {
  921. display: none;
  922. }
  923. [aria-expanded="true"] + #patterns-list {
  924. display: block;
  925. }
  926. code {
  927. word-break: break-all;
  928. }
  929. }
  930. @media print {
  931. .wrapper:not(.print-version) .intro-and-nav,
  932. .wrapper:not(.print-version) [role="contentinfo"] {
  933. display: none;
  934. }
  935. .main-and-footer {
  936. margin-left: 0;
  937. }
  938. a {
  939. border: 0;
  940. }
  941. main a::after {
  942. content: " (" attr(href) ")";
  943. word-break: break-word;
  944. }
  945. main nav a::after {
  946. content: '';
  947. }
  948. .cmd code {
  949. background: #fefefe;
  950. color: #111;
  951. }
  952. pre code {
  953. white-space: pre-wrap !important;
  954. }
  955. .expandable-section {
  956. border: 0;
  957. padding: 0;
  958. }
  959. .expandable-section + p {
  960. margin-top: 0.75rem;
  961. }
  962. [id^="js-expandable-"] {
  963. display: block;
  964. }
  965. [data-expands] svg {
  966. display: none;
  967. }
  968. main *:not(.with-desc) {
  969. page-break-inside: avoid;
  970. }
  971. .note.warning {
  972. border-left: 0.5rem solid;
  973. background: none;
  974. }
  975. }
  976. @media (-ms-high-contrast: active) {
  977. img[src*=".svg"] {
  978. background: #fefefe;
  979. padding: 0.5rem;
  980. }
  981. .ticks li::before {
  982. content: '✓';
  983. background: none;
  984. width: auto;
  985. top: 0;
  986. }
  987. .note.warning {
  988. border-left: 0.5rem solid;
  989. background: none;
  990. }
  991. }