styles.css 17 KB

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