Skip to content

Commit 6fd5e7a

Browse files
fix(docs): for the mobile screen (#116)
1 parent 48b48cd commit 6fd5e7a

2 files changed

Lines changed: 34 additions & 27 deletions

File tree

docs/src/components/InstallSelector.astro

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,32 @@ const defaultOption = highlightedOptions[defaultIndex];
261261
outline: 2px solid rgba(255, 255, 255, 0.4);
262262
outline-offset: -2px;
263263
}
264+
265+
@media (max-width: 640px) {
266+
.install-selector {
267+
width: 100%;
268+
}
269+
270+
.install-box {
271+
width: 100%;
272+
}
273+
274+
.command-text {
275+
min-width: 0;
276+
overflow-x: auto;
277+
-webkit-overflow-scrolling: touch;
278+
}
279+
280+
.command-area {
281+
flex: 1;
282+
min-width: 0;
283+
justify-content: space-between;
284+
}
285+
286+
.dropdown-menu {
287+
min-width: 100px;
288+
}
289+
}
264290
</style>
265291

266292
<script is:inline>

docs/src/styles/custom.css

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,7 +1607,6 @@ nav.sidebar a[aria-current="page"] {
16071607

16081608
.hero-command .install-selector {
16091609
max-width: 100%;
1610-
overflow-x: auto;
16111610
}
16121611

16131612
.hero-command .install-box {
@@ -1802,30 +1801,12 @@ summary[id="starlight__on-this-page--mobile"] .caret {
18021801
color: #a78bfa;
18031802
}
18041803

1805-
.overscroll-message span {
1806-
display: inline-block;
1807-
padding: 0.5rem 1.25rem;
1808-
background: rgba(139, 92, 246, 0.15);
1809-
border: 1px solid rgba(139, 92, 246, 0.3);
1810-
border-radius: 20px;
1811-
color: rgba(255, 255, 255, 0.7);
1812-
font-size: 0.875rem;
1813-
font-weight: 500;
1814-
font-family: var(--sl-font);
1815-
backdrop-filter: blur(8px);
1816-
white-space: nowrap;
1817-
}
1818-
1819-
.overscroll-message span {
1820-
display: inline-block;
1821-
padding: 0.5rem 1.25rem;
1822-
background: rgba(139, 92, 246, 0.15);
1823-
border: 1px solid rgba(139, 92, 246, 0.3);
1824-
border-radius: 20px;
1825-
color: rgba(255, 255, 255, 0.7);
1826-
font-size: 0.875rem;
1827-
font-weight: 500;
1828-
font-family: var(--sl-font);
1829-
backdrop-filter: blur(8px);
1830-
white-space: nowrap;
1804+
@media (max-width: 640px) {
1805+
.overscroll-message span {
1806+
white-space: normal;
1807+
text-align: center;
1808+
max-width: calc(100vw - 2rem);
1809+
font-size: 0.8rem;
1810+
padding: 0.5rem 1rem;
1811+
}
18311812
}

0 commit comments

Comments
 (0)