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
6 changes: 3 additions & 3 deletions components/src/asciidoc/TableOfContents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ export const DesktopOutline = ({
}

if (toc && toc.length > 0) {
return <ul className={className}>{renderToc(toc)}</ul>
return <ul className={cn('toc', className)}>{renderToc(toc)}</ul>
}

return null
Expand Down Expand Up @@ -342,7 +342,7 @@ export const SmallScreenOutline = ({
<Accordion.Root
type="single"
className={cn(
'sticky top-[calc(var(--header-height)-1px)] z-10 -mt-px mb-10 block w-full border-b border-t bg-default border-secondary print:hidden',
'toc sticky top-[calc(var(--header-height)-1px)] z-10 -mt-px mb-10 block w-full border-b border-t bg-default border-secondary print:hidden',
className,
)}
collapsible
Expand All @@ -357,7 +357,7 @@ export const SmallScreenOutline = ({
</Accordion.Trigger>
</Accordion.Header>

<Accordion.Content className="animated-accordion hydrated max-h-[66.6vh] overflow-y-scroll w-full border-t border-secondary px-5 600:px-10">
<Accordion.Content className="animated-accordion hydrated max-h-[60vh] overflow-y-scroll w-full border-t border-secondary px-5 600:px-10">
<div className="py-4">{renderToc(toc)}</div>
</Accordion.Content>
</Accordion.Item>
Expand Down
113 changes: 69 additions & 44 deletions components/src/assets/asciidoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,17 @@
letter-spacing: 0;
}

.inline-code {
@apply text-secondary;
@apply ml-[1px] mr-[1px] rounded border px-[4px] py-[1px] align-[1px] text-[0.825rem] bg-raise border-secondary;
}

.asciidoc-body p code,
.asciidoc-body h1 code,
.asciidoc-body h2 code,
.asciidoc-body h3 code,
.asciidoc-body h4 code,
.asciidoc-body h5 code,
.asciidoc-body table code .inline-code {
.asciidoc-body h5 code {
@apply text-[0.825rem] text-default;
@apply ml-[1px] mr-[1px] rounded border px-[4px] py-[1px] align-[1px] bg-raise border-secondary;
}
Expand Down Expand Up @@ -643,6 +647,69 @@
@apply bg-raise p-4 rounded-lg my-8 px-6 py-5;
}

#footnotes p a {
@apply accent-link;
}

#footnotes p code {
@apply inline-code;
}

.toc .active code {
@apply border-accent-tertiary;
}

.toc code {
@apply ml-[1px] mr-[1px] rounded border px-[3px] align-[1px] border-secondary;
}

.asciidoc-body a:not(:is(h1, h2, h3, h4, h5, h6) a) {
text-decoration-color: rgba(var(--content-accent-tertiary-rgb), 0.8);
@apply underline text-accent-secondary;
}

@media screen and (min-width: 720px) {
.animated-accordion[data-state='open'].hydrated {
animation: accordionSlideDown 300ms cubic-bezier(0.87, 0, 0.13, 1);
}
.animated-accordion[data-state='closed'].hydrated {
animation: accordionSlideUp 300ms cubic-bezier(0.87, 0, 0.13, 1);
}
}

@media screen and (min-width: 720px) {
.animated-accordion {
overflow: hidden;
}
}

@media screen and (prefers-reduced-motion) {
.animated-accordion[data-state='open'] {
animation-name: none;
}
.animated-accordion[data-state='closed'] {
animation-name: none;
}
}

@keyframes accordionSlideDown {
from {
height: 0;
}
to {
height: var(--radix-accordion-content-height);
}
}

@keyframes accordionSlideUp {
from {
height: var(--radix-accordion-content-height);
}
to {
height: 0;
}
}

@media print {
html {
font-size: 14px !important;
Expand Down Expand Up @@ -728,46 +795,4 @@
background-color: var(--surface-raise) !important;
}
}

@media screen and (min-width: 720px) {
.animated-accordion[data-state='open'].hydrated {
animation: accordionSlideDown 300ms cubic-bezier(0.87, 0, 0.13, 1);
}
.animated-accordion[data-state='closed'].hydrated {
animation: accordionSlideUp 300ms cubic-bezier(0.87, 0, 0.13, 1);
}
}

@media screen and (min-width: 720px) {
.animated-accordion {
overflow: hidden;
}
}

@media screen and (prefers-reduced-motion) {
.animated-accordion[data-state='open'] {
animation-name: none;
}
.animated-accordion[data-state='closed'] {
animation-name: none;
}
}

@keyframes accordionSlideDown {
from {
height: 0;
}
to {
height: var(--radix-accordion-content-height);
}
}

@keyframes accordionSlideUp {
from {
height: var(--radix-accordion-content-height);
}
to {
height: 0;
}
}
}
Loading