Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions assets/css/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,7 @@ input[type="search"]::-ms-clear {
color: var(--color-blue-400);
}
}

code{
font-size:0.9em;
}
53 changes: 19 additions & 34 deletions assets/css/utilities.css
Original file line number Diff line number Diff line change
Expand Up @@ -138,50 +138,35 @@
}

@utility prose {
.highlight,
:not(pre) > code {
font-size: 0.875em;
border: 1px solid;
border-radius: 0.25rem; /* theme("spacing.1") fallback */
border: none;
background: transparent;
&::before,
&::after {
content: none !important;
}
}

:not(pre) > code {
background: var(--tw-prose-code-bg);
.dark & {
background: var(--tw-prose-code-bg-dark);
}
display: inline-block;
margin: 0;
font-weight: 400;
overflow-wrap: anywhere;
padding: 0 4px;
}

table:not(.lntable) code {
overflow-wrap: unset;
white-space: nowrap;
}

/* Indented code blocks */
pre:not(.chroma) {
@apply my-4 overflow-x-auto p-3;
/* code in `inline code` style */
:where(code):not(:where([class~="not-prose"],[class~="not-prose"] *)),
a>code {
font-size: 0.875em;
border: 1px solid;
border-radius: 0.25rem; /* theme("spacing.1") fallback */
background: var(--color-white-main);
border-color: var(--color-gray-300);
font-weight: 400 !important;
border: 1px solid !important;
border-radius: 0.25rem;
border: none !important;
padding: 4px !important;
background: var(--tw-prose-code-bg) !important;
.dark & {
background: var(--color-gray-200);
border-color: var(--color-gray-400);
background: var(--tw-prose-code-bg-dark) !important;
}
&::before,
&::after {
content: none !important;
}
}

/* code blocks with unrecognized languages*/
pre:not(.chroma) {
@apply overflow-x-auto p-3;
}

.highlight {
@apply my-0 overflow-x-auto p-2;

Expand Down