-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Christian López Barrón <[email protected]>
- Loading branch information
Showing
1 changed file
with
25 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,31 @@ | ||
/* Default state (with sidebar visible) */ | ||
.sy-main { | ||
width: calc(100% - 20rem); /* Adjust width with sidebar */ | ||
max-width: none; /* Prevent it from exceeding the container's size */ | ||
box-sizing: border-box; /* Ensure padding/margins don’t add to total width */ | ||
} | ||
|
||
/* Responsive state (when sidebar disappears) */ | ||
@media (max-width: 768px) { /* Adjust breakpoint as needed */ | ||
.sy-main { | ||
width: 100%; /* Use full width when sidebar is hidden */ | ||
max-width: none; /* Remove max-width limit */ | ||
} | ||
} | ||
|
||
.sy-rside { | ||
width: 0; /* Keep the sidebar offset */ | ||
max-width: 0; /* Allow the element to fill the remaining space */ | ||
} | ||
/* Take out pointless vertical whitespace in the signatures. */ | ||
/* Take out the additional vertical whitespace for multi-line function signatures. */ | ||
/* https://github.com/readthedocs/sphinx_rtd_theme/issues/1529#issuecomment-1918561608 */ | ||
.sig dl { | ||
margin-bottom: 0; | ||
margin-top: 0; | ||
margin-left: 2em; | ||
} | ||
|
||
/* Hide right sidebar and the button that displays it when screenspace is reduced */ | ||
aside#rside { | ||
display: none !important; | ||
} | ||
|
||
div.xl\:hidden { | ||
display: none !important; | ||
} | ||
|
||
/* Since right sidebar is not displayed, re-declare the width criteria for the main area of the docs to be larger */ | ||
.sy-main { | ||
width: calc(100% - 20rem); /* each (left and right) sidebar is 18rem width, so now keep only 18 (+ 1 of margin for each side) */ | ||
max-width: none; | ||
box-sizing: border-box; | ||
} | ||
|
||
/* For smaller window size, when right sidebar disappears, redeclare the same */ | ||
@media (max-width: 768px) { | ||
.sy-main { | ||
width: 100%; /* now there are no sidebars visible */ | ||
max-width: none; | ||
} | ||
} |