styles.css 17 KB

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