style.scss 6.0 KB

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