8000 Fix the appearance of version/language selects · python/python-docs-theme@87f9f41 · GitHub
[go: up one dir, main page]

Skip to content

Commit 87f9f41

Browse files
authored
Fix the appearance of version/language selects
The appearance:none needs a -webkit prefix to work in Safari and Chrome on Android. Adding padding to the select's outer div fixes arrow overlapping with the select's value. Adding outline offset for focus-visible makes the outline go around the border instead of within it (just around the inner select itself).
1 parent b77519b commit 87f9f41

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

python_docs_theme/static/pydoctheme.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ dl > dt span ~ em {
454454
position: relative;
455455
border: 1px solid #a8a8a8;
456456
height: 30px;
457+
padding-right: 7px;
457458
}
458459
.language_switcher_placeholder {
459460
margin-top: 2rem;
@@ -465,15 +466,20 @@ dl > dt span ~ em {
465466
top: 7px;
466467
width: 15px;
467468
height: 15px;
468-
right: 3px;
469+
right: 0;
469470
pointer-events: none;
470471
}
471472
.language_switcher_placeholder select,
472473
.version_switcher_placeholder select {
474+
-webkit-appearance: none;
473475
appearance: none;
474476
border: 0;
475477
height: 100%;
476478
}
479+
.language_switcher_placeholder:focus-visible,
480+
.version_switcher_placeholder:focus-visible {
481+
outline-offset: 5px;
482+
}
477483
.language_switcher_placeholder select {
478484
width: 100%;
479485
}

0 commit comments

Comments
 (0)
0