vertical rythm for the editor

docks66-json-schema
Yanick Champoux 2023-05-01 12:41:39 -04:00
parent 41b9c447c7
commit 962e48cedd
8 changed files with 83 additions and 47 deletions

2
NOTES Normal file
View File

@ -0,0 +1,2 @@
vertical rythm: 16px = 1rem
24px = 1.5rem <== ?

View File

@ -43,6 +43,9 @@
</script> </script>
<style> <style>
h1 {
line-height: calc(3 * var(--vertical-rythm));
}
header nav { header nav {
align-items: baseline; align-items: baseline;
font-family: "Faktos"; font-family: "Faktos";

View File

@ -15,12 +15,14 @@
grid-column: 1 / span 3 !important; grid-column: 1 / span 3 !important;
align-items: baseline; align-items: baseline;
gap: 1em; gap: 1em;
margin-bottom: 1em; margin-bottom: 1rem;
background-color: var(--primary-background); background-color: var(--primary-background);
} }
h2 { h2 {
font-weight: bold; font-weight: bold;
font-size: var(--font-scale-12); font-size: var(--font-scale-12);
margin: 0px;
height: 2rem;
} }
hr { hr {
flex: 1; flex: 1;

View File

@ -57,6 +57,8 @@
.identification-row { .identification-row {
display: flex; display: flex;
align-items: start; align-items: start;
margin-top: 1rem;
margin-bottom: 1rem;
} }
select { select {
min-width: 10em; min-width: 10em;

View File

@ -37,4 +37,7 @@
label { label {
margin-left: 2em !important; margin-left: 2em !important;
} }
div.field {
margin-bottom: 0px;
}
</style> </style>

View File

@ -7,7 +7,7 @@
on:click={() => clickArc(arc)} on:click={() => clickArc(arc)}
/> />
{/each} {/each}
<circle cx="50%" cy="50%" r={size / 3} /> <circle cx="50%" cy="50%" r={inner} />
<slot /> <slot />
</svg> </svg>
@ -19,6 +19,7 @@
export let selected = []; export let selected = [];
export let size = 60; export let size = 60;
export let inner = size / 3;
const dispatch = createEventDispatcher(); const dispatch = createEventDispatcher();

Before

Width:  |  Height:  |  Size: 634 B

After

Width:  |  Height:  |  Size: 662 B

View File

@ -19,7 +19,13 @@
<i>arrow_drop_down</i> <i>arrow_drop_down</i>
</Field> </Field>
<Arcs selected={arcs} on:clickArc={({ detail }) => setArcs(detail)} /> <div class="arcs">
<Arcs
size={48}
selected={arcs}
on:clickArc={({ detail }) => setArcs(detail)}
/>
</div>
<script> <script>
import { getContext } from "svelte"; import { getContext } from "svelte";
@ -93,3 +99,9 @@
$: memoChange(weaponClass, ...arcs); $: memoChange(weaponClass, ...arcs);
</script> </script>
<style>
.arcs {
margin-top: 0.5rem;
}
</style>

View File

@ -12,9 +12,14 @@
} }
:root { :root {
--font: "Dosis", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; --font: "Dosis", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
--main-font-family: "Dosis", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
--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;
--font-family: "Dosis", -apple-system, BlinkMacSystemFont, "Segoe UI";
--vertical-rythm: 1.5rem;
/* == 24px */
--font-scale-9: 0.75rem; --font-scale-9: 0.75rem;
--font-scale-10: 1rem; --font-scale-10: 1rem;
@ -37,7 +42,6 @@ input.short {
width: 5em !important; width: 5em !important;
} }
body { body {
position: relative; position: relative;
width: 100%; width: 100%;
@ -62,8 +66,15 @@ input.short {
color: rgb(0, 80, 160); color: rgb(0, 80, 160);
} }
h1 {
h1 { font-size: var(--font-scale-15); } font-size: var(--font-scale-15);
h2 { font-size: var(--font-scale-14); } }
h3 { font-size: var(--font-scale-13); } h2 {
h4 { font-size: var(--font-scale-12); } font-size: var(--font-scale-14);
}
h3 {
font-size: var(--font-scale-13);
}
h4 {
font-size: var(--font-scale-12);
}