template-styles.css 17 KB

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