File tree Expand file tree Collapse file tree 1 file changed +28
-1
lines changed
Expand file tree Collapse file tree 1 file changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -445,7 +445,7 @@ defineOgImageComponent('Package', {
445445 <button
446446 type =" button"
447447 @click =" copyPkgName()"
448- class =" copy-button absolute z-20 left-0 top-full inline-flex items-center gap-1 px-2 py-1 rounded border text-xs font-mono whitespace-nowrap text-fg-muted bg-bg border-border opacity-0 -translate-y-1 pointer-events-none transition-all duration-150 group-hover:opacity-100 group-hover:translate-y-0 group-hover:pointer-events-auto focus-visible:opacity-100 focus-visible:translate-y-0 focus-visible:pointer-events-auto hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/40"
448+ class =" copy-button absolute z-20 left-0 top-full inline-flex items-center gap-1 px-2 py-1 rounded border text-xs font-mono whitespace-nowrap text-fg-muted bg-bg border-border opacity-0 -translate-y-1 pointer-events-none group-hover:opacity-100 group-hover:translate-y-0 group-hover:pointer-events-auto focus-visible:opacity-100 focus-visible:translate-y-0 focus-visible:pointer-events-auto hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/40"
449449 :aria-label =" $t('package.copy_name')"
450450 >
451451 <span class =" i-carbon:copy w-3.5 h-3.5" aria-hidden =" true" />
@@ -1191,6 +1191,33 @@ defineOgImageComponent('Package', {
11911191 min-width : 0 ;
11921192}
11931193
1194+ .copy-button {
1195+ clip : rect (0 0 0 0 );
1196+ clip-path : inset (50% );
1197+ height : 1px ;
1198+ overflow : hidden ;
1199+ width : 1px ;
1200+ transition :
1201+ opacity 0.25s 0.1s ,
1202+ translate 0.15s 0.1s ,
1203+ clip 0.01s 0.34s allow-discrete,
1204+ clip-path 0.01s 0.34s allow-discrete,
1205+ height 0.01s 0.34s allow-discrete,
1206+ width 0.01s 0.34s allow-discrete;
1207+ }
1208+
1209+ .group :hover .copy-button ,
1210+ .copy-button :focus-visible {
1211+ clip : auto ;
1212+ clip-path : none ;
1213+ height : auto ;
1214+ overflow : visible ;
1215+ width : auto ;
1216+ transition :
1217+ opacity 0.15s ,
1218+ translate 0.15s ;
1219+ }
1220+
11941221@media (hover : none) {
11951222 .copy-button {
11961223 display : none ;
You can’t perform that action at this time.
0 commit comments