Simplified tooltip positioning

This commit is contained in:
squidfunk 2021-12-07 15:35:52 +01:00
parent 350aee371d
commit 1316d8d184
5 changed files with 9 additions and 15 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

@ -34,7 +34,7 @@
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block styles %} {% block styles %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.58abb37a.min.css' | url }}"> <link rel="stylesheet" href="{{ 'assets/stylesheets/main.cdfe358e.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.9204c3b2.min.css' | url }}"> <link rel="stylesheet" href="{{ 'assets/stylesheets/palette.9204c3b2.min.css' | url }}">

View File

@ -56,18 +56,12 @@
top: var(--md-tooltip-y); top: var(--md-tooltip-y);
left: left:
clamp( clamp(
calc( var(--md-tooltip-0, #{px2rem(0px)}) + #{px2rem(16px)},
var(--md-tooltip-0, #{px2rem(0px)}) +
#{px2rem(16px)}
),
var(--md-tooltip-x), var(--md-tooltip-x),
calc( (
100vw - 100vw +
var(--md-tooltip-width) + var(--md-tooltip-0, #{px2rem(0px)}) + #{px2rem(16px)} -
calc( var(--md-tooltip-width) -
var(--md-tooltip-0, #{px2rem(0px)}) +
#{px2rem(16px)}
) -
2 * #{px2rem(16px)} 2 * #{px2rem(16px)}
) )
); );