Skip to content

Commit

Permalink
Fixed footer direction label being cut off
Browse files Browse the repository at this point in the history
  • Loading branch information
squidfunk committed Mar 29, 2023
1 parent 7c473e1 commit f4d894d
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 28 deletions.
1 change: 0 additions & 1 deletion material/assets/stylesheets/main.666dee5c.min.css

This file was deleted.

1 change: 0 additions & 1 deletion material/assets/stylesheets/main.666dee5c.min.css.map

This file was deleted.

1 change: 1 addition & 0 deletions material/assets/stylesheets/main.7a7fce14.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions material/assets/stylesheets/main.7a7fce14.min.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion material/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
{% endif %}
{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.666dee5c.min.css' | url }}">
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.7a7fce14.min.css' | url }}">
{% if config.theme.palette %}
{% set palette = config.theme.palette %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.a0c5b2b5.min.css' | url }}">
Expand Down
12 changes: 6 additions & 6 deletions material/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
{% include ".icons/material/arrow-left.svg" %}
</div>
<div class="md-footer__title">
<span class="md-footer__direction">
{{ direction }}
</span>
<div class="md-ellipsis">
<span class="md-footer__direction">
{{ direction }}
</span>
{{ page.previous_page.title }}
</div>
</div>
Expand All @@ -28,10 +28,10 @@
{% set direction = lang.t("footer.next") %}
<a href="{{ page.next_page.url | url }}" class="md-footer__link md-footer__link--next" aria-label="{{ direction }}: {{ page.next_page.title | e }}" rel="next">
<div class="md-footer__title">
<span class="md-footer__direction">
{{ direction }}
</span>
<div class="md-ellipsis">
<span class="md-footer__direction">
{{ direction }}
</span>
{{ page.next_page.title }}
</div>
</div>
Expand Down
23 changes: 10 additions & 13 deletions src/assets/stylesheets/main/components/_footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@
// a tiny factor seems to get rid of the ellipsis and renders the text as
// it should - see https://bit.ly/2ZUCXQ8
flex-grow: 0.01;
padding-top: px2rem(28px);
padding-bottom: px2rem(8px);
align-items: end;
max-width: 100%;
margin-block: px2rem(20px) px2rem(8px);
overflow: hidden;
outline-color: var(--md-accent-fg-color);
transition: opacity 250ms;
Expand All @@ -70,14 +71,15 @@
transform: scaleX(-1);
}

// Footer link to previous page
&--prev {
// [mobile -]: Adjust width to 25/75 and hide title
@include break-to-device(mobile) {

// [mobile -]: Adjust width to 25/75 and hide title
@include break-to-device(mobile) {
// Footer link to previous page
&--prev {
flex-shrink: 0;

// Hide footer title
.md-footer__title {
.md-footer__title {
display: none;
}
}
Expand All @@ -97,12 +99,11 @@

// Footer title
&__title {
position: relative;
flex-grow: 1;
max-width: calc(100% - #{px2rem(48px)});
padding: 0 px2rem(20px);
margin-bottom: px2rem(14px);
font-size: px2rem(18px);
line-height: px2rem(48px);
white-space: nowrap;
}

Expand All @@ -114,10 +115,6 @@

// Footer link direction (i.e. prev and next)
&__direction {
position: absolute;
inset-inline: 0;
padding: 0 px2rem(20px);
margin-top: px2rem(-20px);
font-size: px2rem(12.8px);
opacity: 0.7;
}
Expand Down
12 changes: 6 additions & 6 deletions src/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
{% include ".icons/material/arrow-left.svg" %}
</div>
<div class="md-footer__title">
<span class="md-footer__direction">
{{ direction }}
</span>
<div class="md-ellipsis">
<span class="md-footer__direction">
{{ direction }}
</span>
{{ page.previous_page.title }}
</div>
</div>
Expand All @@ -68,10 +68,10 @@
rel="next"
>
<div class="md-footer__title">
<span class="md-footer__direction">
{{ direction }}
</span>
<div class="md-ellipsis">
<span class="md-footer__direction">
{{ direction }}
</span>
{{ page.next_page.title }}
</div>
</div>
Expand Down

0 comments on commit f4d894d

Please sign in to comment.