Skip to content

Commit c7b854e

Browse files
committed
style(fix[api-style]): Keep badges on same line until truly narrow
why: flex-wrap: wrap on dt caused badges and [source] to drop to a second row at intermediate widths (~52rem) even when there was room. what: - Change dt flex-wrap from wrap to nowrap by default - Lower the wrap breakpoint from 52rem to 30rem (mobile-only)
1 parent 0a9e7eb commit c7b854e

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

  • packages/sphinx-autodoc-api-style/src/sphinx_autodoc_api_style/_static/css

packages/sphinx-autodoc-api-style/src/sphinx_autodoc_api_style/_static/css/api_style.css

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ dl.py:not(.fixture) > dt {
196196
display: flex;
197197
align-items: center;
198198
gap: 0.35rem;
199-
flex-wrap: wrap;
199+
flex-wrap: nowrap;
200200
}
201201

202202
dl.py:not(.fixture) > dt > .headerlink { order: 1; }
@@ -213,7 +213,10 @@ dl.py:not(.fixture) > dt .gas-badge-group {
213213
text-indent: 0;
214214
}
215215

216-
@media (max-width: 52rem) {
216+
@media (max-width: 30rem) {
217+
dl.py:not(.fixture) > dt {
218+
flex-wrap: wrap;
219+
}
217220
dl.py:not(.fixture) > dt .gas-badge-group {
218221
margin-left: 0;
219222
white-space: normal;

0 commit comments

Comments
 (0)