Fix linebreak in description

Signed-off-by: Jonas Rittershofer <jotoeri@users.noreply.github.com>
This commit is contained in:
Jonas Rittershofer 2020-05-25 18:08:34 +02:00
parent 25ff718ddc
commit 2d4a330ef4
2 changed files with 16 additions and 7 deletions

View file

@ -71,7 +71,7 @@
@keydown="autoSizeDescription"
@keyup="onDescChange" />
<!-- Only visible if at least one question is marked as mandatory-->
<p v-if="mandatoryUsed" class="form-desc info-mandatory">
<p v-if="mandatoryUsed" class="info-mandatory">
* {{ t('forms', 'Mandatory questions') }}
</p>
</header>
@ -425,7 +425,8 @@ export default {
}
.form-title,
.form-desc {
.form-desc,
.info-mandatory {
width: 100%;
padding: 0 16px;
border: none;
@ -449,6 +450,9 @@ export default {
}
.info-mandatory {
font-size: 100%;
padding-bottom: 20px;
resize: none;
color: var(--color-text-maxcontrast);
}
}

View file

@ -28,11 +28,11 @@
<h2 class="form-title">
{{ formTitle }}
</h2>
<p v-if="!loading && !success" class="form-desc">
{{ form.description }}
</p>
<!-- Do not wrap the following line between tags! `white-space:pre-line` respects `\n` but would produce additional empty first line -->
<!-- eslint-disable-next-line -->
<p v-if="!loading && !success" class="form-desc">{{ form.description }}</p>
<!-- Only visible if at least one question is marked as mandatory-->
<p v-if="mandatoryUsed && !loading && !success" class="form-desc info-mandatory">
<p v-if="mandatoryUsed && !loading && !success" class="info-mandatory">
* {{ t('forms', 'Mandatory questions') }}
</p>
</header>
@ -203,7 +203,8 @@ export default {
margin-bottom: 24px;
.form-title,
.form-desc {
.form-desc,
.info-mandatory {
width: 100%;
padding: 0 16px;
border: none;
@ -223,9 +224,13 @@ export default {
font-size: 100%;
padding-bottom: 20px;
resize: none;
white-space: pre-line;
}
.info-mandatory {
font-size: 100%;
padding-bottom: 20px;
resize: none;
color: var(--color-text-maxcontrast);
}
}