Limit the width of the document selectors to the width of the parent. (#4968)

* Limit the width of the document selectors to the width of the parent.

It's unfortunately not responsive (select2 limitation), but better
than being too long.

* Force "text-overflow: ellipsis" to hide the beginning of a doc name
This commit is contained in:
Lars Eggert 2023-01-18 18:40:32 +02:00 committed by GitHub
parent e209cae279
commit 570bd141ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View file

@ -14,6 +14,7 @@
{% with prev_rev=doc.rev|add:"-1"|stringformat:"02d" %}
<select class="form-select{% if document_html %} form-select-sm mb-1{% endif %} select2-field"
data-max-entries="1"
data-width="resolve"
data-allow-clear="false"
data-minimum-input-length="0"
{% if not document_html %}id="url1"{% else %}aria-label="From revision"{% endif %}
@ -51,6 +52,7 @@
{% endif %}
<select class="form-select{% if document_html %} form-select-sm mb-1{% endif %} select2-field"
data-max-entries="1"
data-width="resolve"
data-allow-clear="false"
data-minimum-input-length="0"
{% if not document_html %}id="url2"{% else %}aria-label="To revision"{% endif %}

View file

@ -41,6 +41,14 @@
{% include "base/icons.html" %}
{% include "doc/opengraph.html" %}
{% analytical_head_bottom %}
<style>
{# Force "text-overflow: ellipsis" to hide the beginning of a doc name #}
.diff-form .select2-selection__rendered {
direction: rtl;
text-align: left;
}
}
</style>
</head>
<body>
{% analytical_body_top %}