adjust styles for chota

This commit is contained in:
Yanick Champoux 2022-03-20 14:42:59 -04:00
parent 4f9c70020a
commit 629bffdc9f
13 changed files with 27 additions and 33 deletions

View File

@ -30,4 +30,7 @@ $: dispatch.setSquadronType({type, id});
</script> </script>
<style> <style>
select {
width: inherit;
}
</style> </style>

View File

@ -1,7 +1,7 @@
<Section label="carrier"> <Section label="carrier">
<ShipItem {...reqs}> <ShipItem {...reqs}>
<Field label="bays"> <Field label="bays">
<input type="number" min="0" bind:value={bays} /> <input class="short" type="number" min="0" bind:value={bays} />
</Field> </Field>
</ShipItem> </ShipItem>

View File

@ -1,7 +1,7 @@
<ShipItem {...reqs}> <ShipItem {...reqs}>
<div> <div>
<Field label="thrust rating"> <Field label="thrust rating">
<input type="number" bind:value={rating} min="0" max="20" step="1" /> <input class="short" type="number" bind:value={rating} min="0" max="20" step="1" />
</Field> </Field>
<label><input type="checkbox" bind:checked={advanced} /> advanced</label> <label><input type="checkbox" bind:checked={advanced} /> advanced</label>

View File

@ -1,6 +1,6 @@
<div class="mass"> <div class="mass">
<Field label="ship tonnage"> <Field label="ship tonnage">
<input bind:value={mass} type="number" min="10" max="300" /> <input class="short" bind:value={mass} type="number" min="10" max="300" />
<span class="mass_symbol" /> <span class="mass_symbol" />
<div class="note" class:warning={!withinBudget}> <div class="note" class:warning={!withinBudget}>
@ -53,6 +53,7 @@
} }
input { input {
width: 5em; width: 5em;
display: inline !important;
} }
.mass_symbol:after { .mass_symbol:after {
content: url("/mass.svg"); content: url("/mass.svg");
@ -74,7 +75,7 @@
} }
.mass { .mass {
grid-column: 2; width: 15em;
} }
div.cost { div.cost {
grid-column: 3; grid-column: 3;

View File

@ -2,7 +2,7 @@
<div> <div>
<div class="nbr_layers"> <div class="nbr_layers">
<Field label="armour layers"> <Field label="armour layers">
<input type="number" min="0" bind:value={nbr_layers} /> <input class="short" type="number" min="0" bind:value={nbr_layers} />
</Field> </Field>
</div> </div>

View File

@ -1,5 +1,5 @@
<Field label={`layer ${layer}`}> <Field label={`layer ${layer}`}>
<input type="number" min="0" bind:value={rating} /> <input class="short" type="number" min="0" bind:value={rating} />
</Field> </Field>
<script> <script>

View File

@ -1,6 +1,6 @@
<ShipItem {...reqs}> <ShipItem {...reqs}>
<Field label="cargo"> <Field label="cargo">
<input type="number" min="0" bind:value={space} /> <input class="short" type="number" min="0" bind:value={space} />
</Field> </Field>
</ShipItem> </ShipItem>

View File

@ -1,6 +1,6 @@
<ShipItem {...reqs}> <ShipItem {...reqs}>
<Field label="hull"> <Field label="hull">
<input bind:value={rating} type="number" {min} {max} /> <input class="short" bind:value={rating} type="number" {min} {max} />
</Field> </Field>
</ShipItem> </ShipItem>

View File

@ -1,11 +1,11 @@
<ShipItem {...reqs}> <ShipItem {...reqs}>
<div> <div>
<Field label="screens"> <Field label="screens">
<input type="number" bind:value={standard} min="0" /> <input class='short' type="number" bind:value={standard} min="0" />
</Field> </Field>
<Field label="advanced screens"> <Field label="advanced screens">
<input type="number" bind:value={advanced} min="0" /> <input class='short' type="number" bind:value={advanced} min="0" />
</Field> </Field>
</div> </div>
</ShipItem> </ShipItem>

View File

@ -5,7 +5,7 @@
{/each} {/each}
</select> </select>
<button class="button small blue" on:click={addWeapon} >add weapon</button> <button class="button small primary" on:click={addWeapon} >add weapon</button>
</Field> </Field>
<script> <script>
@ -20,3 +20,10 @@
const addWeapon = () => ship.dispatch.addWeapon(type); const addWeapon = () => ship.dispatch.addWeapon(type);
</script> </script>
<style>
select {
width: inherit;
display: inline-block;
}
</style>

View File

@ -2,3 +2,7 @@
--main-font-family: "Dosis", -apple-system, BlinkMacSystemFont, "Segoe UI", --main-font-family: "Dosis", -apple-system, BlinkMacSystemFont, "Segoe UI",
Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
} }
input.short {
width: 5em !important;
}

View File

@ -3,10 +3,7 @@
<script> <script>
import { setContext } from "svelte"; import { setContext } from "svelte";
import '$lib/style/index.js';
import "../../static/fonts/faktos.css";
import "../../static/fonts/dosis/dosis.css";
import "../../static/global.css";
import shipStore from "$lib/store/ship.js"; import shipStore from "$lib/store/ship.js";
import App from "$lib/components/App.svelte"; import App from "$lib/components/App.svelte";

View File

@ -79,24 +79,6 @@ input[type="range"] {
height: 0; height: 0;
} }
button {
color: #333;
background-color: #f4f4f4;
outline: none;
}
button:disabled {
color: #999;
}
button:not(:disabled):active {
background-color: #ddd;
}
button:focus {
border-color: #666;
}
/* ---- inputs --- */ /* ---- inputs --- */
input, select { input, select {