styles.css 17 KB

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