style.scss 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444
  1. @import "predefined.scss", "syntax.scss";
  2. *,
  3. ::before,
  4. ::after {
  5. box-sizing: border-box;
  6. }
  7. html {
  8. -moz-tab-size: 4;
  9. tab-size: 4;
  10. scroll-behavior: smooth;
  11. }
  12. body {
  13. --c-bg: #f3f6f6;
  14. --c-bg-alt: #dee8e5;
  15. --c-txt: #545250;
  16. --c-txt-alt: #72706e;
  17. --c-txt-alt2: rgba(114, 112, 110, .3);
  18. --c-txt-em: #000;
  19. margin: 0;
  20. padding: 1.5rem;
  21. line-height: 1.6;
  22. letter-spacing: .05rem;
  23. >main {
  24. margin-bottom: 5rem;
  25. }
  26. >section,
  27. >nav,
  28. >footer {
  29. margin-block: 5rem;
  30. }
  31. }
  32. body,
  33. button,
  34. input,
  35. select,
  36. textarea {
  37. color: var(--c-txt);
  38. background-color: var(--c-bg);
  39. font-family: $fonts;
  40. transition: color .5s, background-color .5s, border-color .5s;
  41. }
  42. // Auto light/dark mode
  43. @media (prefers-color-scheme: dark) {
  44. body {
  45. --c-bg: #1e1f20;
  46. --c-bg-alt: #313a3f;
  47. --c-txt: #b1aeaa;
  48. --c-txt-alt: #898680;
  49. --c-txt-alt2: rgba(137, 134, 128, .5);
  50. --c-txt-em: #fff;
  51. }
  52. main img {
  53. filter: brightness(.9);
  54. transition: filter .3s;
  55. &:hover {
  56. filter: none;
  57. }
  58. }
  59. }
  60. // Layouts
  61. //
  62. .wrapper {
  63. max-width: 50rem;
  64. margin-inline: auto;
  65. }
  66. h1 {
  67. margin-top: .5rem;
  68. margin-bottom: 2rem;
  69. }
  70. #home-social a {
  71. margin-right: .75rem;
  72. }
  73. .recent-posts-list {
  74. li {
  75. margin-top: .25rem;
  76. }
  77. span {
  78. margin-right: .5em;
  79. color: var(--c-txt-alt);
  80. }
  81. a {
  82. display: block;
  83. }
  84. }
  85. .site-footer {
  86. font-size: 75%;
  87. }
  88. // Global style
  89. //
  90. h1,
  91. h2,
  92. h3,
  93. h4,
  94. h5,
  95. h6 {
  96. font-weight: bold;
  97. font-family: $serif-fonts;
  98. }
  99. ul,
  100. ol {
  101. padding-inline-start: 2em;
  102. }
  103. // lsn -> list-style: none
  104. ul.lsn {
  105. list-style: none;
  106. padding-inline-start: 0;
  107. }
  108. // lsc -> list-style: circle
  109. ul.lsc {
  110. list-style: circle;
  111. }
  112. // tdln -> text-decoration-line: none
  113. a.tdln,
  114. .tdln a {
  115. text-decoration-line: none;
  116. }
  117. .dim {
  118. color: var(--c-txt-alt)
  119. }
  120. .dimmer {
  121. color: var(--c-txt-alt2)
  122. }
  123. a {
  124. color: var(--c-txt);
  125. text-decoration-color: var(--c-txt-alt2);
  126. text-decoration-thickness: 1px;
  127. text-underline-offset: 0.25em;
  128. transition: color .3s, text-decoration-color .3s;
  129. &:hover {
  130. color: $accent;
  131. text-decoration-color: $accent;
  132. }
  133. &:active {
  134. text-decoration-style: dashed;
  135. }
  136. &.home {
  137. text-decoration: none;
  138. color: var(--c-txt);
  139. }
  140. }
  141. pre,
  142. code,
  143. pre tt {
  144. font-family: $mono-fonts;
  145. letter-spacing: normal;
  146. }
  147. pre {
  148. padding: .7em 1.1em;
  149. overflow: auto;
  150. font-size: 90%;
  151. line-height: 1.2;
  152. white-space: pre;
  153. background-color: var(--c-bg-alt);
  154. code {
  155. padding: 0;
  156. margin: 0;
  157. background: transparent;
  158. }
  159. }
  160. code {
  161. background: var(--c-bg-alt);
  162. padding: 0 3px;
  163. margin: 0 4px;
  164. }
  165. blockquote {
  166. margin: 1.5em 1em;
  167. font-style: italic;
  168. font-family: $serif-fonts;
  169. letter-spacing: normal;
  170. color: var(--c-txt-alt);
  171. &::before {
  172. content: "“";
  173. position: absolute;
  174. z-index: -1;
  175. line-height: 1;
  176. font-size: 5rem;
  177. transform: translate(-1rem, -1rem);
  178. color: var(--c-bg-alt);
  179. }
  180. p {
  181. margin-left: 1.5em;
  182. }
  183. cite {
  184. font-weight: bold;
  185. font-style: normal;
  186. margin-left: 1em;
  187. &::before {
  188. content: "—— ";
  189. }
  190. }
  191. }
  192. table {
  193. border-collapse: collapse;
  194. border-spacing: 0;
  195. empty-cells: show;
  196. width: 100%;
  197. max-width: 100%;
  198. th,
  199. td {
  200. padding: 1.5%;
  201. border: 1px solid;
  202. }
  203. th {
  204. font-weight: bold;
  205. vertical-align: bottom;
  206. }
  207. }
  208. hr {
  209. width: auto;
  210. height: 2rem;
  211. margin-top: 2rem;
  212. border: none;
  213. text-align: center;
  214. color: var(--c-bg-alt);
  215. &::after {
  216. content: "* * *";
  217. display: block;
  218. font-size: 1.5rem;
  219. }
  220. }
  221. button,
  222. [type=button],
  223. [type=reset],
  224. [type=submit] {
  225. border: 1px solid var(--c-txt-alt);
  226. &:hover {
  227. border-color: $accent;
  228. }
  229. &:active {
  230. border-style: dashed;
  231. }
  232. }
  233. input[type=text],
  234. input[type=email],
  235. input[type=url] {
  236. width: 100%;
  237. border: 1px solid var(--c-txt-alt);
  238. border-width: 0 0 1px 0;
  239. background-color: transparent;
  240. }
  241. textarea {
  242. width: 100%;
  243. max-width: 100%;
  244. padding: 2px 6px;
  245. border: 1px solid var(--c-txt-alt);
  246. background-color: transparent;
  247. }
  248. .feather {
  249. display: inline-block;
  250. vertical-align: -.125em;
  251. width: 1em;
  252. height: 1em;
  253. }
  254. .content {
  255. text-justify: inter-ideograph; //For IE/Edge
  256. overflow-wrap: break-word;
  257. figure {
  258. height: auto;
  259. margin: 0;
  260. text-align: center;
  261. }
  262. figcaption>p {
  263. margin-top: .1rem;
  264. margin-bottom: 1rem;
  265. font-size: 75%;
  266. font-style: italic;
  267. color: var(--c-txt-alt);
  268. }
  269. figure.left {
  270. float: left;
  271. margin-right: 1em;
  272. max-width: 50%;
  273. }
  274. figure.right {
  275. float: right;
  276. margin-left: 1em;
  277. max-width: 50%;
  278. }
  279. img {
  280. display: inline-block;
  281. max-width: 100%;
  282. height: auto;
  283. margin: auto;
  284. }
  285. video,
  286. iframe {
  287. max-width: 100%;
  288. }
  289. }
  290. .post-info {
  291. margin-top: -2rem;
  292. font-size: 90%;
  293. font-style: italic;
  294. }
  295. .footnotes {
  296. font-size: 75%;
  297. p {
  298. margin: 0;
  299. }
  300. hr::after {
  301. content: "# FOOTNOTES #";
  302. font-size: 1rem;
  303. }
  304. }
  305. a.footnote-backref {
  306. text-decoration: none;
  307. }
  308. a.footnote-ref {
  309. padding: 1px 2px;
  310. line-height: normal;
  311. font-size: 80%;
  312. border-radius: 2px;
  313. text-decoration: none;
  314. background-color: var(--c-bg-alt);
  315. transition-property: background-color;
  316. &:hover {
  317. color: $accent;
  318. }
  319. }
  320. .post-footer {
  321. margin-top: 3rem;
  322. font-size: 75%;
  323. }
  324. .post-tag {
  325. margin-right: .5em;
  326. margin-bottom: .5rem;
  327. &::before {
  328. content: "#";
  329. }
  330. }
  331. .post-group {
  332. margin-top: 2rem;
  333. }
  334. .post-year {
  335. margin-bottom: .5rem;
  336. line-height: normal;
  337. font-size: 150%;
  338. }
  339. .post-list {
  340. margin: 0;
  341. }
  342. .post-item {
  343. display: flex;
  344. margin-bottom: .25rem;
  345. }
  346. .post-day {
  347. display: inline-block;
  348. min-width: 4.5em;
  349. }
  350. @import "partials/comments.scss";
  351. @media all and (min-width: 550px) {
  352. .post-group {
  353. display: flex;
  354. gap: 1.5rem;
  355. }
  356. .recent-posts-list a {
  357. display: inline;
  358. }
  359. }
  360. @media all and (min-width: 992px) {
  361. h1 {
  362. margin-top: 3rem;
  363. }
  364. }
  365. @media all and (min-width: 1400px) {
  366. h1 {
  367. margin-top: 7rem;
  368. }
  369. }