style.css 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. .pr-6 {
  2. padding-right:1.5rem
  3. }
  4. /* Utilities missing from the prebuilt tailwind.css */
  5. /* Post list headlines, matching the prose h1 size (2.25rem / 1.111) */
  6. .text-4xl {
  7. font-size:2.25rem;
  8. line-height:2.5rem
  9. }
  10. .anchor svg {
  11. display:inline;
  12. }
  13. .dark .toc-wrapper {
  14. background-color: var(--tw-prose-pre-bg)!important;
  15. border-color: rgb(55 65 81/var(--tw-divide-opacity))!important;
  16. }
  17. .toc-wrapper a,
  18. .related-posts a,
  19. .recent-posts a {
  20. text-decoration: none;
  21. }
  22. .toc-link a {
  23. display:none;
  24. }
  25. .toc-link:hover a{
  26. display:inline-block;
  27. }
  28. .tags a {
  29. margin-right: .75rem;
  30. }
  31. .category a {
  32. margin-right: .1rem;
  33. }
  34. .category {
  35. line-height:3.2rem;
  36. }
  37. .read-more {
  38. text-decoration:inherit;
  39. }
  40. .nav-top li {
  41. display:inline-block;
  42. margin-left: 1.5rem;
  43. font-weight: 500;
  44. }
  45. .nav-mobile li{
  46. outline-width: 0;
  47. outline-style: solid;
  48. letter-spacing: .1em;
  49. font-weight: 700;
  50. font-size: 1.5rem;
  51. line-height: 2rem;
  52. padding-right: 1rem;
  53. padding-top: .5rem;
  54. padding-bottom: .5rem;
  55. margin-bottom: 1rem;
  56. }
  57. .menu-mobile {
  58. display:none;
  59. }
  60. @media (max-width: 640px) {
  61. .nav-top {
  62. display:none;
  63. }
  64. .is-menu-open .menu-mobile {
  65. display:block!important;
  66. }
  67. }
  68. .search-form {
  69. display:none;
  70. }
  71. .is-search-open .search-form {
  72. display: flex;
  73. }
  74. .tags a:hover {
  75. color:rgb(190 24 93);
  76. }
  77. .dark .tags a:hover {
  78. color:rgb(244 114 182);
  79. }
  80. .thumbnail {
  81. position:relative;
  82. display:block;
  83. }
  84. .nav li > ul {
  85. display:none;
  86. }
  87. .footnotes {
  88. margin-top:0;
  89. border:none;
  90. }
  91. .footnotes ol {
  92. margin-bottom:0;
  93. padding-top: 1.5em;
  94. }
  95. .footnotes > hr {
  96. margin:0;
  97. }
  98. .thumb-icon {
  99. background: rgba(0,0,0,0.7);
  100. color: #fff;
  101. text-align: center;
  102. display: block;
  103. width: 32px;
  104. height: 32px;
  105. position: absolute;
  106. bottom: 50%;
  107. left: 50%;
  108. margin-left: -16px;
  109. margin-bottom: -16px;
  110. -webkit-border-radius: 4px;
  111. border-radius: 4px;
  112. -moz-transition: all 0.7s ease;
  113. -webkit-transition: all 0.7s ease;
  114. transition: all 0.7s ease;
  115. }
  116. .thumb-icon svg {
  117. margin: 1px 0 0 2px;
  118. }
  119. .thumbnail:hover .thumb-icon {
  120. background: #fff;
  121. color: #333;
  122. }
  123. .recent-posts > ul {
  124. padding-left: 15px;
  125. }
  126. /* Copy to clipboard button on code blocks */
  127. .prose pre:has(code) {
  128. position: relative;
  129. }
  130. .prose pre .copy-code {
  131. position: absolute;
  132. top: .4rem;
  133. right: .4rem;
  134. padding: .35rem;
  135. border: none;
  136. border-radius: 6px;
  137. background-color: transparent;
  138. color: rgb(156 163 175);
  139. line-height: 0;
  140. cursor: pointer;
  141. opacity: 0;
  142. transition: opacity .2s ease, background-color .2s ease, color .2s ease;
  143. }
  144. .prose pre .copy-code svg {
  145. display: block;
  146. width: 1.05rem;
  147. height: 1.05rem;
  148. margin: 0;
  149. }
  150. .prose pre:hover .copy-code,
  151. .prose pre .copy-code:focus-visible {
  152. opacity: .75;
  153. }
  154. .prose pre .copy-code:hover {
  155. opacity: 1;
  156. color: rgb(243 244 246);
  157. background-color: rgb(75 85 99);
  158. }
  159. /* Touch devices have no hover, so keep the button visible. */
  160. @media (hover: none) {
  161. .prose pre .copy-code {
  162. opacity: 1;
  163. }
  164. }
  165. /* "AI was used" marker next to the byline */
  166. .ai-badge {
  167. position: relative;
  168. display: inline-block;
  169. cursor: help;
  170. line-height: 1;
  171. vertical-align: middle;
  172. }
  173. .ai-badge-tip {
  174. position: absolute;
  175. bottom: calc(100% + .5rem);
  176. left: 50%;
  177. transform: translateX(-50%);
  178. z-index: 20;
  179. width: max-content;
  180. max-width: 15rem;
  181. padding: .35rem .6rem;
  182. border-radius: .375rem;
  183. font-size: .75rem;
  184. line-height: 1rem;
  185. font-weight: 400;
  186. text-align: center;
  187. color: rgb(243 244 246);
  188. background-color: rgb(31 41 55);
  189. box-shadow: 0 4px 6px -1px rgb(0 0 0/.1), 0 2px 4px -2px rgb(0 0 0/.1);
  190. opacity: 0;
  191. visibility: hidden;
  192. transition: opacity .15s ease;
  193. }
  194. .dark .ai-badge-tip {
  195. color: rgb(31 41 55);
  196. background-color: rgb(229 231 235);
  197. }
  198. /* The arrow pointing down at the emoji. */
  199. .ai-badge-tip::after {
  200. content: "";
  201. position: absolute;
  202. top: 100%;
  203. left: 50%;
  204. margin-left: -.25rem;
  205. border: .25rem solid transparent;
  206. border-top-color: rgb(31 41 55);
  207. }
  208. .dark .ai-badge-tip::after {
  209. border-top-color: rgb(229 231 235);
  210. }
  211. .ai-badge:hover .ai-badge-tip,
  212. .ai-badge:focus .ai-badge-tip,
  213. .ai-badge:focus-visible .ai-badge-tip {
  214. opacity: 1;
  215. visibility: visible;
  216. }