template-styles.css 17 KB

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