Skip to content

Commit

Permalink
Use CSS styles from old attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
humitos committed Sep 16, 2024
1 parent bac696e commit 79a7c2e
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 4 deletions.
8 changes: 6 additions & 2 deletions sphinx_rtd_theme/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,12 @@
{%- endif %}

{%- if READTHEDOCS and theme_flyout_display == "selectors" %}
<select id="readthedocs-version-selector"></select>
<select id="readthedocs-language-selector"></select>
<div class="version">
<div class="version-dropdown">
<select id="readthedocs-version-selector" class="version-list"></select>
<select id="readthedocs-language-selector" class="version-list"></select>
</div>
</div>
{%- endif %}

{%- include "searchbox.html" %}
Expand Down
2 changes: 1 addition & 1 deletion sphinx_rtd_theme/static/css/theme.css

Large diffs are not rendered by default.

39 changes: 38 additions & 1 deletion src/sass/_theme_layout.sass
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ html
padding: ($base-line-height / 6) ($base-line-height / 4)
margin-bottom: $gutter / 2
max-width: 100%
&:hover
&:hover, &active, &focus
background: rgba(255, 255, 255, 0.1)
img.logo
display: block // display on its own line all the time
Expand All @@ -235,6 +235,43 @@ html
margin-bottom: $gutter / 2
font-weight: normal
color: rgba(255, 255, 255, 0.3)
> div.version-dropdown
position: relative
display: inline-block
> select
max-width: 8em
padding: .1em 1.5em .1em .5em
text-align-last: center
background: none
border: none
border-radius: 0em
box-shadow: none
font-family: $base-font-family
font-size: 1em
font-weight: normal
color: rgba(255, 255, 255, .3)
// Allow for padding
appearance: none
-webkit-appearance: none
-moz-appearance: none
&:hover, &:active, &:focus
background: rgba(255, 255, 255, .1)
color: rgba(255, 255, 255, .5)
&:after
content: "\f0d7"
font-size: 1em
line-height: 1.2em
font-family: FontAwesome
padding: .1em .5em
position: absolute
right: 0
top: 0
z-index: 1
text-align: center
width: 1.5em
height: 100%
pointer-events: none
box-sizing: border-box

.wy-nav .wy-menu-vertical
header
Expand Down

0 comments on commit 79a7c2e

Please sign in to comment.