Skip to content

Commit

Permalink
Revert hover css changes (#384)
Browse files Browse the repository at this point in the history
* Revert "Fix more hover css (#381)"

This reverts commit 718a47e.

* Revert "Fix hover css (#380)"

This reverts commit e974868.

* Revert "Add small change in readme (#377)"

This reverts commit 0d4f38f.

* Revert "Revert "Add small change in readme (#377)""

This reverts commit 8fea187.
  • Loading branch information
mishig25 authored Jun 9, 2023
1 parent 778f5d8 commit 01b262b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 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 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

0 comments on commit 01b262b

Please sign in to comment.