style.scss 6.3 KB

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