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

66 lines
1.1 KiB
JavaScript
Raw Normal View History

import { css } from 'styled-components';
import remcalc from 'remcalc';
export default ({ theme }) => css`
@import url('${theme.font.href()}');
@import url('${theme.monoFont.href()}');
[hidden] {
display: none;
}
2018-01-04 17:52:56 +02:00
html, body {
font-display: optional;
font-family: ${theme.font.families};
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};
-webkit-font-smoothing: antialiased;
}
2017-09-27 17:44:57 +03:00
html,
body,
#root {
2018-03-06 03:47:30 +02:00
min-height: calc(100vh - ${remcalc(48)});
}
#header {
z-index: 9999;
2017-09-27 17:22:01 +03:00
}
body > #root {
display: flex;
flex-flow: column;
}
2018-05-25 18:27:05 +03:00
form {
margin: 0;
}
2017-09-27 17:22:01 +03:00
.CodeMirror {
border: solid ${remcalc(1)} ${theme.grey};
margin: ${remcalc(8)} 0 ${remcalc(8)} 0;
font-family: "Roboto Mono", monospace !important;
2018-04-06 17:53:44 +03:00
height: ${remcalc(180)} !important;
2017-09-27 17:22:01 +03:00
}
[name=user-script] .CodeMirror {
margin: 0;
}
2018-04-06 17:53:44 +03:00
form {
margin: 0;
}
`;