Skip to content

Commit

Permalink
🎨 Improve backmatter styles
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanc1 committed Nov 18, 2023
1 parent 8aa0be8 commit 96aae9b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/funny-wolves-dance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@myst-theme/site': patch
---

Improve backmatter styles
9 changes: 6 additions & 3 deletions packages/site/src/components/Backmatter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,19 @@ export function Backmatter({
}) {
if (!content) return null;
return (
<div className="flex flex-col w-full md:flex-row">
<div className="flex flex-col w-full md:flex-row group/backmatter">
<h2
id={id}
className="mt-5 text-base font-semibold group md:w-[200px] self-start md:flex-none opacity-90"
className="mt-5 text-base font-semibold group md:w-[200px] self-start md:flex-none opacity-90 group-hover/backmatter:opacity-100"
>
{title}
<HashLink id={id} title={`Link to ${title}`} hover className="ml-2" />
</h2>
<div className="grow">
<ContentBlocks mdast={content} className="opacity-80 col-screen" />
<ContentBlocks
mdast={content}
className="opacity-90 group-hover/backmatter:opacity-100 col-screen"
/>
</div>
</div>
);
Expand Down

0 comments on commit 96aae9b

Please sign in to comment.