cosmetic fixes

This commit is contained in:
Henry Jameson 2018-11-26 00:19:28 +03:00
parent 1087741b0d
commit 94b481fa9c
3 changed files with 26 additions and 9 deletions

View file

@ -115,7 +115,7 @@ input, textarea, .select {
font-family: sans-serif; font-family: sans-serif;
font-family: var(--inputFont, sans-serif); font-family: var(--inputFont, sans-serif);
font-size: 14px; font-size: 14px;
padding: 8px 7px; padding: 8px .5em;
box-sizing: border-box; box-sizing: border-box;
display: inline-block; display: inline-block;
position: relative; position: relative;
@ -147,10 +147,13 @@ input, textarea, .select {
appearance: none; appearance: none;
background: transparent; background: transparent;
border: none; border: none;
margin: 0;
color: $fallback--text; color: $fallback--text;
color: var(--text, $fallback--text); color: var(--text, $fallback--text);
padding: 4px 2em 3px 3px; margin: 0;
padding: 0 2em 0 .2em;
font-family: sans-serif;
font-family: var(--inputFont, sans-serif);
font-size: 14px;
width: 100%; width: 100%;
z-index: 1; z-index: 1;
height: 29px; height: 29px;

View file

@ -1,5 +1,5 @@
<template> <template>
<div class="font-control style-control"> <div class="font-control style-control" :class="{ custom: isCustom }">
<label :for="preset === 'custom' ? name : name + '-font-switcher'" class="label"> <label :for="preset === 'custom' ? name : name + '-font-switcher'" class="label">
{{label}} {{label}}
</label> </label>
@ -16,18 +16,18 @@
:disabled="!present" :disabled="!present"
v-model="preset" v-model="preset"
class="font-switcher" class="font-switcher"
id="name + '-font-switcher'"> :id="name + '-font-switcher'">
<option v-for="option in availableOptions" :value="option"> <option v-for="option in availableOptions" :value="option">
{{ option }} {{ option === 'custom' ? $t('settings.style.fonts.custom') : option }}
</option> </option>
</select> </select>
<i class="icon-down-open"/> <i class="icon-down-open"/>
</label> </label>
<input <input
v-if="preset === 'custom'" v-if="isCustom"
class="custom-font" class="custom-font"
type="text" type="text"
id="name" :id="name"
v-model="family"> v-model="family">
</div> </div>
</template> </template>
@ -71,6 +71,9 @@ export default {
this.$emit('input', this.lValue) this.$emit('input', this.lValue)
} }
}, },
isCustom () {
return this.preset === 'custom'
},
preset: { preset: {
get () { get () {
console.log(this.family) console.log(this.family)
@ -97,5 +100,15 @@ export default {
input.custom-font { input.custom-font {
min-width: 10em; min-width: 10em;
} }
&.custom {
.select {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.custom-font {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
}
} }
</style> </style>

View file

@ -248,7 +248,8 @@
}, },
"family": "Font name", "family": "Font name",
"size": "Size (in px)", "size": "Size (in px)",
"weight": "Weight (boldness)" "weight": "Weight (boldness)",
"custom": "Custom"
} }
} }
}, },