joyent-portal/packages/ui-toolkit/src/base/global.js

54 lines
975 B
JavaScript

import { css } from 'styled-components';
import remcalc from 'remcalc';
export default ({ theme }) => css`
@import url('${theme.font.href()}');
@import url('${theme.monoSpaceFont.href()}');
[hidden] {
display: none;
}
html, body {
font-display: optional;
font-family: ${
theme.font.family
}, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, Helvetica, sans-serif;
font-weight: ${theme.font.weight.normal};
}
html {
line-height: 1.15;
text-size-adjust: 100%;
}
body {
font-size: 15px;
margin: 0;
padding: 0;
background: ${theme.background};
color: ${theme.text};
}
html,
body,
#root {
min-height: 100vh;
}
body > #root {
display: flex;
flex-flow: column;
}
.CodeMirror,
.ReactCodeMirror {
height: 100% !important;
}
.CodeMirror {
border: solid 1px ${theme.grey};
margin: ${remcalc(8)} 0 ${remcalc(8)} 0;
}
`;