Merge branch 'form-aesthetic-improvements' into 'develop'

Preferences Form aesthetic improvements

See merge request soapbox-pub/soapbox-fe!270
chats_paste
Alex Gleason 2020-09-28 16:05:43 +00:00
commit 532e37a347
4 zmienionych plików z 42 dodań i 26 usunięć

Wyświetl plik

@ -55,23 +55,27 @@ exports[`<RadioGroup /> renders correctly 1`] = `
`; `;
exports[`<SelectDropdown /> renders correctly 1`] = ` exports[`<SelectDropdown /> renders correctly 1`] = `
<select> <div
<option class="select-wrapper"
value="one" >
> <select>
One <option
</option> value="one"
<option >
value="two" One
> </option>
Two <option
</option> value="two"
<option >
value="three" Two
> </option>
Three <option
</option> value="three"
</select> >
Three
</option>
</select>
</div>
`; `;
exports[`<SimpleForm /> renders correctly 1`] = ` exports[`<SimpleForm /> renders correctly 1`] = `

Wyświetl plik

@ -236,7 +236,7 @@ export class SelectDropdown extends ImmutablePureComponent {
<option key={item} value={item}>{items[item]}</option> <option key={item} value={item}>{items[item]}</option>
)); ));
const selectElem = <select {...props}>{optionElems}</select>; const selectElem = <div class='select-wrapper'><select {...props}>{optionElems}</select></div>;
return label ? ( return label ? (
<LabelInputContainer label={label} hint={hint}>{selectElem}</LabelInputContainer> <LabelInputContainer label={label} hint={hint}>{selectElem}</LabelInputContainer>

Wyświetl plik

@ -1,5 +1,6 @@
.dyslexic { .dyslexic {
font-family: 'OpenDyslexic' !important; font-family: 'OpenDyslexic' !important;
margin-bottom: 8px;
} }
body.dyslexic { body.dyslexic {

Wyświetl plik

@ -13,7 +13,7 @@ code {
.simple_form { .simple_form {
.input { .input {
margin-bottom: 15px; margin-bottom: 8px;
overflow: hidden; overflow: hidden;
&.hidden { &.hidden {
@ -43,7 +43,6 @@ code {
&.boolean { &.boolean {
position: relative; position: relative;
margin-bottom: 0;
.label_input > label { .label_input > label {
font-family: inherit; font-family: inherit;
@ -111,7 +110,6 @@ code {
span.hint { span.hint {
display: block; display: block;
font-size: 12px; font-size: 12px;
margin-top: 4px;
} }
p.hint { p.hint {
@ -172,15 +170,10 @@ code {
font-size: 14px; font-size: 14px;
color: var(--primary-text-color); color: var(--primary-text-color);
display: block; display: block;
margin-bottom: 8px;
word-wrap: break-word; word-wrap: break-word;
font-weight: 500; font-weight: 500;
} }
.hint {
margin-top: 6px;
}
ul { ul {
flex: 390px; flex: 390px;
} }
@ -436,6 +429,7 @@ code {
} }
select { select {
appearance: none;
box-sizing: border-box; box-sizing: border-box;
font-size: 16px; font-size: 16px;
color: var(--primary-text-color); color: var(--primary-text-color);
@ -451,6 +445,23 @@ code {
padding-right: 30px; padding-right: 30px;
height: 41px; height: 41px;
position: relative; position: relative;
margin-top: 8px;
cursor: pointer;
}
.select-wrapper::after {
display: block;
font-family: 'ForkAwesome';
content: '';
width: 10px;
position: absolute;
right: 12px;
top: 1px;
border-left: 1px solid var(--highlight-text-color);
height: 39px;
padding: 12px;
box-sizing: border-box;
pointer-events: none;
} }
.label_input { .label_input {