Skip to content
Snippets Groups Projects
Commit b666afa3 authored by Dorine Lambinet's avatar Dorine Lambinet
Browse files

Retire les flèches des inputs number et réduit la taille des input.

parent f0c46847
No related branches found
No related tags found
1 merge request!48Ui etiquette cas type
......@@ -210,7 +210,7 @@
{#if isInput}
{#if variable.possible_values !== undefined}
<select
class="p-1 pr-8 rounded my-1 focus:border-le-bleu focus:text-le-bleu"
class="w-44 p-1 pr-2 rounded my-1 focus:border-le-bleu focus:text-le-bleu"
on:blur={(event) => changeValue(event, populationId)}
on:change={(event) => changeValue(event, populationId)}
value={getSituationVariableValue(
......@@ -227,6 +227,7 @@
{:else if variable.value_type === "bool"}
<label>
<input
class="w-24 p-1 rounded mr-1 my-1 focus:border-le-bleu focus:text-le-bleu"
checked={asBoolean(
getSituationVariableValue(
situation,
......@@ -235,7 +236,6 @@
year,
),
)}
class="p-1 rounded mr-1 my-1 focus:border-le-bleu focus:text-le-bleu"
on:change={(event) => changeValue(event, populationId)}
type="checkbox"
/>
......@@ -243,7 +243,7 @@
</label>
{:else if variable.value_type === "date"}
<input
class="p-1 rounded my-1 focus:border-le-bleu focus:text-le-bleu"
class="w-44 p-1 rounded my-1 focus:border-le-bleu focus:text-le-bleu"
on:change={(event) => changeValue(event, populationId)}
type="date"
value={asString(
......@@ -258,7 +258,7 @@
{:else if ["float", "int"].includes(variable.value_type)}
{#if situation.slider !== undefined && situation.slider.entity === variable.entity && situation.slider.id === populationId && situation.slider.name === variable.name}
<input
class="p-1 rounded my-1"
class="w-24 p-1 rounded my-1"
disabled
type="number"
value={asNumber(
......@@ -272,7 +272,7 @@
/>
{:else}
<input
class="p-1 rounded my-1 focus:border-le-bleu focus:text-le-bleu"
class="w-24 p-1 rounded my-1 focus:border-le-bleu focus:text-le-bleu"
on:change={(event) => changeValue(event, populationId)}
type="number"
value={asNumber(
......@@ -311,7 +311,7 @@
{/if}
{:else}
<input
class="p-1 rounded my-1 focus:border-le-bleu focus:text-le-bleu"
class="w-24 p-1 rounded my-1 focus:border-le-bleu focus:text-le-bleu"
on:change={(event) => changeValue(event, populationId)}
type="text"
value={asString(
......@@ -343,3 +343,13 @@
</div>
</div>
</section>
<style>
input::-webkit-inner-spin-button,
input::-webkit-outer-spin-button {
-webkit-appearance: none;
}
input[type="number"] {
-moz-appearance: textfield;
}
</style>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment