Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert hover css changes #384

Merged
merged 4 commits into from
Jun 9, 2023
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
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 text-lg hidden group-hover:block absolute right-full p-1.5"
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"
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 group-hover:visible pr-2"
class="header-link invisible with-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 text-lg hidden group-hover:block absolute p-1.5 right-full"
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"
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 text-lg hidden group-hover:block absolute p-1.5 right-full"
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"
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 text-lg hidden group-hover:block absolute p-1.5 right-full"
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"
href={`#${anchor}`}
>
<span><IconCopyLink classNames="text-smd" /></span>
Expand Down
4 changes: 4 additions & 0 deletions kit/tailwind.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ module.exports = {
maxWidth: {
"2xs": "16rem"
},
screens: {
"with-hover": { raw: "(hover: hover)" },
"no-hover": { raw: "(hover: none)" }
},
gridTemplateRows: {
full: "100%"
},
Expand Down