From 8a8d4c54bd700386c3ad2b7f1cd805c9f2af2157 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Sch=C3=A4fer?= Date: Sat, 6 Feb 2021 15:15:01 +0100 Subject: [PATCH] Collapse the logout button text on narrow displays This prevents ugly line wraps on long site names --- snikket_web/scss/app.scss | 17 +++++++++++++++++ snikket_web/templates/app.html | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/snikket_web/scss/app.scss b/snikket_web/scss/app.scss index 063d25c..8612d62 100644 --- a/snikket_web/scss/app.scss +++ b/snikket_web/scss/app.scss @@ -1017,6 +1017,23 @@ div.profile-card { display: none; } } + + + input[type="submit"], button, .button { + &.slimmify { + > svg.icon { + margin-right: 0; + } + + > span { + position: absolute; + width: 1px; + height: 1px; + overflow: hidden; + top: -100px; + } + } + } } /* clipboard button */ diff --git a/snikket_web/templates/app.html b/snikket_web/templates/app.html index ae6f3fe..6a1d246 100644 --- a/snikket_web/templates/app.html +++ b/snikket_web/templates/app.html @@ -5,5 +5,5 @@ {% endblock %} {% block topbar_right %} {{- super() -}} -{% call standard_button("logout", url_for("user.logout"), class="tertiary") %}{% trans %}Log out{% endtrans %}{% endcall %} +{% call standard_button("logout", url_for("user.logout"), class="tertiary slimmify") %}{% trans %}Log out{% endtrans %}{% endcall %} {%- endblock %}