Skip to content

Commit 52e8832

Browse files
committed
Suppress floats on very narrow displays.
1 parent 755bc23 commit 52e8832

File tree

1 file changed

+25
-12
lines changed

1 file changed

+25
-12
lines changed

themes/scipy_lectures/static/nature.css_t

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -497,17 +497,20 @@ div.highlight:hover span.copybutton:hover {
497497
background-color: #20252B;
498498
}
499499

500-
div.highlight:hover span.copybutton:after{
501-
background: #3F556B;
502-
border-radius: 5px;
503-
color: white;
504-
content: attr(button_hint);
505-
left: 110%;
506-
padding: 5px 15px;
507-
position: absolute;
508-
z-index: 98;
509-
width: 140px;
510-
top: -10px;
500+
501+
@media (min-width: 80ex) {
502+
div.highlight:hover span.copybutton:after{
503+
background: #3F556B;
504+
border-radius: 5px;
505+
color: white;
506+
content: attr(button_hint);
507+
left: 110%;
508+
padding: 5px 15px;
509+
position: absolute;
510+
z-index: 98;
511+
width: 140px;
512+
top: -10px;
513+
}
511514
}
512515

513516
div.body p {
@@ -779,12 +782,22 @@ div.sidebar {
779782
z-index: 50;
780783
}
781784

782-
@media (max-width: 840px) {
785+
/* Suppress floats on small screens */
786+
@media (max-width: 70ex) {
783787
div.sidebar {
784788
float: none;
785789
width: 95%;
786790
padding-top: 8px;
787791
}
792+
793+
@media (max-width: 60ex) {
794+
img.align-right {
795+
float: none;
796+
}
797+
798+
img.align-right {
799+
float: none;
800+
}
788801
}
789802

790803
/* Warnings: replace the admonition name by a warning sign */

0 commit comments

Comments
 (0)