style.css 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498
  1. @import "reset.css";
  2. /*
  3. THIS CSS FILE DOES NOT CONTAIN ANY COLOR/BACKGROUND DEFINITIONS
  4. ALL DEFAULT STYLES ARE FOR THE SMALLEST DEVICE, A SMARTPHONE THAT REGISTERS AS min-width 320px AND LESS THAN 29em
  5. OR A DESKTOP BROWSER RESIZED TO 320px WIDTH
  6. */
  7. * {
  8. box-sizing: border-box;
  9. }
  10. html,body {
  11. height:100%;
  12. width:100%;
  13. }
  14. body {
  15. font-family: sans-serif;
  16. /* footer stay down, even with dynamic footer height:; stackoverflow.com/a/20352949 */
  17. display: flex;
  18. flex-direction: column;
  19. }
  20. style,link {
  21. display: none;
  22. }
  23. /* WEBKIT SPECIFIC SCROLLBAR - width */
  24. ::-webkit-scrollbar { width: 0.9em; }
  25. /*HTML tags*/
  26. h1 {
  27. font-size: 2em;
  28. padding: 0.5em 0;
  29. line-height: 140%;
  30. font-weight: 600;
  31. }
  32. h2 {
  33. font-size: 2em;
  34. padding: 0.5em 0;
  35. line-height: 140%;
  36. }
  37. h3 {
  38. font-size: 1.4em;
  39. }
  40. h4 {
  41. font-size: 1.2em;
  42. }
  43. h3,h4 {
  44. padding-top: 0.5em;
  45. line-height: 130%;
  46. }
  47. article h1:first-child {
  48. font-size: 2.3em;
  49. padding: 0.5em 0 0.2em;
  50. line-height: 120%;
  51. }
  52. article .content h3::before, article .content h4::before, article .content h5::before {
  53. content: "~";
  54. opacity: 0.5;
  55. }
  56. #nounderline:hover {
  57. text-decoration: none;
  58. /*
  59. margin-right:0;
  60. letter-spacing:1px;
  61. font-style: italic;
  62. */
  63. }
  64. p, .paragraph {
  65. padding:0.5em 0;
  66. /*
  67. make sure paragraph stays within width constraints
  68. */
  69. word-wrap: break-word;
  70. }
  71. a:hover, a:active {
  72. text-decoration: underline;
  73. }
  74. a, a:visited {
  75. text-decoration: none;
  76. }
  77. /*
  78. make links in article a little bold
  79. */
  80. article a {
  81. font-weight: 600;
  82. }
  83. em,i {
  84. font-style: italic;
  85. }
  86. strong,b {
  87. font-weight: bold;
  88. }
  89. code,pre {
  90. font-family: monospace;
  91. /*
  92. white-space: pre-wrap;
  93. */
  94. word-wrap: break-word;
  95. }
  96. :not(pre) > code {
  97. line-height: 100%;
  98. padding: 0 0.2em;
  99. vertical-align: 0.05em;
  100. }
  101. :not(.four04) > pre {
  102. display: inline-block; /* stackoverflow.com/a/20673961 */
  103. line-height:130%;
  104. padding: 0.3em 0.2em 0.4em 0.2em;
  105. margin: 0.4em 100% 0.4em 0; /* stackoverflow.com/a/48459508 */
  106. border-width: 0.2em;
  107. border-style: solid;
  108. overflow: auto;
  109. max-width:100%;
  110. max-height: 19.3em; /* cut off in the middle of the line, to make it more obvious that that isn't all */
  111. /* allows user to select ALL text in code box with 1 click: */
  112. /*-webkit-user-select: all; /* Chrome 49+ */
  113. /*-moz-user-select: all; /* Firefox 43+ */
  114. /*-ms-user-select: all; /* No support yet */
  115. /*user-select: all; /* Likely future */
  116. }
  117. pre > code {
  118. display: block; /* stackoverflow.com/a/20673961 */
  119. }
  120. /*
  121. <pre><code>-boxes will expand to full size on hover (or tap on mobile)
  122. */
  123. pre:hover {
  124. max-height: initial;
  125. }
  126. blockquote {
  127. padding: 0.3em 0.3em 0.3em 0.7em;
  128. border-left-width: 0.6em;
  129. border-left-style: double;
  130. margin: 0.5em 0;
  131. font-size: 95%;
  132. line-height: 125%;
  133. }
  134. kbd {
  135. font-family: monospace;
  136. padding: 0.2em 0.3em 0.1em 0.3em;
  137. border-width: 0.2em;
  138. border-style: solid;
  139. border-radius: 0.2em;
  140. margin: 0.1em;
  141. }
  142. ul,ol {
  143. padding: .25em 0 .25em 1.5em;
  144. }
  145. li {
  146. padding-top: .2em;
  147. }
  148. hr {
  149. height: 0;
  150. border-width: 2px;
  151. border-style: solid;
  152. margin: 1.5em 0;
  153. }
  154. /*
  155. Display only for desktop type device widths
  156. */
  157. .desktop-device {
  158. display:none;
  159. }
  160. /*various elements*/
  161. header .inner, footer .inner {
  162. padding: .5em;
  163. }
  164. /*HEADER*/
  165. header .inner {
  166. position:relative;
  167. height:60px;
  168. padding-right: 56px; /*leave space for header image*/
  169. }
  170. header ul, nav ul {
  171. list-style: none;
  172. padding:0;
  173. }
  174. header ul li {
  175. float: left;
  176. padding: .8em .3em .8em 0;
  177. font-size: 1.2em;
  178. }
  179. header ul li:last-of-type {
  180. padding-right: 0;
  181. }
  182. header ul li a {
  183. padding: .8em .5em .5em 0;
  184. }
  185. header .inner img {
  186. height:100%;
  187. -ms-interpolation-mode: nearest-neighbor;
  188. image-rendering: -webkit-optimize-contrast;
  189. image-rendering: -webkit-crisp-edges;
  190. image-rendering: -moz-crisp-edges;
  191. image-rendering: -o-crisp-edges;
  192. image-rendering: pixelated;
  193. padding:0;
  194. position: absolute;
  195. right:0;
  196. top:0;
  197. }
  198. /*
  199. not enough horizontal space on mobile/portrait:
  200. */
  201. header .inner .title {
  202. display:none;
  203. }
  204. /* clickable menu*/
  205. input#menu-icon {
  206. display: none;
  207. }
  208. label[for="menu-icon"] {
  209. display: inline-block;
  210. width: 100%;
  211. padding:0.5em;
  212. text-decoration: underline;
  213. }
  214. input[type=checkbox] ~ label::before {
  215. content: "→"
  216. }
  217. input[type=checkbox]:checked ~ label::before {
  218. content: "←"
  219. }
  220. nav#menu-icon {
  221. display: none;
  222. list-style: none;
  223. padding: .5em;
  224. }
  225. input[type=checkbox]:checked ~ nav#menu-icon {
  226. display: inline-block;
  227. }
  228. .flexbox {
  229. display:flex;
  230. }
  231. .flexbox > *:first-child {
  232. align-self: center;
  233. flex: 1 0 auto;
  234. }
  235. .flexbox > *:last-child {
  236. align-self: center;
  237. flex: 0 1 auto;
  238. }
  239. .small, aside {
  240. line-height: 1.4em;
  241. font-size: 0.8em;
  242. }
  243. .small span {
  244. padding: 0 0.2em;
  245. }
  246. .tag_cloud > div {
  247. letter-spacing: .75em;
  248. font-size: 0.9em;
  249. font-weight: bold;
  250. }
  251. .tag_cloud ul {
  252. padding:0;
  253. word-break: break-all;
  254. line-height:140%;
  255. }
  256. .tag_cloud li {
  257. display: inline-block;
  258. padding: 0;
  259. margin-right: .1rem;
  260. }
  261. /* this is the tag count of the tag cloud */
  262. .tag_cloud li span {
  263. font-size:0.7rem; /*must be rem here!*/
  264. line-height:1;
  265. opacity:0.5;
  266. }
  267. .tag_cloud li a {
  268. padding: .2rem .2rem .2rem 0;
  269. display: block;
  270. }
  271. section#content > * {
  272. padding: .5em;
  273. }
  274. section#content {
  275. margin-bottom: 1.5em;
  276. }
  277. article {
  278. line-height: 1.4em;
  279. }
  280. article p.description {
  281. padding-top: 0;
  282. }
  283. article aside .tag {
  284. float:right;
  285. margin-left:0.5em;
  286. }
  287. article aside .date {
  288. float:left;
  289. }
  290. article aside .timeline {
  291. opacity:0.5;
  292. font-weight: 100;
  293. }
  294. article aside .author {
  295. float:left;
  296. margin-left:0.5em;
  297. }
  298. article.fullpage {
  299. margin-top: 1em;
  300. }
  301. article.fullpage aside {
  302. margin-bottom: 2em;
  303. }
  304. article img {
  305. width: 100%;
  306. float: none;
  307. }
  308. article img.right, article img.left {
  309. float: none;
  310. }
  311. .border {
  312. border-width: 0.2em;
  313. border-style: solid;
  314. }
  315. footer {
  316. margin-top: auto;
  317. }
  318. footer p a {
  319. padding: 0.5em 0.2em;
  320. }
  321. footer .right {
  322. margin-left: 1em;
  323. }
  324. .right {
  325. float:right;
  326. }
  327. .left {
  328. float:left;
  329. }
  330. li p {
  331. padding: 0;
  332. }
  333. /* Input Styles */
  334. input,
  335. textarea,
  336. select {
  337. border-width: 0.1em;
  338. border-style: solid;
  339. margin: 0;
  340. font-size: 100%;
  341. border-radius: 0;
  342. }
  343. input:focus,
  344. textarea:focus,
  345. select:focus {
  346. border-width: 0.1em;
  347. border-style: solid;
  348. }
  349. /* remove stupid red border - stackoverflow.com/a/6189446 */
  350. input:required, input:invalid {
  351. box-shadow:none;
  352. }
  353. .pagination {
  354. margin: 1em 0 0 0;
  355. position: relative;
  356. }
  357. .pagination .previous {
  358. float: left;
  359. }
  360. .pagination .next {
  361. float: right;
  362. }
  363. .pagination span:nth-child(2) {
  364. /* same logic for .previous and .next */
  365. margin-left: 0.5em;
  366. }
  367. .pagination .current {
  368. position: absolute;
  369. text-align: center;
  370. width:100%;
  371. z-index: -10;
  372. left:0;
  373. }
  374. /*------------CLEARFIX!----------------*/
  375. .clearfix:before,.clearfix:after {
  376. content: " ";
  377. display: table;
  378. }
  379. .clearfix:after {
  380. clear: both;
  381. }
  382. .clearfix {
  383. *zoom: 1;
  384. }
  385. /* ################################################
  386. * B R E A K P O I N T S S T A R T H E R E *
  387. * ################################################ */
  388. /*
  389. THIS IS WHAT MY PHONE REGISTERS AS IN LANDSCAPE MODE
  390. */
  391. @media screen and (min-width: 480px) and (max-width: 1023px) {
  392. header .inner, footer .inner, section#content > *, label[for="menu-icon"], nav#menu-icon {
  393. /*just adding a little horizontal spacing*/
  394. padding-left: 1em;
  395. }
  396. }
  397. /*
  398. NON-MOBILE DEVICES (ALSO LAPTOPS) USUALLY START AT THIS BREAKPOINT
  399. */
  400. @media screen and (min-width: 768px) {
  401. .mobile-device {
  402. display:none;
  403. }
  404. .desktop-device {
  405. display:initial;
  406. }
  407. :not(.four04) > pre {
  408. padding: 0.4em 1em 0.55em 0.7em; /* need to accomodate vert. scrollbar on the right */
  409. }
  410. header .inner {
  411. height:75px;
  412. }
  413. body > .inner {
  414. padding: 1em 0;
  415. }
  416. section#sidebar {
  417. float: left;
  418. width: 30%;
  419. }
  420. label[for="menu-icon"] {
  421. display:none;
  422. }
  423. nav#menu-icon {
  424. display: inline-block;
  425. position:initial;
  426. }
  427. section#content {
  428. float: right;
  429. width: 70%;
  430. padding-left: 0.5em;
  431. }
  432. .tag_cloud > div {
  433. font-size: 1rem;
  434. margin-bottom: .5em;
  435. }
  436. .tag_cloud li a {
  437. padding: .3rem .3rem .3rem 0;
  438. }
  439. article img {
  440. width: initial;
  441. margin: 0.25em 0.5em 0.25em 0;
  442. }
  443. article img.right, article img.left {
  444. max-width: 50%;
  445. }
  446. article img.right {
  447. float: right;
  448. margin: 0.3em 0 1em 1em;
  449. }
  450. article img.left {
  451. float: left;
  452. margin: 0.3em 1em 0.2em 0;
  453. }
  454. article h1:first-child {
  455. margin-right: .5em; /* it's not nice when it gets too close to the right edge */
  456. }
  457. }
  458. /*
  459. WIDE ENOUGH TO NOT USE 100% WIDTH
  460. */
  461. @media screen and (min-width: 1024px) {
  462. .inner {
  463. width:90%;
  464. margin: 0 auto;
  465. }
  466. header .inner img {
  467. left:50%;
  468. margin-left:-28px; /*half of image width*/
  469. }
  470. header .inner {
  471. padding-right: 0;
  472. }
  473. header .inner .title {
  474. display: initial;
  475. float: right;
  476. padding: .5em;
  477. font-size: 1.6em;
  478. }
  479. header .inner ul li {
  480. font-size: 1.3em;
  481. }
  482. }