Skip to content

Commit e845c26

Browse files
committed
refactor: different vers
Signed-off-by: 82Flex <82flex@gmail.com>
1 parent 3098e26 commit e845c26

2 files changed

Lines changed: 41 additions & 14 deletions

File tree

src/pages/index.module.css

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,10 @@ html[data-theme='dark'] .featureContent p {
568568
.menuIcon {
569569
width: 1.25rem;
570570
text-align: center;
571+
display: inline-flex;
572+
align-items: center;
573+
justify-content: center;
574+
line-height: 1; /* fix extra height on iOS 15 */
571575
}
572576

573577
/* Hover bridge to prevent flicker when moving from button to menu */
@@ -624,21 +628,35 @@ html[data-theme='dark'] .featureContent p {
624628
animation: panelSlideOut 220ms ease forwards;
625629
}
626630

631+
.mobileHeader {
632+
display: flex;
633+
align-items: center;
634+
justify-content: space-between;
635+
gap: 8px;
636+
min-height: 40px;
637+
margin: 0 2px 8px;
638+
}
639+
627640
.mobileClose {
628-
position: absolute;
629-
top: 10px;
630-
right: 12px;
631641
border: none;
632642
background: transparent;
633643
color: inherit;
634644
font-size: 1.5rem;
645+
line-height: 1;
646+
width: 36px;
647+
height: 36px;
648+
display: inline-flex;
649+
align-items: center;
650+
justify-content: center;
651+
border-radius: 8px;
635652
cursor: pointer;
636653
}
637654

638655
.mobileTitle {
639656
font-size: 1.1rem;
640657
font-weight: 700;
641-
margin: 0 0 10px 4px;
658+
margin: 0 0 0 4px;
659+
line-height: 1.2;
642660
}
643661

644662
.mobileOptions {
@@ -653,12 +671,19 @@ html[data-theme='dark'] .featureContent p {
653671
align-items: center;
654672
gap: 0.6rem;
655673
padding: 14px 16px;
674+
min-height: 48px; /* baseline target */
675+
height: 48px; /* enforce consistent height on older iOS */
676+
line-height: 1.25;
656677
border-radius: 10px;
657678
text-decoration: none !important;
658679
color: var(--ifm-font-color-base) !important;
659680
background: var(--ifm-hover-overlay);
660681
}
661682

683+
.mobileOption span {
684+
line-height: 1.2;
685+
}
686+
662687
.mobileOption:hover,
663688
.mobileOption:focus-visible {
664689
background: rgba(75, 108, 183, 0.15);

src/pages/index.tsx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -364,16 +364,18 @@ function HavocDropdown() {
364364
)}
365365
onClick={(e) => e.stopPropagation()}
366366
>
367-
<button
368-
type="button"
369-
className={styles.mobileClose}
370-
aria-label={translate({ message: "Close" })}
371-
onClick={() => setOpen(false)}
372-
>
373-
×
374-
</button>
375-
<div className={styles.mobileTitle}>
376-
<Translate>Choose Edition</Translate>
367+
<div className={styles.mobileHeader}>
368+
<div className={styles.mobileTitle}>
369+
<Translate>Choose Edition</Translate>
370+
</div>
371+
<button
372+
type="button"
373+
className={styles.mobileClose}
374+
aria-label={translate({ message: "Close" })}
375+
onClick={() => setOpen(false)}
376+
>
377+
×
378+
</button>
377379
</div>
378380
<div className={styles.mobileOptions}>
379381
<Link

0 commit comments

Comments
 (0)