@@ -300,7 +300,7 @@ defineOgImageComponent('Package', {
300300
301301 <article
302302 v-else-if =" status === 'success' && pkg"
303- class =" package-page motion-safe:animate-fade-in"
303+ class =" package-page motion-safe:animate-fade-in overflow-x-hidden "
304304 >
305305 <!-- Package header -->
306306 <header class =" area-header pb-8 border-b border-border" >
@@ -725,11 +725,11 @@ defineOgImageComponent('Package', {
725725 <span class =" w-2.5 h-2.5 rounded-full bg-fg-subtle" />
726726 <span class =" w-2.5 h-2.5 rounded-full bg-fg-subtle" />
727727 </div >
728- <div class =" space-y-1 px-3 pt-2 pb-3 sm:px-4 sm:pt-3 sm:pb-4" >
728+ <div class =" space-y-1 px-3 pt-2 pb-3 sm:px-4 sm:pt-3 sm:pb-4 overflow-x-auto " >
729729 <!-- Main package install -->
730- <div class =" flex items-center gap-2" >
731- <span class =" text-fg-subtle font-mono text-sm select-none" >$</span >
732- <code class =" font-mono text-sm"
730+ <div class =" flex items-center gap-2 min-w-0 " >
731+ <span class =" text-fg-subtle font-mono text-sm select-none shrink-0 " >$</span >
732+ <code class =" font-mono text-sm min-w-0 "
733733 ><ClientOnly
734734 ><span
735735 v-for =" (part, i) in installCommandParts"
@@ -744,9 +744,9 @@ defineOgImageComponent('Package', {
744744 >
745745 </div >
746746 <!-- @types package install (when enabled) -->
747- <div v-if =" showTypesInInstall" class =" flex items-center gap-2" >
748- <span class =" text-fg-subtle font-mono text-sm select-none" >$</span >
749- <code class =" font-mono text-sm"
747+ <div v-if =" showTypesInInstall" class =" flex items-center gap-2 min-w-0 " >
748+ <span class =" text-fg-subtle font-mono text-sm select-none shrink-0 " >$</span >
749+ <code class =" font-mono text-sm min-w-0 "
750750 ><span
751751 v-for =" (part, i) in typesInstallCommandParts"
752752 :key =" i"
@@ -997,4 +997,36 @@ defineOgImageComponent('Package', {
997997.area-sidebar {
998998 grid-area : sidebar;
999999}
1000+
1001+ /* Improve package name wrapping for narrow screens */
1002+ .area-header h1 {
1003+ overflow-wrap : anywhere;
1004+ }
1005+
1006+ /* Ensure description text wraps properly */
1007+ .area-header p {
1008+ word-wrap : break-word ;
1009+ overflow-wrap : break-word ;
1010+ word-break : break-word ;
1011+ }
1012+
1013+ /* Allow install command text to break on narrow screens */
1014+ .area-install code {
1015+ word-break : break-word ;
1016+ overflow-wrap : anywhere;
1017+ white-space : pre-wrap ;
1018+ }
1019+
1020+ /* Ensure all text content wraps on narrow screens */
1021+ .package-page {
1022+ word-wrap : break-word ;
1023+ overflow-wrap : break-word ;
1024+ max-width : 100% ;
1025+ }
1026+
1027+ /* Ensure all children respect max-width */
1028+ .package-page > * {
1029+ max-width : 100% ;
1030+ min-width : 0 ;
1031+ }
10001032 </style >
0 commit comments