style.scss 6.4 KB

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