Skip to content

Commit

Permalink
🔧 fix(icons): increase stroke width from 1.25 to 2 in CheckIcon and C…
Browse files Browse the repository at this point in the history
…opyIcon components for better visibility

🔧 fix(mdx): update hover color of copy-button in Code component to text-indigo-400 for better user experience
🔧 fix(pages): set min-width to full in post/[...slug] page to prevent horizontal overflow
  • Loading branch information
danielcgilibert committed Aug 17, 2023
1 parent d69c774 commit 692a854
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/icons/CheckIcon.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
width='24'
height='24'
viewBox='0 0 24 24'
stroke-width='1.25'
stroke-width='2'
stroke='currentColor'
fill='none'
stroke-linecap='round'
Expand Down
2 changes: 1 addition & 1 deletion src/components/icons/CopyIcon.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
width='24'
height='24'
viewBox='0 0 24 24'
stroke-width='1.25'
stroke-width='2'
stroke='currentColor'
fill='none'
stroke-linecap='round'
Expand Down
2 changes: 1 addition & 1 deletion src/components/mdx/Code.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import CheckIcon from '../icons/CheckIcon.astro'
---

<pre
class='relative shadow-2xl dark:bg-slate-800'><button class="copy-button absolute z-20 top-2 right-2 rounded-md transition-all ease-in max-w-full max-h-fit"><CopyIcon /></button><button class="check-button absolute z-10 top-2 right-2 rounded-md transition-all ease-in opacity-0 text-green-300 max-w-full max-h-fit "><CheckIcon /></button><slot /></pre>
class='relative shadow-2xl dark:bg-slate-800'><button class="copy-button absolute z-20 top-2 right-2 rounded-md transition-all ease-in max-w-full max-h-fit hover:text-indigo-400"><CopyIcon /></button><button class="check-button absolute z-10 top-2 right-2 rounded-md transition-all ease-in opacity-0 text-green-300 max-w-full max-h-fit "><CheckIcon /></button><slot /></pre>

<script>
const codeBlock = document.querySelectorAll('pre')
Expand Down
2 changes: 1 addition & 1 deletion src/pages/post/[...slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const { Content, headings, remarkPluginFrontmatter } = await post.render()

<!-- main -->
<div class='max-w-full w-full'>
<div class='markdown prose dark:prose-invert mb-12'>
<div class='prose dark:prose-invert mb-12 min-w-full'>
<Content components={{ pre: Code }} />
</div>

Expand Down

0 comments on commit 692a854

Please sign in to comment.