style.scss 6.4 KB

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