123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621 |
- @import "predefined.scss", "syntax.scss";
- *,
- ::before,
- ::after {
- box-sizing: border-box;
- }
- @view-transition {
- navigation: auto;
- }
- @keyframes fade-in {
- from {
- opacity: 0;
- }
- }
- @keyframes fade-out {
- to {
- opacity: 0;
- }
- }
- @keyframes slide-in {
- from {
- transform: translateY(30px);
- }
- }
- @keyframes slide-out {
- to {
- transform: translateY(-30px);
- }
- }
- ::view-transition-old(root) {
- animation: 90ms cubic-bezier(0.4, 0, 1, 1) both fade-out, 300ms cubic-bezier(0.4, 0, 0.2, 1) both slide-out;
- }
- ::view-transition-new(root) {
- animation: 210ms cubic-bezier(0, 0, 0.2, 1) 90ms both fade-in, 300ms cubic-bezier(0.4, 0, 0.2, 1) both slide-in;
- }
- html {
- -moz-tab-size: 4;
- tab-size: 4;
- scroll-behavior: smooth;
- }
- body {
- --c-bg: #f3f6f6;
- --c-bg-alt: #dee8e5;
- --c-txt: #545250;
- --c-txt-alt: #72706e;
- --c-txt-alt2: rgba(114, 112, 110, .3);
- --c-txt-em: #333333;
- display: flex;
- justify-content: center;
- gap: 1rem;
- margin: 0;
- padding: 1rem;
- min-height: 100vh;
- min-height: 100dvh;
- line-height: 1.7;
- }
- body,
- button,
- input,
- select,
- textarea {
- color: var(--c-txt);
- background-color: var(--c-bg);
- font-family: $fonts-sans;
- transition: color .5s, background-color .5s, border-color .5s;
- }
- // Auto light/dark mode
- @media (prefers-color-scheme: dark) {
- body {
- --c-bg: #1c1f21;
- --c-bg-alt: #313a3f;
- --c-txt: #bababa;
- --c-txt-alt: #8f8f8f;
- --c-txt-alt2: rgba(140, 140, 140, .5);
- --c-txt-em: #dedede;
- }
- main img {
- filter: brightness(.9);
- transition: filter .3s;
- &:hover {
- filter: none;
- }
- }
- }
- // Global style
- //
- h1,
- h2,
- h3,
- h4,
- h5,
- h6 {
- font-weight: bold;
- font-family: var(--fonts-serif);
- margin-bottom: 1rem;
- }
- ul,
- ol {
- padding-inline-start: 1.25em;
- }
- li::marker {
- font-size: 90%;
- color: var(--c-txt-alt);
- }
- // lsn -> list-style: none
- .lsn {
- list-style: none;
- padding-inline-start: 0;
- margin: 0;
- }
- // tdln -> text-decoration-line: none
- .tdln,
- .tdln a {
- text-decoration-line: none;
- }
- .dim {
- color: var(--c-txt-alt)
- }
- .dimmer {
- color: var(--c-txt-alt2)
- }
- a {
- color: var(--c-txt);
- text-decoration-color: var(--c-txt-alt2);
- text-decoration-thickness: 1px;
- text-underline-offset: 0.25em;
- transition: color .3s, text-decoration-color .3s, border-color .3s;
- &:hover {
- color: $accent;
- text-decoration-color: $accent;
- }
- &:active {
- text-decoration-style: dashed;
- }
- }
- pre,
- code,
- pre tt {
- font-family: var(--fonts-mono);
- }
- pre {
- padding: .7em 1.1em;
- overflow: auto;
- font-size: 90%;
- line-height: 1.2;
- white-space: pre;
- background-color: var(--c-bg-alt);
- code {
- padding: 0;
- margin: 0;
- background: transparent;
- }
- }
- code {
- background: var(--c-bg-alt);
- padding: 0 3px;
- margin: 0 2px;
- }
- blockquote {
- margin: 1.5rem 1rem;
- font: italic 125% var(--fonts-serif);
- color: var(--c-txt-alt);
- &::before {
- content: "“";
- position: absolute;
- z-index: -1;
- line-height: 1;
- font-size: 500%;
- transform: translate(-1rem, -1rem);
- color: var(--c-bg-alt);
- }
- p {
- margin-left: 1.5em;
- }
- cite {
- font-weight: bold;
- font-style: normal;
- font-size: 75%;
- &::before {
- content: "― ";
- }
- }
- }
- table {
- border-collapse: collapse;
- border-spacing: 0;
- empty-cells: show;
- width: 100%;
- max-width: 100%;
- th,
- td {
- padding: 1.5%;
- border: 1px solid var(--c-txt-alt2);
- }
- th {
- font-weight: bold;
- vertical-align: bottom;
- background-color: var(--c-bg-alt);
- }
- }
- hr {
- width: auto;
- height: 2rem;
- border: none;
- text-align: center;
- color: var(--c-txt-alt2);
- margin-left: 0;
- &::after {
- content: "* * *";
- display: block;
- font-size: 150%;
- }
- }
- button,
- [type=button],
- [type=reset],
- [type=submit] {
- border: 1px solid var(--c-txt-alt);
- &:hover {
- border-color: $accent;
- }
- &:active {
- border-style: dashed;
- }
- }
- input[type=text],
- input[type=email],
- input[type=url] {
- width: 100%;
- border: 1px solid var(--c-txt-alt);
- border-width: 0 0 1px 0;
- background-color: transparent;
- }
- textarea {
- width: 100%;
- max-width: 100%;
- padding: 2px 6px;
- border: 1px solid var(--c-txt-alt);
- background-color: transparent;
- }
- .feather {
- display: inline-block;
- vertical-align: -.125em;
- width: 1em;
- height: 1em;
- }
- // Layouts
- //
- .wrapper {
- max-width: 48rem;
- width: 100%;
- margin: auto;
- display: flex;
- flex-direction: column;
- flex-grow: 1;
- >main {
- flex-grow: 1;
- }
- }
- .site-header {
- display: none;
- border-right: 2px solid var(--c-bg-alt);
- color: var(--c-txt-alt);
- a {
- text-decoration: none;
- }
- }
- .header-inner {
- view-transition-name: site-header;
- }
- .site-nav {
- margin: 0 0 2em;
- padding-right: 1rem;
- a {
- display: block;
- padding: .25em 0;
- border-bottom: 1px dotted var(--c-bg-alt);
- }
- }
- .active {
- &::after {
- content: '※';
- float: right;
- margin-left: 1em;
- color: var(--c-txt-alt2);
- }
- }
- #TableOfContents {
- margin-top: -.75em;
- font-size: 90%;
- ul {
- padding-right: 1rem;
- }
- a {
- display: block;
- }
- }
- .back-btn {
- font-size: 125%;
- }
- h1 {
- margin: 0 0 .25rem;
- font-size: 162.5%;
- line-height: 1.4;
- }
- .section {
- margin-top: 2rem;
- }
- .section-title {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding-bottom: .25rem;
- border-bottom: 1px dashed var(--c-bg-alt);
- h2 {
- margin: 0;
- }
- >object {
- text-align: right;
- >a {
- display: block;
- }
- }
- }
- a.section-title:hover {
- border-color: $accent;
- }
- .post-item {
- display: flex;
- justify-content: space-between;
- align-items: center;
- gap: 1rem;
- padding: .5em 0;
- border-bottom: 1px dashed var(--c-bg-alt);
- transition: border-color .3s;
- &:hover {
- border-color: $accent;
- }
- }
- .post-title {
- flex: 1;
- }
- .home-photo-group {
- display: flex;
- gap: .5em;
- overflow-x: hidden;
- flex-grow: 1;
- &::after {
- content: "";
- display: block;
- flex-grow: 1;
- }
- .home-photo-item {
- max-height: 50px;
- width: auto;
- }
- }
- .site-footer {
- padding-top: .5rem;
- margin-top: 3rem;
- border-top: 2px solid var(--c-bg-alt);
- font-size: 80%;
- }
- .description {
- font-size: 75%;
- font-style: italic;
- }
- .post-info {
- width: 14rem;
- max-width: 100%;
- padding-top: .5em;
- margin-bottom: 1em;
- font-size: 75%;
- border-top: 2px solid var(--c-bg-alt);
- }
- .post-tag {
- margin-right: .5em;
- margin-bottom: .5rem;
- &::before {
- content: "#";
- }
- }
- .content {
- text-justify: inter-ideograph; //For IE/Edge
- overflow-wrap: break-word;
- figure {
- height: auto;
- margin: 0 0 .25rem;
- text-align: center;
- }
- figcaption>p {
- margin: 0;
- font-size: 75%;
- color: var(--c-txt-alt);
- &::before {
- content: "↑";
- margin-right: .25em;
- color: var(--c-txt-alt2);
- }
- }
- figure.left {
- float: left;
- margin-right: 1em;
- max-width: 40%;
- text-align: left;
- }
- figure.right {
- float: right;
- margin-left: 1em;
- max-width: 40%;
- text-align: right;
- }
- img {
- display: inline-block;
- max-width: 100%;
- height: auto;
- margin: auto;
- }
- video,
- iframe {
- max-width: 100%;
- height: auto;
- }
- }
- .footnotes {
- font-size: 80%;
- margin-top: 1.5rem;
- p {
- margin: 0;
- }
- hr::after {
- content: "# FOOTNOTES #";
- font-size: 1rem;
- }
- }
- a.footnote-backref {
- text-decoration: none;
- }
- a.footnote-ref {
- font-size: 80%;
- text-decoration: none;
- &::before {
- content: "[";
- }
- &::after {
- content: "]";
- }
- &:hover {
- color: $accent;
- }
- }
- .post-footer {
- margin-top: 3rem;
- font-size: 80%;
- }
- // list.html for Photo section
- //
- .album-row {
- display: flex;
- flex-wrap: wrap;
- gap: .5em;
- margin-top: .5em;
- }
- .img-tile {
- height: 100px;
- width: auto;
- max-width: 100%;
- object-fit: cover;
- }
- @import "partials/comments";
- @media all and (min-width: 55em) {
- body {
- padding-top: 3rem;
- }
- }
- @media all and (min-width: 81em) {
- .back-btn {
- display: none;
- }
- .site-header {
- display: block;
- flex-basis: 14rem;
- }
- .header-inner {
- position: sticky;
- top: 1rem;
- }
- .wrapper {
- flex-basis: 63rem;
- max-width: 63rem;
- margin: 0;
- }
- .content>* {
- max-width: 48rem;
- }
- .content>figure.big {
- max-width: 100%;
- margin: 1rem 0;
- text-align: left;
- }
- .content>.highlight,
- .content>pre,
- .content>table {
- max-width: 100%;
- }
- .post-info.writing {
- float: right;
- padding-top: 0;
- border-top: none;
- border-left: 2px solid var(--c-bg-alt);
- >li {
- padding-left: 1em;
- }
- }
- }
|