mirror of
https://github.com/readthedocs/sphinx_rtd_theme.git
synced 2025-02-25 18:55:21 -06:00
Tune version and language selector styles (#1603)
* Tuning on select width and icon placement * Use better cursor * Add a max width to selects so that they can't overflow * Only add after pseudo element if select exists * Lint
This commit is contained in:
parent
7b63004607
commit
dbd7fd30ff
@ -126,10 +126,10 @@
|
||||
|
||||
{%- if READTHEDOCS %}
|
||||
{%- if theme_version_selector or theme_language_selector %}
|
||||
<div class="switch-menus">
|
||||
<div class="version-switch"></div>
|
||||
<div class="language-switch"></div>
|
||||
</div>
|
||||
<div class="switch-menus">
|
||||
<div class="version-switch"></div>
|
||||
<div class="language-switch"></div>
|
||||
</div>
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -239,12 +239,15 @@ html
|
||||
font-weight: normal
|
||||
color: rgba(255, 255,255, 0.3)
|
||||
> div.version-switch, > div.language-switch
|
||||
display: inline-block
|
||||
padding: .2em
|
||||
select
|
||||
// Provide room for dropdown icon
|
||||
display: inline-block
|
||||
min-width: 10em
|
||||
max-width: 10em
|
||||
padding: .1em 1.5em .1em .5em
|
||||
margin-right: -2rem
|
||||
padding-right: 2rem
|
||||
max-width: $nav-desktop-width * .8
|
||||
// Alter base select styles
|
||||
text-align-last: center
|
||||
background: none
|
||||
border: none
|
||||
@ -254,6 +257,7 @@ html
|
||||
font-size: 1em
|
||||
font-weight: normal
|
||||
color: rgba(255, 255, 255, .3)
|
||||
cursor: pointer
|
||||
// Allow for padding
|
||||
appearance: none
|
||||
-webkit-appearance: none
|
||||
@ -261,17 +265,16 @@ html
|
||||
&:hover, &:active, &:focus
|
||||
background: rgba(255, 255, 255, .1)
|
||||
color: rgba(255, 255, 255, .5)
|
||||
&:after
|
||||
&:has(> select):after
|
||||
display: inline-block
|
||||
width: 1.5em
|
||||
height: 100%
|
||||
padding: .1em
|
||||
content: "\f0d7"
|
||||
font-size: 1em
|
||||
line-height: 1.2em
|
||||
font-family: FontAwesome
|
||||
text-align: center
|
||||
width: 1.5em
|
||||
height: 100%
|
||||
padding: .1em
|
||||
position: absolute
|
||||
right: 3.5em
|
||||
pointer-events: none
|
||||
box-sizing: border-box
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user