vertical rythm for the editor

This commit is contained in:
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>
<style>
h1 {
line-height: calc(3 * var(--vertical-rythm));
}
header nav {
align-items: baseline;
font-family: "Faktos";

View File

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

View File

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

View File

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

View File

@ -7,7 +7,7 @@
on:click={() => clickArc(arc)}
/>
{/each}
<circle cx="50%" cy="50%" r={size / 3} />
<circle cx="50%" cy="50%" r={inner} />
<slot />
</svg>
@ -19,6 +19,7 @@
export let selected = [];
export let size = 60;
export let inner = size / 3;
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>
</Field>
<Arcs selected={arcs} on:clickArc={({ detail }) => setArcs(detail)} />
<div class="arcs">
<Arcs
size={48}
selected={arcs}
on:clickArc={({ detail }) => setArcs(detail)}
/>
</div>
<script>
import { getContext } from "svelte";
@ -93,3 +99,9 @@
$: memoChange(weaponClass, ...arcs);
</script>
<style>
.arcs {
margin-top: 0.5rem;
}
</style>

View File

@ -1,20 +1,25 @@
@import "/fonts/faktos.css";
@import "/fonts/dosis/dosis.css";
@font-face {
@font-face {
font-family: "Faktos";
font-style: normal;
src: url(/fonts/Faktos.ttf) format("truetype");
}
@font-face {
}
@font-face {
font-family: "Dosis";
src: url(/fonts/dosis/Dosis-VariableFont_wght.ttf) format("truetype");
}
}
:root {
--font: "Dosis", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
--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",
--font: "Dosis", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
--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-10: 1rem;
@ -37,8 +42,7 @@ input.short {
width: 5em !important;
}
body {
body {
position: relative;
width: 100%;
height: 100%;
@ -47,23 +51,30 @@ input.short {
margin: 0;
padding: 8px;
box-sizing: border-box;
}
}
a {
a {
color: rgb(0, 100, 200);
text-decoration: none;
}
}
a:hover {
a:hover {
text-decoration: underline;
}
}
a:visited {
a:visited {
color: rgb(0, 80, 160);
}
}
h1 { font-size: var(--font-scale-15); }
h2 { font-size: var(--font-scale-14); }
h3 { font-size: var(--font-scale-13); }
h4 { font-size: var(--font-scale-12); }
h1 {
font-size: var(--font-scale-15);
}
h2 {
font-size: var(--font-scale-14);
}
h3 {
font-size: var(--font-scale-13);
}
h4 {
font-size: var(--font-scale-12);
}