insomnia/packages/insomnia-app/app/ui/css/layout/base.less
2021-03-03 19:43:17 +01:00

850 lines
11 KiB
Plaintext

html {
font-size: var(--font-size);
font-variant-ligatures: var(--font-ligatures);
}
html,
body,
#root {
width: 100%;
height: 100%;
}
html,
h1,
h2,
h3,
h4,
h5,
h6,
input {
font-weight: 400;
font-family: var(--font-default);
}
body {
margin: 0;
padding: 0;
}
summary {
outline: none;
}
h1,
h2,
h3,
h4,
h5,
h6 {
line-height: var(--font-line-height-md);
}
h1 {
font-size: var(--font-size-xxxl);
font-weight: var(--font-weight-regular);
}
h2 {
font-size: var(--font-size-xxl);
font-weight: var(--font-weight-regular);
}
h3 {
font-size: var(--font-size-xl);
font-weight: var(--font-weight-medium);
}
h4 {
font-size: var(--font-size-lg);
font-weight: var(--font-weight-medium);
}
h5 {
font-size: var(--font-size-md);
font-weight: var(--font-weight-medium);
}
h6 {
font-size: var(--font-size-xs);
font-weight: var(--font-weight-bold);
text-transform: uppercase;
}
p {
font-size: var(--font-size-md);
font-weight: var(--font-weight-regular);
line-height: var(--font-line-height-lg);
}
p,
h1,
h2,
h3 {
margin-bottom: var(--padding-sm);
margin-top: var(--padding-md);
}
hr {
width: 100%;
height: 0;
border: 0;
border-bottom: 1px solid var(--hl-md);
margin: var(--padding-md) 0;
}
hr.hr--spaced {
margin: var(--padding-lg) 0;
}
em {
font-style: italic;
}
label {
display: inline-block;
padding-top: var(--padding-xs);
}
ul.ul--pretty {
list-style: disc;
padding-left: var(--padding-lg);
margin-bottom: 1.5em;
}
small {
font-size: 0.85em;
}
.label--small,
label > small,
table th {
color: var(--hl);
font-weight: 600;
text-transform: uppercase;
font-size: var(--font-size-xs);
padding-bottom: var(--padding-xxs);
}
webview {
height: 100%;
width: 100%;
background-color: #fff;
}
table.table--fancy {
width: 100%;
td,
th {
padding: var(--padding-sm);
vertical-align: top;
}
&.table--compact td {
padding: var(--padding-xs);
}
&.table--valign-middle {
td,
th {
vertical-align: middle;
}
}
th {
text-align: left;
}
&.table--striped tbody tr:nth-child(odd) {
background: var(--hl-xs);
}
&.table--outlined {
th {
background: var(--hl-xxs);
}
&,
td {
border: 1px solid var(--hl-sm);
}
tr.table--no-outline-row td {
border-left: 0;
border-right: 0;
}
& {
border-radius: var(--radius-md);
border-collapse: unset;
}
td {
border-left: 0;
border-bottom: 0;
&:last-child {
border-right: 0;
}
}
}
}
code {
display: inline-block;
background: var(--hl-xs);
padding: var(--padding-xs) var(--padding-sm);
color: var(--color-font);
border: 1px solid var(--hl-sm);
font-size: 0.9em;
&.code--compact {
padding-top: 0;
padding-bottom: 0;
}
}
code,
pre,
.monospace {
font-family: var(--font-monospace);
tab-size: 4;
}
.font-normal {
font-family: var(--font-default);
}
.pre {
line-height: 1.3em;
white-space: pre;
}
div.notice,
p.notice {
text-align: center;
color: var(--color-font) !important;
padding: calc(var(--padding-sm) * 1.5);
margin-bottom: var(--padding-md);
border: 1px dotted var(--hl);
border-radius: var(--radius-md);
position: relative;
z-index: 0;
overflow: auto;
.pre {
line-height: 1.3em;
white-space: pre;
}
p {
min-width: 8rem;
padding: 0;
margin: 0;
}
a {
text-decoration: underline;
color: var(--color-font);
opacity: var(--opacity-subtle);
}
a:hover {
opacity: 1;
}
&::before {
content: ' ';
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: -1;
opacity: 0.05;
}
}
.notice.error {
border-color: var(--color-danger);
&::before {
background-color: var(--color-danger);
}
}
.notice.warning {
border-color: var(--color-warning);
&::before {
background-color: var(--color-warning);
}
}
.notice.success {
border-color: var(--color-success);
&::before {
background-color: var(--color-success);
}
}
.notice.info {
border-color: var(--color-info);
&::before {
background-color: var(--color-info);
}
}
.notice.subtle {
border-color: var(--hl-lg);
&::before {
opacity: 1;
background-color: var(--hl-xxs);
}
}
.notice.surprise {
border-color: var(--color-surprise);
&::before {
background-color: var(--color-surprise);
}
}
.text-center {
text-align: center !important;
}
.text-right {
text-align: right !important;
}
.text-left {
text-align: left !important;
}
.pull-right {
float: right;
}
.superscript {
vertical-align: super;
font-size: 0.75em;
}
blockquote {
border-left: 0.4em solid var(--hl-md);
padding: var(--padding-xxs) var(--padding-md);
p {
margin: var(--padding-xs) 0;
}
}
.img--circle {
border-radius: 50%;
}
.tall {
height: 100% !important;
}
.faint {
opacity: var(--opacity-subtle);
}
.super-faint {
opacity: calc(var(--opacity-subtle) * 0.8);
}
.super-duper-faint {
opacity: calc(var(--opacity-subtle) * 0.5);
}
.ultra-faint {
opacity: calc(var(--opacity-subtle) * 0.2);
}
.faded {
opacity: 0.7;
}
.muted {
color: var(--hl);
}
.auto-margin {
margin: auto;
}
.auto-margin-left {
margin-left: auto;
}
.outlined {
border: 1px solid var(--hl-md);
}
.valign-bottom {
vertical-align: bottom;
}
.vertically-center {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
.column {
display: flex;
flex-direction: column;
}
.row {
display: flex;
flex-direction: row;
align-items: center;
}
.row-fill {
display: flex;
flex-direction: row;
align-items: center;
align-content: stretch;
width: 100%;
&.row-fill--top {
align-items: start;
}
& > * {
width: 100%;
}
& > *:not(:first-child) {
padding-left: var(--padding-xs);
}
& > *:not(:last-child) {
padding-right: var(--padding-xs);
}
}
.row-around {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-around !important;
width: 100%;
box-sizing: border-box;
}
.row-spaced {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between !important;
width: 100%;
box-sizing: border-box;
}
.row-stretch {
display: flex;
flex-direction: row;
align-content: stretch;
align-items: stretch;
width: 100%;
}
.row--right {
justify-content: flex-end;
}
.row--top {
align-items: start;
}
.valign-middle {
vertical-align: middle;
}
.valign-top {
vertical-align: top;
}
.height-md {
height: var(--line-height-md);
}
.pointer {
cursor: pointer;
}
.wide {
width: 100% !important;
box-sizing: border-box;
}
.no-min-width {
min-width: 0;
}
.width-auto {
width: auto !important;
}
.margin-auto {
margin: auto;
}
.hide {
display: none;
}
.hidden {
visibility: hidden;
}
.relative {
position: relative;
}
/* Make all font awesome icons the same width */
i.fa:not(.fa--skinny) {
min-width: 1.1rem;
text-align: center;
}
i.fa.fa--fixed-width {
width: 1.6em;
}
.force-wrap {
word-break: break-all;
white-space: pre-wrap;
}
.force-word-wrap {
white-space: normal !important;
}
.force-pre-wrap {
white-space: pre-wrap !important;
}
.no-wrap {
white-space: nowrap;
}
.overflow-hidden {
overflow: hidden;
}
.wrap {
white-space: normal;
}
.border-top {
border-top: 1px solid var(--hl-md);
}
.pad {
box-sizing: border-box;
padding: var(--padding-md);
}
.pad-sm {
box-sizing: border-box;
padding: var(--padding-sm);
}
.pad-xs {
box-sizing: border-box;
padding: var(--padding-xs);
}
.pad-xxs {
box-sizing: border-box;
padding: var(--padding-xxs);
}
.pad-left {
box-sizing: border-box;
padding-left: var(--padding-md);
}
.pad-left-sm {
padding-left: var(--padding-sm);
}
.pad-right {
box-sizing: border-box;
padding-right: var(--padding-md);
}
.pad-right-sm {
padding-right: var(--padding-sm);
}
.pad-top {
box-sizing: border-box;
padding-top: var(--padding-md);
}
.pad-top-sm {
box-sizing: border-box;
padding-top: calc(var(--padding-sm));
}
.space-left {
margin-left: 0.3em;
}
.space-bottom {
margin-bottom: 0.3em;
}
.space-top {
margin-top: 0.3em;
}
.space-right {
margin-right: 0.3em;
}
.margin {
margin: var(--padding-md);
}
.margin-sm {
margin: var(--padding-sm);
}
.margin-md {
margin: var(--padding-md);
}
.margin-xs {
margin: var(--padding-xs);
}
.margin-top-sm {
margin-top: var(--padding-sm);
}
.margin-top {
margin-top: var(--padding-md);
}
.margin-left {
margin-left: var(--padding-md);
}
.margin-left-sm {
margin-left: var(--padding-sm);
}
.margin-right-sm {
margin-right: var(--padding-sm);
}
.margin-left-xs {
margin-left: var(--padding-xs);
}
.margin-right-xs {
margin-right: var(--padding-xs);
}
.margin-bottom {
margin-bottom: var(--padding-md);
}
.margin-bottom-sm {
margin-bottom: var(--padding-sm);
}
.margin-bottom-xs {
margin-bottom: var(--padding-xs);
}
.margin-top-sm {
margin-top: var(--padding-sm) !important;
}
.pad-bottom {
box-sizing: border-box;
padding-bottom: var(--padding-md);
}
.pad-bottom-sm {
box-sizing: border-box;
padding-bottom: var(--padding-sm);
}
.no-margin {
margin: 0 !important;
}
.no-margin-top {
margin-top: 0 !important;
}
.no-margin-bottom {
margin-bottom: 0 !important;
}
.no-pad {
padding: 0 !important;
}
.no-pad-bottom {
padding-bottom: 0;
}
.no-pad-right {
padding-right: 0;
}
.no-pad-left {
padding-left: 0;
}
.no-pad-top {
padding-top: 0 !important;
}
.no-margin-left {
margin-left: 0 !important;
}
.block {
display: block !important;
}
.grid {
display: grid !important;
}
.flex {
display: flex !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;
}
.text-shadow {
text-shadow: 0 0 0.2em rgba(0, 0, 0, 0.1);
}
.fa-outline::before {
-webkit-text-stroke: 1px rgba(0, 0, 0, 0.2);
}
::selection {
background-color: var(--hl-md);
}
.hide-scrollbars {
&::-webkit-scrollbar {
display: none;
}
}
.scrollable {
overflow: auto;
position: relative;
&.scrollable--no-bars::-webkit-scrollbar {
display: none;
}
}
.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;
}
.section__body {
border-right: 1px solid var(--hl-sm);
}
}
.fa-drag-handle:before {
content: '\f142\f142';
letter-spacing: 0.1em;
}
.bold,
strong {
font-weight: 600;
}
.not-bold {
font-weight: normal;
}
.underline {
text-decoration: underline;
}
.react-hot-loader-error-overlay > div {
position: fixed;
left: 0;
top: 0;
bottom: 0;
right: 0;
z-index: 9999999;
max-height: none !important;
button {
border: 2px solid black;
margin: 0.2em;
font-size: 0.8em;
padding: 0.2em 0.5em;
}
}