styles.css 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398
  1. /*
  2. Colors:
  3. Blue color = #38608F
  4. Dark blue color = #153B62
  5. Gold color = #FCB316
  6. Grey color = #707174
  7. Red color = #C83737
  8. */
  9. *, *::before, *::after {
  10. font-family: inherit;
  11. color: inherit;
  12. margin: 0;
  13. padding: 0;
  14. box-sizing: border-box;
  15. }
  16. html {
  17. font-size: calc(1em + 0.33vw);
  18. font-family: PT Sans, sans-serif;
  19. line-height: 1.5;
  20. color: #111;
  21. }
  22. * + * {
  23. margin-top: 2.25rem;
  24. }
  25. br,
  26. dt,
  27. dd,
  28. th,
  29. td,
  30. option,
  31. [hidden] + *,
  32. li + li,
  33. body,
  34. .main-and-footer {
  35. margin-top: 0;
  36. }
  37. p + p {
  38. margin-top: 0.75rem;
  39. }
  40. a {
  41. text-decoration: none;
  42. border-bottom: 1px solid;
  43. }
  44. img {
  45. max-width: 100%;
  46. }
  47. :focus:not([tabindex="-1"]), [data-expands]:focus svg {
  48. outline: 3px solid #FCB316;
  49. outline-offset: 2px;
  50. }
  51. /* fix for IE :( */
  52. div:not([tabindex]):focus {
  53. outline: none;
  54. }
  55. h1, h2, h3, h4 {
  56. font-family: Miriam Libre, serif;
  57. line-height: 1.125;
  58. }
  59. h1 {
  60. font-size: 2rem;
  61. }
  62. h2 {
  63. font-size: 1.66rem;
  64. }
  65. h3 {
  66. font-size: 1.25rem;
  67. }
  68. h4 {
  69. font-size: 1rem;
  70. font-family: PT Sans, sans-serif;
  71. }
  72. kbd {
  73. line-height: 1;
  74. font-size: 0.66rem;
  75. padding: 0.1rem 0.25rem;
  76. border-radius: 0.25rem;
  77. border: 2px solid;
  78. box-shadow: 0.125rem 0.125rem 0 #111;
  79. }
  80. code {
  81. font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
  82. font-size: 0.85rem;
  83. }
  84. /* Lists */
  85. main ul {
  86. margin-left: 2.25rem;
  87. }
  88. main ul ul {
  89. margin-top: 0;
  90. }
  91. /* Buttons */
  92. button {
  93. font-size: inherit;
  94. font-family: inherit;
  95. font-weight: inherit;
  96. }
  97. /* Tables */
  98. table {
  99. text-align: left;
  100. table-layout: fixed;
  101. width: 100%;
  102. border-collapse: collapse;
  103. }
  104. th, td {
  105. border: 2px solid;
  106. padding: 0.5rem;
  107. line-height: 1;
  108. margin: 0;
  109. }
  110. caption {
  111. font-size: 1.125rem;
  112. padding-bottom: 0.25rem;
  113. font-style: italic;
  114. }
  115. th:empty {
  116. border: 0;
  117. }
  118. /* Page structure */
  119. .wrapper {
  120. position: relative;
  121. margin-top: 0;
  122. }
  123. .intro-and-nav {
  124. font-size: 0.85rem;
  125. width: 15rem;
  126. height: 100vh;
  127. position: fixed;
  128. top: 0;
  129. left: 0;
  130. border-right: 2px solid;
  131. }
  132. .intro-and-nav > div {
  133. padding: 2.25rem;
  134. display: flex;
  135. flex-direction: column;
  136. height: 100%;
  137. }
  138. .intro-and-nav > div * + *:not(li) {
  139. margin-top: 0.75rem;
  140. }
  141. .logo {
  142. border: 0;
  143. }
  144. .library-desc {
  145. font-style: italic;
  146. }
  147. .patterns {
  148. overflow: auto;
  149. }
  150. .main-and-footer {
  151. margin-left: 15rem;
  152. }
  153. .main-and-footer > div {
  154. max-width: 40rem;
  155. margin: 0 auto;
  156. padding: 2.25rem;
  157. }
  158. /* Notes and warnings */
  159. .note {
  160. border-left: 0.5rem solid #FCB316;
  161. font-size: 0.85rem;
  162. }
  163. .note > div {
  164. margin-left: 0.75rem;
  165. }
  166. .note > div > img:first-child {
  167. height: 1.5rem;
  168. }
  169. .note.warning {
  170. border-color: #C83737;
  171. }
  172. .note > div > :first-child + * {
  173. margin-top: 0;
  174. }
  175. /* Figures */
  176. figure {
  177. text-align: center;
  178. }
  179. figcaption {
  180. font-size: 0.85rem;
  181. font-style: italic;
  182. margin-top: 0.75rem;
  183. }
  184. main {
  185. counter-reset: fig;
  186. }
  187. figcaption::before {
  188. counter-increment: fig;
  189. content: 'Figure ' counter(fig) ':';
  190. font-weight: bold;
  191. }
  192. /* Code blocks */
  193. pre[class*=language-] {
  194. padding: 1rem;
  195. background: #f9f9f9;
  196. margin-top: 2.25rem;
  197. }
  198. pre[class*=language-][data-line] {
  199. padding: 1em 0 1em 2.25rem;
  200. }
  201. pre[class*=language-] code * {
  202. margin-top: 0 !important;
  203. }
  204. [data-codeblock-shortcode] {
  205. display: block;
  206. margin-top: -1rem;
  207. }
  208. .token.property,
  209. .token.tag,
  210. .token.boolean,
  211. .token.number,
  212. .token.constant,
  213. .token.symbol,
  214. .token.deleted {
  215. color: #38608F;
  216. }
  217. .token.selector,
  218. .token.attr-name,
  219. .token.string,
  220. .token.char,
  221. .token.builtin,
  222. .token.inserted {
  223. color: #EBA205;
  224. }
  225. .token.operator,
  226. .token.entity,
  227. .token.url,
  228. .language-css .token.string,
  229. .style .token.string {
  230. color: #a67f59;
  231. background: hsla(0, 0%, 100%, .5);
  232. }
  233. .token.atrule,
  234. .token.attr-value,
  235. .token.keyword {
  236. color: #07a;
  237. }
  238. .token.function {
  239. color: #375D84;
  240. }
  241. .line-numbers code {
  242. padding-left: 2.25rem;
  243. margin-top: -1rem;
  244. }
  245. .line-numbers {
  246. padding-bottom: 2.25rem !important;
  247. }
  248. .line-numbers .line-numbers-rows {
  249. margin-left: 2.25rem;
  250. top: 1.25rem;
  251. border-right-style: dashed
  252. color: #111;
  253. }
  254. .line-numbers-rows > span:before {
  255. color: inherit;
  256. }
  257. /* Expandable sections */
  258. .expandable-section {
  259. border-top: 1px solid;
  260. border-bottom: 1px solid;
  261. padding: 0.75rem 0;
  262. }
  263. [id^="expandable-"] {
  264. margin: 0;
  265. padding: 1.5rem 0 0.75rem;
  266. }
  267. .expandable-section + .expandable-section {
  268. margin-top: 0;
  269. border-top: 0;
  270. }
  271. [data-expands] {
  272. text-align: left;
  273. border: 0;
  274. background: none;
  275. width: 100%;
  276. padding: 0;
  277. margin: 0;
  278. display: flex;
  279. align-items: center;
  280. justify-content: space-between;
  281. cursor: pointer;
  282. }
  283. [data-expands] svg {
  284. margin-top: 0;
  285. width: 1em;
  286. height: 1em;
  287. }
  288. [data-expands][aria-expanded="true"] svg .up-strut {
  289. display: none;
  290. }
  291. [data-expands]:focus {
  292. outline: none;
  293. }
  294. p:empty {
  295. display: none;
  296. }
  297. /* WCAG and principles */
  298. .wcag ul li {
  299. font-size: 0.85em;
  300. }
  301. .principles p {
  302. font-size: 0.85rem;
  303. margin-top: 0.75rem;
  304. }
  305. .principles.with-desc > li + li,
  306. .wcag.with-desc > li + li {
  307. border-top: 1px solid;
  308. margin-top: 0.75rem;
  309. padding-top: 0.75rem;
  310. }
  311. /* Site errors */
  312. .site-error {
  313. padding: 1.5rem;
  314. background: #efefef;
  315. }
  316. .site-error strong {
  317. color: #C83737;
  318. }