article.css 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394
  1. /* Documentation licensed under CC BY 4.0 */
  2. /* License available at https://creativecommons.org/licenses/by/4.0/ */
  3. /* Basic element styles */
  4. /* TODO - consider * { box-sizing: border-box; } */
  5. #_toc {
  6. display: none;
  7. }
  8. a {
  9. text-decoration: none;
  10. }
  11. ul {
  12. list-style: disc outside;
  13. }
  14. body {
  15. color: #212121;
  16. font: 400 16px/24px Roboto,sans-serif;
  17. margin: 0;
  18. padding: 0;
  19. -webkit-font-smoothing: antialiased;
  20. }
  21. /* The header */
  22. header {
  23. background-color: #009688;
  24. box-shadow: 0 0 4px rgba(0,0,0,.14), 0 4px 8px rgba(0,0,0,.28);
  25. overflow: hidden;
  26. padding-top: 84px;
  27. position: static;
  28. top: 0;
  29. width: 100%;
  30. z-index: 10005;
  31. }
  32. header h1 {
  33. color: white;
  34. display: inline-block;
  35. font: 34px/56px Roboto,sans-serif;
  36. letter-spacing: -.01em;
  37. margin: 0;
  38. max-width: 100%;
  39. overflow: hidden;
  40. padding: 0 24px;
  41. text-overflow: ellipsis;
  42. white-space: nowrap;
  43. vertical-align: top;
  44. margin-left: 25px;
  45. }
  46. header h1 a {
  47. color: white;
  48. }
  49. header a.closurelogo {
  50. left: 12px;
  51. pointer-events: none;
  52. position: absolute;
  53. top: 13px;
  54. transition: left .2s, top .2s;
  55. }
  56. header a.closurelogo div {
  57. height: 150px;
  58. width: 150px;
  59. transition: height .2s, opacity .2s, width .2s;
  60. }
  61. /* Horizontal nav buttons in the header */
  62. header nav {
  63. font-size: 13pt;
  64. height: 48px;
  65. overflow-y: hidden;
  66. padding: 0 24px 0 0;
  67. transition: margin-left .2s;
  68. width: 100%;
  69. }
  70. header nav .closurelogo {
  71. display: none;
  72. float: left;
  73. height: 20px;
  74. width: 20px;
  75. }
  76. header ul {
  77. list-style-type: none;
  78. margin: 0;
  79. padding: 0;
  80. }
  81. header li {
  82. display: inline-block;
  83. margin: 0;
  84. padding: 0;
  85. }
  86. header li a.active {
  87. border-bottom-color: white;
  88. color: white;
  89. }
  90. header li a {
  91. border-bottom: 2px solid transparent;
  92. border-top: 2px solid transparent;
  93. color: rgba(255, 255, 255, .7);
  94. display: inline-block;
  95. font: 500 14px/44px Roboto,sans-serif;
  96. margin: 0;
  97. outline: 0;
  98. padding: 0 24px;
  99. text-transform: uppercase;
  100. transition: color .2s;
  101. }
  102. header li a:hover {
  103. color: white;
  104. }
  105. /* Main div */
  106. header+div {
  107. margin-top: 24px;
  108. padding: 0 24px;
  109. }
  110. header+div nav.side {
  111. position: absolute;
  112. top: 212px;
  113. }
  114. header+div nav.toc.float {
  115. position: absolute;
  116. right: 24px;
  117. top: 212px;
  118. }
  119. /* Adjustments for header folding */
  120. .scrolled header {
  121. position: fixed;
  122. top: -140px;
  123. }
  124. .scrolled header nav {
  125. margin-left: 64px;
  126. }
  127. .scrolled header a.closurelogo {
  128. left: 18px;
  129. pointer-events: auto;
  130. position: absolute;
  131. top: 147px;
  132. padding: 0 12px;
  133. }
  134. .scrolled header a.closurelogo div {
  135. height: 32px;
  136. width: 32px;
  137. }
  138. .scrolled header a.closurelogo:hover div {
  139. opacity: 0.8;
  140. }
  141. .scrolled header+div {
  142. margin-top: 212px; /* 24 + 188 total height height */
  143. }
  144. .scrolled header+div nav.side {
  145. position: fixed;
  146. top: 72px;
  147. }
  148. .scrolled header+div nav.toc.float {
  149. position: fixed;
  150. right: 24px;
  151. top: 72px;
  152. }
  153. /* Vertical navs (side and toc) */
  154. nav.vertical ul {
  155. list-style-type: none;
  156. margin: 0;
  157. padding: 0;
  158. }
  159. nav.vertical li {
  160. line-height: 16px;
  161. margin: 8px 0 0;
  162. }
  163. nav.vertical li.heading {
  164. font-weight: 500;
  165. }
  166. nav.vertical li+li.heading {
  167. margin-top: 20px;
  168. }
  169. nav.vertical a.active {
  170. color: #03a9f4;
  171. }
  172. nav.vertical a:hover {
  173. color: #03a9f4;
  174. }
  175. nav.vertical a {
  176. color: #212121;
  177. }
  178. /* Side nav */
  179. nav.side {
  180. background: #f7f7f7;
  181. float: left;
  182. font-size: 13px;
  183. padding: 16px 12px 16px 16px;
  184. width: 228px;
  185. }
  186. /* TOCs */
  187. nav.toc {
  188. border-left: 4px solid #009688;
  189. font-size: 13px;
  190. padding-left: 12px;
  191. }
  192. nav.toc.float {
  193. float: right;
  194. width: 160px;
  195. }
  196. nav.toc.inline {
  197. display: none;
  198. margin: 20px 0 24px;
  199. }
  200. /* Main article */
  201. article {
  202. margin-left: 296px;
  203. margin-right: 188px;
  204. }
  205. article h1 {
  206. color: #757575;
  207. font: 400 34px/40px Roboto,sans-serif;
  208. letter-spacing: -.01em;
  209. margin: 24px 0 20px;
  210. }
  211. article h2 {
  212. border-bottom: 1px solid #ebebeb;
  213. font: 400 24px/32px Roboto,sans-serif;
  214. letter-spacing: -.01em;
  215. margin: 40px 0 20px;
  216. padding-bottom: 3px;
  217. }
  218. article nav+h2 {
  219. margin-top: 24px;
  220. }
  221. /* Footer buttons */
  222. footer {
  223. bottom: 0;
  224. display: block;
  225. height: 48px;
  226. left: 0;
  227. position: fixed;
  228. right: 0;
  229. transition: bottom .2s;
  230. z-index: 10005;
  231. }
  232. .down footer {
  233. bottom: -200px;
  234. }
  235. footer>a {
  236. bottom: 32px;
  237. display: none; /* overridden when there's an href */
  238. position: absolute;
  239. }
  240. footer>a[href] {
  241. display: block;
  242. }
  243. footer>a>div {
  244. background: #db4437;
  245. border-radius: 50%;
  246. box-shadow: 0 1px 4px rgba(0,0,0,.37);
  247. height: 36px;
  248. position: relative;
  249. transition: box-shadow .2s;
  250. width: 36px;
  251. }
  252. footer>a:hover>div {
  253. box-shadow: 0 2px 2px rgba(0,0,0,0.2),0 6px 10px rgba(0,0,0,.3);
  254. }
  255. footer>a>div>div:first-child {
  256. color:transparent;
  257. height: 24px;
  258. left: 6px;
  259. position: absolute;
  260. top: 6px;
  261. width: 24px;
  262. }
  263. footer>a>div>div:nth-child(2) {
  264. align-items: center;
  265. border-radius: 2px;
  266. box-shadow: 0 1px 4px rgba(0,0,0,.37);
  267. display: flex;
  268. flex-direction: column;
  269. font-size: 11px;
  270. left: 50%;
  271. opacity: 0;
  272. position: absolute;
  273. text-align: center;
  274. top: 100%;
  275. transition: opacity .2s;
  276. white-space: nowrap;
  277. width: 0;
  278. }
  279. footer>a:hover>div>div:nth-child(2) {
  280. opacity: 1;
  281. transition: opacity .2s .2s;
  282. }
  283. footer>a>div>div:nth-child(2)>div {
  284. background: rgba(0,0,0,.7);
  285. border-radius: 3px;
  286. color: white;
  287. line-height: 16px;
  288. padding: 0 5px;
  289. position: relative;
  290. top: 8px;
  291. }
  292. /* Edit button (specifically) */
  293. footer>a.edit>div>div:first-child {
  294. background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24" fill="#FFFFFF"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
  295. }
  296. footer>a.edit {
  297. right: 32px;
  298. }
  299. /* Closure logo */
  300. .closurelogo div {
  301. background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewPort="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg"><defs><clipPath id="c"><rect x="0" y="0" width="100" height="25"/><rect x="0" y="75" width="100" height="25" /><rect x="0" y="0" width="25" height="100" /><rect x="75" y="0" width="25" height="100" /></clipPath></defs><g clip-path="url(#c)"><circle cx="25" cy="25" r="20" stroke="none" fill="white" /><circle cx="75" cy="25" r="20" stroke="none" fill="white" /><circle cx="25" cy="75" r="20" stroke="none" fill="white" /><circle cx="75" cy="75" r="20" stroke="none" fill="white" /></g></svg>');
  302. background-size: cover;
  303. display: inline-block;
  304. opacity: 0.3;
  305. }
  306. /* Reactive adjustments for smaller screens */
  307. @media(max-width: 1200px) {
  308. nav.toc.float {
  309. display: none;
  310. }
  311. nav.toc.inline {
  312. display: block;
  313. }
  314. article {
  315. margin-right: 0;
  316. }
  317. }
  318. @media(max-width: 720px) {
  319. nav.side {
  320. display: none; /* TODO(sdh): collapse w/ roll-out instead of hide */
  321. }
  322. article {
  323. margin-left: 0;
  324. }
  325. }