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> </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

@ -1,20 +1,25 @@
@import "/fonts/faktos.css"; @import "/fonts/faktos.css";
@import "/fonts/dosis/dosis.css"; @import "/fonts/dosis/dosis.css";
@font-face { @font-face {
font-family: "Faktos"; font-family: "Faktos";
font-style: normal; font-style: normal;
src: url(/fonts/Faktos.ttf) format("truetype"); src: url(/fonts/Faktos.ttf) format("truetype");
} }
@font-face { @font-face {
font-family: "Dosis"; font-family: "Dosis";
src: url(/fonts/dosis/Dosis-VariableFont_wght.ttf) format("truetype"); src: url(/fonts/dosis/Dosis-VariableFont_wght.ttf) format("truetype");
} }
: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;
@ -24,46 +29,52 @@
--font-scale-14: 2.3125rem; --font-scale-14: 2.3125rem;
--font-scale-15: 3.0625rem; --font-scale-15: 3.0625rem;
--oxford-blue: hsla(226, 60%, 10%, 1); --oxford-blue: hsla(226, 60%, 10%, 1);
--royal-blue-dark: hsla(218, 100%, 16%, 1); --royal-blue-dark: hsla(218, 100%, 16%, 1);
--indigo-dye: hsla(209, 95%, 24%, 1); --indigo-dye: hsla(209, 95%, 24%, 1);
--cg-blue: hsla(193, 80%, 35%, 1); --cg-blue: hsla(193, 80%, 35%, 1);
--white: hsla(20, 60%, 99%, 1); --white: hsla(20, 60%, 99%, 1);
--main-width: 60em; --main-width: 60em;
} }
input.short { input.short {
width: 5em !important; width: 5em !important;
} }
body {
position: relative;
width: 100%;
height: 100%;
background-color: var(--white);
color: #333;
margin: 0;
padding: 8px;
box-sizing: border-box;
}
body { a {
position: relative; color: rgb(0, 100, 200);
width: 100%; text-decoration: none;
height: 100%; }
background-color: var(--white);
color: #333;
margin: 0;
padding: 8px;
box-sizing: border-box;
}
a { a:hover {
color: rgb(0, 100, 200); text-decoration: underline;
text-decoration: none; }
}
a:hover { a:visited {
text-decoration: underline; color: rgb(0, 80, 160);
} }
a:visited { h1 {
color: rgb(0, 80, 160); font-size: var(--font-scale-15);
} }
h2 {
font-size: var(--font-scale-14);
h1 { font-size: var(--font-scale-15); } }
h2 { font-size: var(--font-scale-14); } h3 {
h3 { font-size: var(--font-scale-13); } font-size: var(--font-scale-13);
h4 { font-size: var(--font-scale-12); } }
h4 {
font-size: var(--font-scale-12);
}