Skip to content

Commit 6168baf

Browse files
committed
Fix inline dropdown not closing and width misalignment
Material's .md-typeset ul styles overrode the menu's display: none, leaving the dropdown permanently visible. Pin display with !important in both the closed and open states. Also tighten the menu to match its trigger: min-width: 100% (of the picker), narrower item padding, and centered labels so the menu sits flush under the AP/EU/US pill instead of mushrooming out to a fixed 4rem width.
1 parent 8cb8f5a commit 6168baf

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

docs/_static/custom.css

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -554,11 +554,12 @@ h3 {
554554
top: calc(100% + 2px);
555555
left: 0;
556556
z-index: 30;
557-
display: none;
557+
display: none !important;
558558
margin: 0 !important;
559-
padding: 0.2rem 0 !important;
559+
padding: 0.15rem 0 !important;
560560
list-style: none !important;
561-
min-width: 4rem;
561+
min-width: 100%;
562+
width: auto;
562563
background: var(--md-default-bg-color, #fff);
563564
border: 1px solid var(--md-default-fg-color--lighter, rgba(0, 0, 0, 0.18));
564565
border-radius: 4px;
@@ -568,17 +569,19 @@ h3 {
568569

569570
.md-typeset .robusta-region-inline__picker.is-open .robusta-region-inline__menu,
570571
.robusta-region-inline__picker.is-open .robusta-region-inline__menu {
571-
display: block;
572+
display: block !important;
572573
}
573574

574575
.md-typeset .robusta-region-inline__option,
575576
.robusta-region-inline__option {
576-
display: block;
577-
padding: 0.3rem 0.75rem;
578-
margin: 0;
577+
display: block !important;
578+
padding: 0.25rem 0.5rem !important;
579+
margin: 0 !important;
579580
cursor: pointer;
580581
color: var(--md-default-fg-color, #333);
581582
user-select: none;
583+
text-align: center;
584+
line-height: 1.2;
582585
}
583586

584587
.md-typeset .robusta-region-inline__option:hover,

0 commit comments

Comments
 (0)