-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
115 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
||
:root { | ||
color-scheme: dark; | ||
} | ||
|
||
body { | ||
@apply bg-zinc-900 text-zinc-100; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
} | ||
|
||
h3 code { | ||
@apply !text-lg md:!text-xl; | ||
} | ||
|
||
pre { | ||
@apply !px-0 rounded-lg; | ||
} | ||
|
||
code { | ||
@apply text-sm md:text-base !leading-loose; | ||
} | ||
|
||
pre > code { | ||
counter-reset: line; | ||
} | ||
|
||
code[data-theme*=' '], | ||
code[data-theme*=' '] span { | ||
color: var(--shiki-light); | ||
background-color: var(--shiki-light-bg); | ||
} | ||
|
||
@media (prefers-color-scheme: dark) { | ||
code[data-theme*=' '], | ||
code[data-theme*=' '] span { | ||
color: var(--shiki-dark); | ||
background-color: var(--shiki-dark-bg); | ||
} | ||
} | ||
|
||
code[data-line-numbers] { | ||
counter-reset: line; | ||
} | ||
|
||
code[data-line-numbers] > [data-line]::before { | ||
counter-increment: line; | ||
content: counter(line); | ||
@apply inline-block w-4 mr-4 text-right text-gray-500; | ||
} | ||
|
||
.prose { | ||
@apply max-w-[55rem] sm:text-lg md:text-xl !leading-7 sm:!leading-9; | ||
} | ||
|
||
pre [data-line] { | ||
@apply px-4 border-l-2 border-l-transparent; | ||
} | ||
|
||
[data-highlighted-line] { | ||
background: rgba(200, 200, 255, 0.1); | ||
@apply border-l-blue-400; | ||
} | ||
|
||
[data-highlighted-chars] { | ||
@apply bg-zinc-600/50 rounded; | ||
box-shadow: 0 0 0 4px rgb(82 82 91 / 0.5); | ||
} | ||
|
||
[data-chars-id] { | ||
@apply shadow-none p-1 border-b-2; | ||
} | ||
|
||
[data-chars-id] span { | ||
@apply !text-inherit; | ||
} | ||
|
||
[data-chars-id='v'] { | ||
@apply !text-pink-300 bg-rose-800/50 border-b-pink-600 font-bold; | ||
} | ||
|
||
[data-chars-id='s'] { | ||
@apply !text-yellow-300 bg-yellow-800/50 border-b-yellow-600 font-bold; | ||
} | ||
|
||
[data-chars-id='i'] { | ||
@apply !text-purple-200 bg-purple-800/50 border-b-purple-600 font-bold; | ||
} | ||
|
||
[data-rehype-pretty-code-title] { | ||
@apply bg-zinc-700 text-zinc-200 rounded-t-lg py-2 px-3 font-semibold text-sm; | ||
} | ||
|
||
figure[data-rehype-pretty-code-figure]:has(> [data-rehype-pretty-code-title]) | ||
pre { | ||
@apply !rounded-t-none; | ||
} | ||
|
||
figure { | ||
@apply mb-6 mt-1; | ||
} | ||
pre, | ||
code, | ||
figure { | ||
@apply overflow-x-auto; | ||
} | ||
p { | ||
@apply text-xl; | ||
} | ||
article p { | ||
@apply leading-9; | ||
} |