File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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" />
@@ -1199,6 +1199,33 @@ defineOgImageComponent('Package', {
11991199 min-width : 0 ;
12001200}
12011201
1202+ .copy-button {
1203+ clip : rect (0 0 0 0 );
1204+ clip-path : inset (50% );
1205+ height : 1px ;
1206+ overflow : hidden ;
1207+ width : 1px ;
1208+ transition :
1209+ opacity 0.25s 0.1s ,
1210+ translate 0.15s 0.1s ,
1211+ clip 0.01s 0.34s allow-discrete,
1212+ clip-path 0.01s 0.34s allow-discrete,
1213+ height 0.01s 0.34s allow-discrete,
1214+ width 0.01s 0.34s allow-discrete;
1215+ }
1216+
1217+ .group :hover .copy-button ,
1218+ .copy-button :focus-visible {
1219+ clip : auto ;
1220+ clip-path : none ;
1221+ height : auto ;
1222+ overflow : visible ;
1223+ width : auto ;
1224+ transition :
1225+ opacity 0.15s ,
1226+ translate 0.15s ;
1227+ }
1228+
12021229@media (hover : none) {
12031230 .copy-button {
12041231 display : none ;
You can’t perform that action at this time.
0 commit comments