UX: Improve layout of poll builder modal

This commit is contained in:
Penar Musaraj 2019-08-07 15:00:03 -04:00
parent 24877a7b8c
commit 78500fb770
2 changed files with 20 additions and 20 deletions

View File

@ -19,13 +19,13 @@
{{#if showMinMax}}
<div class="input-group poll-number">
{{input-tip validation=minMaxValueValidation}}
<label class="input-group-label">{{i18n 'poll.ui_builder.poll_config.min'}}</label>
{{input type='number'
value=pollMin
valueAttribute="value"
class="poll-options-min"}}
</div>
{{input-tip validation=minMaxValueValidation}}
<div class="input-group poll-number">
@ -44,8 +44,8 @@
valueAttribute="value"
min="1"
class="poll-options-step"}}
{{input-tip validation=minStepValueValidation}}
</div>
{{input-tip validation=minStepValueValidation}}
{{/if}}
{{/if}}
@ -53,8 +53,8 @@
<div class="input-group poll-textarea">
<label>{{i18n 'poll.ui_builder.poll_options.label'}}</label>
{{textarea value=pollOptions autocomplete="discourse"}}
{{input-tip validation=minNumOfOptionsValidation}}
</div>
{{input-tip validation=minNumOfOptionsValidation}}
{{/unless}}
<div class="input-group poll-checkbox">

View File

@ -1,3 +1,5 @@
$poll-margin: 10px;
.poll-ui-builder-form {
margin: 0;
@ -8,31 +10,29 @@
.tip {
display: block;
}
.input-group-label {
display: inline-block;
min-width: 55px;
margin-bottom: $poll-margin * 1.5;
margin-top: $poll-margin / 2;
font-size: $font-down-1;
}
.poll-select {
line-height: 3em;
margin-bottom: $poll-margin;
display: flex;
align-items: center;
}
.input-group-label {
min-width: 85px;
}
.poll-number {
margin: 8px 0;
.tip {
margin-bottom: 6px;
}
margin: $poll-margin 0;
display: flex;
align-items: center;
input {
width: 70px;
}
input + .tip {
margin-top: 4px;
}
}
.poll-textarea textarea {
@ -42,10 +42,10 @@
}
.poll-select + .poll-textarea {
margin-top: 12px;
margin-top: $poll-margin;
}
.poll-checkbox {
margin-top: 4px;
margin-top: $poll-margin / 2;
}
}