Skip to content

Commit 5440bcb

Browse files
authored
🐛 BUG: fixing toggle button text overlap on narrow screens (#17)
1 parent 1be85da commit 5440bcb

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

sphinx_togglebutton/_static/togglebutton.css_t

+10-7
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
/* Titles should cut off earlier to avoid overlapping w/ button */
1717
div.admonition.toggle p.admonition-title {
18-
padding-right: 20%;
18+
padding-right: 25%;
1919
}
2020

2121
/* hides all the content of a page until de-toggled */
@@ -59,14 +59,17 @@ button.toggle-button {
5959
padding: 0px;
6060
}
6161

62-
button.toggle-button.toggle-button-hidden:before {
63-
content: "{{ togglebutton_hint }}";
64-
position: absolute;
65-
font-size: .8em;
66-
left: -6.5em;
67-
bottom: .4em;
62+
@media (min-width: 768px) {
63+
button.toggle-button.toggle-button-hidden:before {
64+
content: "{{ togglebutton_hint }}";
65+
position: absolute;
66+
font-size: .8em;
67+
left: -6.5em;
68+
bottom: .4em;
69+
}
6870
}
6971

72+
7073
/* Plus / minus toggles */
7174
.toggle-button .bar {
7275
background-color: white;

0 commit comments

Comments
 (0)