web: cleanup common styles.

This commit is contained in:
Jonathan Bernard 2019-04-10 10:54:01 -05:00
parent cc23676f9b
commit b83550f70f
4 changed files with 36 additions and 9 deletions

@ -1,7 +1,7 @@
<template> <template>
<div id="app"> <div id="app">
<NavBar></NavBar> <NavBar></NavBar>
<router-view/> <router-view class=main />
</div> </div>
</template> </template>
<script lang="ts" src="./app.ts"></script> <script lang="ts" src="./app.ts"></script>

@ -8,23 +8,24 @@ body {
color: $fg-primary; color: $fg-primary;
} }
h1, h2, h3 { font-family: 'Exo 2'; } h1, h2, h3 { font-family: $header-font; }
h1 { font-size: 2rem; } h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; } h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; } h3 { font-size: 1.2rem; }
#app { #app {
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
align-items: stretch;
border: 0; border: 0;
display: flex; display: flex;
align-items: stretch; font-family: $body-font;
font-family: 'Lato', 'Avenir', Helvetica, Arial, sans-serif;
margin: 0; margin: 0;
min-height: 100vh; min-height: 100vh;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
& > * { padding: 1rem 2rem; } & > * { padding: 1rem 2rem; }
} }

@ -1,9 +1,15 @@
@import '~@/styles/vars';
.btn, .btn,
.btn-action { .btn-action {
border: 0; border: 0;
border-radius: .25em; border-radius: .25em;
cursor: pointer; cursor: pointer;
font-family: $body-font;
font-weight: bold;
padding: .5em 1em; padding: .5em 1em;
a { text-decoration: none; }
} }
.btn-action { .btn-action {
@ -14,14 +20,31 @@
&:hover { &:hover {
background-color: darken($color2, 5%); background-color: darken($color2, 5%);
} }
}
a.btn,
a.btn-action { text-decoration: none; }
.header,
.header-action {
align-items: baseline;
font-size: 1.2rem;
margin-bottom: 2rem;
} }
.header-action { .header-action {
align-items: baseline;
display: flex; display: flex;
font-size: 1.2rem;
justify-content: space-between; justify-content: space-between;
& > * { display: inline-block; } & > * { display: inline-block; }
& > button { font-size: inherit; } & > .btn, & > .btn-action { font-size: inherit; }
}
.main { flex-grow: 1; }
input,
select {
font-size: inherit;
padding: .35em .5em;
} }

@ -40,6 +40,9 @@ $screen-small: 640px;
$screen-wide: 1200px; $screen-wide: 1200px;
$screen-ultrawide: 1600px; $screen-ultrawide: 1600px;
$body-font: 'Lato', 'Avenir', Helvetica, Arial, sans-serif;
$header-font: 'Exo 2';
/** ### forSize /** ### forSize
* This mixin allows us to apply some rules selectively based on the screen * This mixin allows us to apply some rules selectively based on the screen
* size. There are three primary sizes: `small`, `medium`, and `large`, which * size. There are three primary sizes: `small`, `medium`, and `large`, which