Skip to content

Commit 01b262b

Browse files
authored
Revert hover css changes (#384)
* 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.
1 parent 778f5d8 commit 01b262b

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

‎kit/preprocess.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ function headingWithAnchorLink(code) {
511511
return `<h${level} class="relative group">
512512
<a
513513
id="${id}"
514-
class="header-link text-lg hidden group-hover:block absolute right-full p-1.5"
514+
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"
515515
href="#${id}"
516516
>
517517
<span><IconCopyLink/></span>

‎kit/src/lib/Docstring.svelte‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
{@html highlightSignature(name)}
105105
<a
106106
id={anchor}
107-
class="header-link invisible group-hover:visible pr-2"
107+
class="header-link invisible with-hover:group-hover:visible pr-2"
108108
href="#{anchor}"
109109
>
110110
<IconCopyLink />
@@ -179,7 +179,7 @@
179179
<span class="group flex space-x-1.5 items-start">
180180
<a
181181
id={anchor}
182-
class="header-link text-lg hidden group-hover:block absolute p-1.5 right-full"
182+
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"
183183
href={`#${anchor}`}
184184
>
185185
<span><IconCopyLink classNames="text-smd" /></span>
@@ -203,7 +203,7 @@
203203
<span class="group flex space-x-1.5 items-start">
204204
<a
205205
id={anchor}
206-
class="header-link text-lg hidden group-hover:block absolute p-1.5 right-full"
206+
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"
207207
href={`#${anchor}`}
208208
>
209209
<span><IconCopyLink classNames="text-smd" /></span>

‎kit/src/lib/ExampleCodeBlock.svelte‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<div class="relative group rounded-md" bind:this={containerEl}>
3131
<a
3232
id={anchor}
33-
class="header-link text-lg hidden group-hover:block absolute p-1.5 right-full"
33+
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"
3434
href={`#${anchor}`}
3535
>
3636
<span><IconCopyLink classNames="text-smd" /></span>

‎kit/tailwind.config.cjs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ module.exports = {
3737
maxWidth: {
3838
"2xs": "16rem"
3939
},
40+
screens: {
41+
"with-hover": { raw: "(hover: hover)" },
42+
"no-hover": { raw: "(hover: none)" }
43+
},
4044
gridTemplateRows: {
4145
full: "100%"
4246
},

0 commit comments

Comments
 (0)