Skip to content

Commit

Permalink
Fix hover css (#380)
Browse files Browse the repository at this point in the history
  • Loading branch information
mishig25 authored Jun 7, 2023
1 parent 0d4f38f commit e974868
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion kit/preprocess.js
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ function headingWithAnchorLink(code) {
return `<h${level} class="relative group">
<a
id="${id}"
class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"
class="header-link pr-1.5 text-lg hidden hover:block hover:absolute hover:p-1.5 hover:opacity-0 hover:group-hover:opacity-100 hover:right-full"
href="#${id}"
>
<span><IconCopyLink/></span>
Expand Down
6 changes: 3 additions & 3 deletions kit/src/lib/Docstring.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
{@html highlightSignature(name)}
<a
id={anchor}
class="header-link invisible with-hover:group-hover:visible pr-2"
class="header-link invisible hover:group-hover:visible pr-2"
href="#{anchor}"
>
<IconCopyLink />
Expand Down Expand Up @@ -179,7 +179,7 @@
<span class="group flex space-x-1.5 items-start">
<a
id={anchor}
class="header-link block pr-0.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"
class="header-link pr-0.5 text-lg hidden hover:block hover:absolute hover:p-1.5 hover:opacity-0 hover:group-hover:opacity-100 hover:right-full"
href={`#${anchor}`}
>
<span><IconCopyLink classNames="text-smd" /></span>
Expand All @@ -203,7 +203,7 @@
<span class="group flex space-x-1.5 items-start">
<a
id={anchor}
class="header-link block pr-0.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"
class="header-link pr-0.5 text-lg hidden hover:block hover:absolute hover:p-1.5 hover:opacity-0 hover:group-hover:opacity-100 hover:right-full"
href={`#${anchor}`}
>
<span><IconCopyLink classNames="text-smd" /></span>
Expand Down
2 changes: 1 addition & 1 deletion kit/src/lib/ExampleCodeBlock.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<div class="relative group rounded-md" bind:this={containerEl}>
<a
id={anchor}
class="header-link block pr-0.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"
class="header-link pr-0.5 text-lg hidden hover:block hover:absolute hover:p-1.5 hover:opacity-0 hover:group-hover:opacity-100 hover:right-full"
href={`#${anchor}`}
>
<span><IconCopyLink classNames="text-smd" /></span>
Expand Down
4 changes: 0 additions & 4 deletions kit/tailwind.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ module.exports = {
maxWidth: {
"2xs": "16rem"
},
screens: {
"with-hover": { raw: "(hover: hover)" },
"no-hover": { raw: "(hover: none)" }
},
gridTemplateRows: {
full: "100%"
},
Expand Down

0 comments on commit e974868

Please sign in to comment.