Fix for overflowing content preventing edit and deletion in admin panel (#891)

* Closes #876
* Fixes overflowing admin panel content by adding the `.text-break` CSS class.
    * This is .text-break cloned from Bootstrap 4.3 with a fix for browsers not supporting break-word. It will be removed from the main CTFd classes when Bootstrap is upgraded internally.
This commit is contained in:
Kevin Chung
2019-02-28 20:04:21 -08:00
committed by GitHub
parent 1f768dbfaf
commit 2f252f5240
3 changed files with 9 additions and 2 deletions

View File

@@ -181,4 +181,11 @@ pre {
-webkit-border-radius: 0 !important; -webkit-border-radius: 0 !important;
-moz-border-radius: 0 !important; -moz-border-radius: 0 !important;
border-radius: 0 !important; border-radius: 0 !important;
}
.text-break {
/* TODO: This is .text-break cloned from Bootstrap 4.3 with a fix for browsers not supporting break-word. Remove later. */
word-break: break-all !important;
word-break: break-word !important;
overflow-wrap: break-word !important;
} }

View File

@@ -10,7 +10,7 @@
{% for flag in flags %} {% for flag in flags %}
<tr name="{{ flag.id }}"> <tr name="{{ flag.id }}">
<td class="text-center">{{ flag.type }}</td> <td class="text-center">{{ flag.type }}</td>
<td> <td class="text-break">
<pre class="flag-content">{{ flag.content }}</pre> <pre class="flag-content">{{ flag.content }}</pre>
</td> </td>
<td class="text-center"> <td class="text-center">

View File

@@ -11,7 +11,7 @@
{% for hint in challenge.hints %} {% for hint in challenge.hints %}
<tr> <tr>
<td class="text-center">{{ hint.type }}</td> <td class="text-center">{{ hint.type }}</td>
<td class=""><pre>{{ hint.content }}</pre></td> <td class="text-break"><pre>{{ hint.content }}</pre></td>
<td class="text-center">{{ hint.cost }}</td> <td class="text-center">{{ hint.cost }}</td>
<td class="text-center"> <td class="text-center">
<i role='button' class='btn-fa fas fa-edit edit-hint' hint-id="{{ hint.id }}"></i> <i role='button' class='btn-fa fas fa-edit edit-hint' hint-id="{{ hint.id }}"></i>