|
| 1 | +html { |
| 2 | + /* scroll-padding-top: 50vh; */ |
| 3 | + scroll-behavior: smooth; |
| 4 | + |
| 5 | + background: #0d1117; |
| 6 | + color: #c9d1d9; |
| 7 | + |
| 8 | + color-scheme: dark; |
| 9 | +} |
| 10 | + |
| 11 | +body { |
| 12 | + margin: 0; |
| 13 | + padding: 0; |
| 14 | +} |
| 15 | + |
| 16 | +a { |
| 17 | + color: #ff9bce; |
| 18 | +} |
| 19 | + |
| 20 | +main { |
| 21 | + max-width: 1000px; |
| 22 | + margin: 0 auto; |
| 23 | + padding: 0 1rem; |
| 24 | + font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, |
| 25 | + Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; |
| 26 | + line-height: 1.6; |
| 27 | +} |
| 28 | + |
| 29 | +.ch-scrollycoding-static { |
| 30 | + max-width: 620px; |
| 31 | + margin: 0 auto; |
| 32 | +} |
| 33 | + |
| 34 | +@media (max-width: 1060px) { |
| 35 | + .ch-static-toggle { |
| 36 | + display: none; |
| 37 | + } |
| 38 | +} |
| 39 | + |
| 40 | +section:not(.ch-scrollycoding-static) .ch-code-buttons { |
| 41 | + display: none; |
| 42 | +} |
| 43 | + |
| 44 | +section:not(.ch-scrollycoding-static) nav { |
| 45 | + position: absolute; |
| 46 | + height: 100%; |
| 47 | + top: min(calc(50% - 50vh), -4px); |
| 48 | + width: 0; |
| 49 | +} |
| 50 | + |
| 51 | +section.ch-scrollycoding-static nav { |
| 52 | + position: absolute; |
| 53 | + transform: translateY(-80px); |
| 54 | + width: 0; |
| 55 | +} |
| 56 | + |
| 57 | +table { |
| 58 | + margin: 0 -1rem; |
| 59 | + background: #0d1117; |
| 60 | + width: calc(100% + 2rem); |
| 61 | + padding: 0 1rem; |
| 62 | +} |
| 63 | + |
| 64 | +.custom-mark { |
| 65 | + background: rgba(210, 168, 255, 0.2) !important; |
| 66 | +} |
| 67 | + |
| 68 | +/* code hike */ |
| 69 | + |
| 70 | +.ch-scrollycoding { |
| 71 | + flex-direction: row-reverse; |
| 72 | + margin: 0; |
| 73 | + --ch-scrollycoding-sticker-width: 550px; |
| 74 | + --ch-scrollycoding-code-min-height: 100vh; |
| 75 | +} |
| 76 | + |
| 77 | +.ch-scrollycoding-static .ch-codeblock { |
| 78 | + box-shadow: 0 0 0 1px #fff1; |
| 79 | +} |
| 80 | + |
| 81 | +.ch-code-scroll-parent { |
| 82 | + line-height: 20px; |
| 83 | +} |
| 84 | + |
| 85 | +.ch-scrollycoding-step-content { |
| 86 | + position: relative; |
| 87 | + padding: 1rem 1rem; |
| 88 | + background: #0d1117; |
| 89 | + margin-bottom: 1rem; |
| 90 | + opacity: 0.65; |
| 91 | + -webkit-transition: background-color 400ms ease-in-out; |
| 92 | + -ms-transition: background-color 400ms ease-in-out; |
| 93 | + transition: background-color 400ms ease-in-out; |
| 94 | +} |
| 95 | +.ch-scrollycoding-step-content[data-selected='true'] { |
| 96 | + border: 1px solid #fff1; |
| 97 | + background: #161b22; |
| 98 | + opacity: 1; |
| 99 | +} |
| 100 | + |
| 101 | +.ch-code-inline-link { |
| 102 | + text-decoration-style: dashed; |
| 103 | + text-decoration-color: #ff9bce; |
| 104 | + text-underline-offset: 3px; |
| 105 | + text-decoration-thickness: 1px; |
| 106 | +} |
| 107 | + |
| 108 | +.ch-code-inline-link:hover * { |
| 109 | + color: #ffcee7 !important; |
| 110 | +} |
| 111 | + |
| 112 | +.ch-scrollycoding-step-content:first-child { |
| 113 | + margin-top: max(calc(50vh - 247px), 1rem); |
| 114 | +} |
| 115 | +.ch-scrollycoding-step-content:last-child { |
| 116 | + margin-bottom: max(calc(50vh - 110px), 1rem); |
| 117 | +} |
| 118 | + |
| 119 | +.ch-scrollycoding-content { |
| 120 | + padding-left: 1rem; |
| 121 | + min-width: 0; |
| 122 | +} |
| 123 | +.ch-scrollycoding-content .ch-codeblock { |
| 124 | + border-radius: 0; |
| 125 | + margin: 0 -1rem; |
| 126 | +} |
| 127 | +.ch-scrollycoding-sticker { |
| 128 | + top: 0; |
| 129 | + max-height: 100vh; |
| 130 | +} |
| 131 | + |
| 132 | +.ch-codeblock, |
| 133 | +.ch-codegroup, |
| 134 | +.ch-preview { |
| 135 | + box-shadow: none; |
| 136 | +} |
| 137 | + |
| 138 | +.ch-slideshow-slide { |
| 139 | + aspect-ratio: unset; |
| 140 | +} |
| 141 | +.ch-slideshow-notes { |
| 142 | + border: none; |
| 143 | + margin-top: 0 !important; |
| 144 | + padding-right: 0 !important; |
| 145 | + padding-left: 0 !important; |
| 146 | +} |
| 147 | +.ch-slideshow-note { |
| 148 | + display: none; |
| 149 | +} |
| 150 | + |
| 151 | +.break-all .ch-inline-code > code > * { |
| 152 | + word-break: break-all; |
| 153 | +} |
0 commit comments