Fixed back-to-top button position for right-to-left languages

This commit is contained in:
squidfunk 2021-10-27 22:36:09 +02:00
parent cffb5920ca
commit 403580bff8
5 changed files with 12 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -39,7 +39,7 @@
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block styles %} {% block styles %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.db9e7362.min.css' | url }}"> <link rel="stylesheet" href="{{ 'assets/stylesheets/main.cdeb8541.min.css' | url }}">
{% if config.theme.palette %} {% if config.theme.palette %}
{% set palette = config.theme.palette %} {% set palette = config.theme.palette %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.3f5d1f46.min.css' | url }}"> <link rel="stylesheet" href="{{ 'assets/stylesheets/palette.3f5d1f46.min.css' | url }}">

View File

@ -53,7 +53,9 @@
// Adjust for right-to-left languages // Adjust for right-to-left languages
[dir="rtl"] & { [dir="rtl"] & {
float: left; margin-right: 50%;
margin-left: initial;
transform: translate(50%, 0);
} }
// Back-to-top button in hidden state // Back-to-top button in hidden state
@ -62,6 +64,11 @@
opacity: 0; opacity: 0;
transition-duration: 0ms; transition-duration: 0ms;
pointer-events: none; pointer-events: none;
// Adjust for right-to-left languages
[dir="rtl"] & {
transform: translate(50%, px2rem(4px));
}
} }
// Back-to-top button on focus/hover // Back-to-top button on focus/hover