From 77846acbd6c22c3bd1b377f8ce9596287038db31 Mon Sep 17 00:00:00 2001 From: Yanick Champoux Date: Mon, 17 Apr 2023 09:16:34 -0400 Subject: [PATCH 1/5] move sections styling --- src/lib/components/Section.svelte | 3 +++ src/lib/components/ShipEdit.svelte | 10 ++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/lib/components/Section.svelte b/src/lib/components/Section.svelte index fe3edf6..39e9a51 100644 --- a/src/lib/components/Section.svelte +++ b/src/lib/components/Section.svelte @@ -15,9 +15,12 @@ grid-column: 1 / span 3 !important; align-items: baseline; gap: 1em; + margin-bottom: 1em; + background-color: var(--primary-background); } h2 { font-weight: bold; + font-size: var(--font-scale-12); } hr { flex: 1; diff --git a/src/lib/components/ShipEdit.svelte b/src/lib/components/ShipEdit.svelte index 242843f..ada6960 100644 --- a/src/lib/components/ShipEdit.svelte +++ b/src/lib/components/ShipEdit.svelte @@ -1,9 +1,7 @@ -
- - - - -
+ + + + diff --git a/src/lib/components/ShipEdit/Identification.svelte b/src/lib/components/ShipEdit/Identification.svelte index e15da04..6381b18 100644 --- a/src/lib/components/ShipEdit/Identification.svelte +++ b/src/lib/components/ShipEdit/Identification.svelte @@ -1,12 +1,14 @@
- + + + arrow_drop_down
diff --git a/src/lib/components/ShipEdit/Identification/ShipCost.svelte b/src/lib/components/ShipEdit/Identification/ShipCost.svelte index a07151c..05e326e 100644 --- a/src/lib/components/ShipEdit/Identification/ShipCost.svelte +++ b/src/lib/components/ShipEdit/Identification/ShipCost.svelte @@ -1,7 +1,6 @@
- - mass +
{#if withinBudget} @@ -54,10 +53,6 @@ grid-column: span 3; justify-content: space-around; } - input { - width: 5em; - display: inline !important; - } .mass_symbol { width: 0.75em; display: inline-block; diff --git a/src/lib/components/ShipEdit/Propulsion/Engine.svelte b/src/lib/components/ShipEdit/Propulsion/Engine.svelte index 27f2988..84d892b 100644 --- a/src/lib/components/ShipEdit/Propulsion/Engine.svelte +++ b/src/lib/components/ShipEdit/Propulsion/Engine.svelte @@ -2,7 +2,7 @@
diff --git a/src/lib/style/index.css b/src/lib/style/index.css index b6ead55..307d35a 100644 --- a/src/lib/style/index.css +++ b/src/lib/style/index.css @@ -62,52 +62,6 @@ input.short { color: rgb(0, 80, 160); } - label { - display: block; - } - - input, - button, - select, - textarea { - font-family: inherit; - font-size: inherit; - padding: 0.4em; - margin: 0 0 0.5em 0; - box-sizing: border-box; - border: 1px solid #ccc; - border-radius: 2px; - } - - input:disabled { - color: #ccc; - } - - input[type="range"] { - height: 0; - } - - /* input, */ - /* select { */ - /* border: 0px; */ - /* border-bottom: 1px solid var(--indigo-dye); */ - /* } */ - - input:focus, - select:focus { - border: 1px solid var(--indigo-dye); - } - - input:not([type="checkbox"]):not([type="radio"]) { - border: 0px; - border-bottom: 1px solid var(--indigo-dye); - border-radius: 0px; - height: calc( - 1rem * var(--line-height) + var(--form-element-spacing-vertical) * 1 - ); - padding: 0 0.5rem; - text-align: center; - } h1 { font-size: var(--font-scale-15); } h2 { font-size: var(--font-scale-14); } From 6990954e3b838d6dba93bb2691c73c98dab86d4d Mon Sep 17 00:00:00 2001 From: Yanick Champoux Date: Thu, 20 Apr 2023 10:11:56 -0400 Subject: [PATCH 3/5] identification --- .../ShipEdit/Identification/ShipCost.svelte | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/lib/components/ShipEdit/Identification/ShipCost.svelte b/src/lib/components/ShipEdit/Identification/ShipCost.svelte index 05e326e..776604e 100644 --- a/src/lib/components/ShipEdit/Identification/ShipCost.svelte +++ b/src/lib/components/ShipEdit/Identification/ShipCost.svelte @@ -1,6 +1,7 @@
- + + Weight
{#if withinBudget} @@ -13,8 +14,9 @@
- - {cost} + + + Paid
@@ -77,8 +79,7 @@ div.cost { grid-column: 3; } - span.cost:after { - content: "\00A4"; - margin-left: 0.5em; + i { + top: 65%; } From a56fb3e7695ccaf2d05ed28647f16788e4778f18 Mon Sep 17 00:00:00 2001 From: Yanick Champoux Date: Thu, 20 Apr 2023 11:54:18 -0400 Subject: [PATCH 4/5] wip --- src/lib/components/Field.svelte | 5 ++- .../ShipEdit/Propulsion/Engine.svelte | 8 ++++- .../components/ShipEdit/Propulsion/Ftl.svelte | 7 ++-- .../ShipEdit/Structure/Screens.svelte | 1 + .../ShipEdit/Structure/Streamlining.svelte | 33 +++++++++---------- .../ShipEdit/Weaponry/AddWeapon.svelte | 9 +++-- .../Weaponry/Weapon/Beam/index.svelte | 8 +++-- .../ShipEdit/Weaponry/Weapon/index.svelte | 2 +- src/lib/components/ShipItem.svelte | 11 +++---- 9 files changed, 49 insertions(+), 35 deletions(-) diff --git a/src/lib/components/Field.svelte b/src/lib/components/Field.svelte index 334bab2..69f0394 100644 --- a/src/lib/components/Field.svelte +++ b/src/lib/components/Field.svelte @@ -3,7 +3,7 @@ {#if label} - + {/if}
@@ -13,6 +13,9 @@ export let placeholder = label; export let suffix = false; + export let activeLabel = undefined; + + $: active = typeof activeLabel === "boolean" ? activeLabel : value; diff --git a/src/lib/components/ShipEdit/Propulsion/Ftl.svelte b/src/lib/components/ShipEdit/Propulsion/Ftl.svelte index a6bbd47..f078dcb 100644 --- a/src/lib/components/ShipEdit/Propulsion/Ftl.svelte +++ b/src/lib/components/ShipEdit/Propulsion/Ftl.svelte @@ -1,12 +1,13 @@ - +
FTL drive
+