insomnia/app/ui/css/layout/base.less
2016-10-26 13:19:18 -07:00

363 lines
4.3 KiB
Plaintext

@import '../constants/colors';
@import '../constants/dimensions';
@import '../constants/fonts';
html {
font-size: @font-size;
}
html, body, #root {
width: 100%;
height: 100%;
}
html, h1, h2, h3, h4, h5, h6 {
font-weight: 400;
font-family: 'Open Sans', sans-serif;
}
body {
margin: 0;
padding: 0;
}
h1 {
font-size: @font-size-xxl;
}
h2 {
font-size: @font-size-xl;
}
h3 {
font-size: @font-size-lg;
}
h1, h2, h3 {
padding-bottom: 1em;
}
hr {
width: 100%;
height: 0;
border: 0;
border-bottom: 1px solid @hl-md;
margin: @padding-md 0;
}
em {
font-style: italic;
}
label {
display: inline-block;
padding-top: @padding-xs;
}
p {
margin-bottom: 1.5em;
}
label.label--small,
table th {
color: @hl;
text-transform: uppercase;
font-size: 0.8em;
padding-bottom: @padding-xxs;
}
webview {
height: 100%;
width: 100%;
background-color: @bg-super-light;
}
table {
width: 100%;
td, th {
padding: @padding-sm;
}
th {
text-align: left;
padding-bottom: @padding-sm;
}
&.table--striped tbody tr:nth-child(odd) {
background: @hl-xs;
}
}
code {
display: inline-block;
background: @hl-xs;
padding: @padding-xs @padding-sm;
color: @hl;
}
code, pre, .monospace {
font-family: @font-monospace;
}
.text-center {
text-align: center;
}
.text-right {
text-align: right;
}
.text-left {
text-align: left !important;
}
.pull-right {
float: right;
}
.img--circle {
border-radius: 50%;
}
.tall {
height: 100% !important;
}
.faint {
color: @hl;
}
.outlined {
border: 1px solid @hl-md;
}
.super-faint {
color: @hl-xl;
}
.valign-bottom {
vertical-align: bottom;
}
.pointer {
cursor: pointer;
}
.wide {
width: 100%;
box-sizing: border-box;
}
.relative {
position: relative;
}
/* Make all font awesome icons the same width */
i.fa {
min-width: 1.1rem;
text-align: center;
}
.force-wrap {
word-break: break-all;
white-space: pre-wrap;
}
.force-word-wrap {
white-space: normal;
}
.no-wrap {
white-space: nowrap;
}
.wrap {
white-space: normal;
}
.border-top {
border-top: 1px solid @hl-md;
}
.pad {
box-sizing: border-box;
padding: @padding-md;
}
.pad-sm {
box-sizing: border-box;
padding: @padding-sm;
}
.pad-left {
box-sizing: border-box;
padding-left: @padding-md;
}
.pad-right {
box-sizing: border-box;
padding-right: @padding-md;
}
.pad-top {
box-sizing: border-box;
padding-top: @padding-md;
}
.pad-top-sm {
box-sizing: border-box;
padding-top: @padding-sm;
}
.margin-top-sm {
margin-top: @padding-sm;
}
.margin-left {
margin-left: @padding-md;
}
.margin-right-sm {
margin-right: @padding-sm;
}
.pad-bottom {
box-sizing: border-box;
padding-bottom: @padding-md;
}
.no-pad-bottom {
padding-bottom: 0;
}
.no-pad-top {
padding-top: 0;
}
.pad-left-half {
padding-left: @padding-md / 2;
}
.pad-right-half {
padding-right: @padding-md / 2;
}
.no-pad {
padding: 0 !important;
}
.no-margin {
margin: 0 !important;
}
.block {
display: block !important;
}
.grid {
display: grid !important;
}
.inline-block {
display: inline-block !important;
}
.ellipsis {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.italic {
font-style: italic;
}
.selectable {
-webkit-user-select: text;
cursor: text;
}
.hide-scrollbars {
&::-webkit-scrollbar {
display: none;
}
}
.scrollable {
overflow: auto;
position: relative;
}
.scrollable-container {
position: relative;
& > .scrollable {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
}
.hover-scrollbars {
&::-webkit-scrollbar {
display: none;
}
&:hover::-webkit-scrollbar {
display: block;
}
}
.section.section--bordered {
.section__header {
border-right: 1px solid #eee;
&.bg-brand {
border-right-color: @bg-brand;
}
}
.section__body {
border-right: 1px solid @hl-sm;
}
}
strong {
font-weight: 600;
}
.hide-above-lg {
display: none;
}
.hide-above-md {
display: none;
}
@media (max-width: @breakpoint-lg) {
.hide-below-lg {
display: none;
}
.hide-above-lg {
display: initial;
}
}
@media (max-width: @breakpoint-md) {
html {
font-size: @font-size * 0.95;
}
.hide-below-md {
display: none;
}
.hide-above-md {
display: initial;
}
}