Files
hoppscotch/assets/css/styles.scss
2019-10-25 13:44:34 +05:30

602 lines
9.1 KiB
SCSS

$responsiveWidth: 720px;
// Make theme transition smoother.
body.afterLoad {
&,
& * {
transition: background-color 0.2s ease-in-out,
border 0.2s ease-in-out;
}
}
::selection {
background-color: var(--ac-sel-color);
color: var(--act-color);
}
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.3);
border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
background-color: rgba(0, 0, 0, 0.5);
}
::placeholder {
color: var(--fg-light-color);
opacity: 0.3;
}
* {
box-sizing: border-box;
outline: 0;
border: 0;
}
a {
display: inline-flex;
color: inherit;
text-decoration: none;
font-weight: 700;
}
body {
background-color: var(--bg-color);
color: var(--fg-color);
font-weight: 500;
font-size: 16px;
font-family: "Poppins", "Roboto", "Noto", sans-serif;
line-height: 1.5;
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
user-select: none;
}
h1,
h2,
h3 {
margin: 0;
font-weight: 700;
}
.tooltip {
display: block !important;
z-index: 10000;
.tooltip-inner {
background: #353535;
color: white;
border-radius: 16px;
padding: 5px 10px 4px;
}
.tooltip-arrow {
width: 0;
height: 0;
border-style: solid;
position: absolute;
margin: 5px;
border-color: #353535;
z-index: 1;
}
&[x-placement^="top"] {
margin-bottom: 5px;
.tooltip-arrow {
border-width: 5px 5px 0 5px;
border-left-color: transparent !important;
border-right-color: transparent !important;
border-bottom-color: transparent !important;
bottom: -5px;
left: calc(50% - 5px);
margin-top: 0;
margin-bottom: 0;
}
}
&[x-placement^="bottom"] {
margin-top: 5px;
.tooltip-arrow {
border-width: 0 5px 5px 5px;
border-left-color: transparent !important;
border-right-color: transparent !important;
border-top-color: transparent !important;
top: -5px;
left: calc(50% - 5px);
margin-top: 0;
margin-bottom: 0;
}
}
&[x-placement^="right"] {
margin-left: 5px;
.tooltip-arrow {
border-width: 5px 5px 5px 0;
border-left-color: transparent !important;
border-top-color: transparent !important;
border-bottom-color: transparent !important;
left: -5px;
top: calc(50% - 5px);
margin-left: 0;
margin-right: 0;
}
}
&[x-placement^="left"] {
margin-right: 5px;
.tooltip-arrow {
border-width: 5px 0 5px 5px;
border-top-color: transparent !important;
border-right-color: transparent !important;
border-bottom-color: transparent !important;
right: -5px;
top: calc(50% - 5px);
margin-left: 0;
margin-right: 0;
}
}
&.popover {
$color: #f9f9f9;
.popover-inner {
background: $color;
color: #353535;
padding: 24px;
border-radius: 5px;
box-shadow: 0 5px 30px rgba(#353535, .1);
}
.popover-arrow {
border-color: $color;
}
}
&[aria-hidden='true'] {
visibility: hidden;
opacity: 0;
transition: opacity .15s, visibility .15s;
}
&[aria-hidden='false'] {
visibility: visible;
opacity: 1;
transition: opacity .15s;
}
}
h3.title {
margin: 4px;
}
header,
footer {
&>div {
display: flex;
padding: 16px;
width: 100%;
align-items: center;
justify-content: space-between;
}
}
nav {
a:not(:last-of-type) {
margin-right: 15px;
}
}
body.sticky-footer footer {
opacity: .25;
}
.logo {
color: var(--ac-color);
}
button {
display: inline-flex;
align-items: center;
justify-content: center;
margin: 4px;
padding: 0 16px;
border-radius: 20px;
background-color: var(--ac-color);
color: var(--act-color);
font-weight: 700;
font-size: 16px;
font-family: "Poppins", "Roboto", "Noto", sans-serif;
transition: all 0.2s ease-in-out;
fill: var(--act-color);
height: 40px;
cursor: pointer;
span {
display: inline-flex;
margin-left: 8px;
}
&.icon {
background-color: var(--bg-color);
color: var(--fg-light-color);
fill: var(--fg-light-color);
&:not([disabled]):hover {
color: var(--fg-color);
fill: var(--fg-color);
}
}
&:not([disabled]):hover {
color: var(--act-color);
fill: var(--act-color);
}
}
fieldset {
margin: 16px 0;
border: 1px solid var(--brd-color);
border-radius: 8px;
background-color: var(--bg-color);
}
legend {
display: flex;
align-items: center;
justify-content: center;
color: var(--fg-color);
font-weight: 700;
cursor: pointer;
i {
margin-left: 8px;
}
}
fieldset.blue legend {
color: #57b5f9;
}
fieldset.gray legend {
color: #bcc2cd;
}
fieldset.green legend {
color: #50fa7b;
}
fieldset.cyan legend {
color: #8be9fd;
}
fieldset.purple legend {
color: #bd93f9;
}
fieldset.orange legend {
color: #ffb86c;
}
fieldset.pink legend {
color: #ff79c6;
}
fieldset.red legend {
color: #ff5555;
}
fieldset.yellow legend {
color: #f1fa8c;
}
.hidden {
display: none;
}
select,
input,
option,
textarea,
pre {
margin: 4px;
padding: 8px;
border-radius: 8px;
background-color: var(--bg-dark-color);
color: var(--fg-color);
font-size: 16px;
font-family: 'Roboto Mono', monospace;
transition: all 0.2s ease-in-out;
user-select: text;
width: calc(100% - 8px);
min-height: 40px;
resize: vertical;
text-overflow: ellipsis;
&:not([readonly]):hover {
background-color: var(--bg-dark-color);
}
}
pre {
display: grid;
}
code {
height: 336px;
border-radius: 8px;
}
.hljs,
.hljs-subst {
background-color: var(--bg-dark-color) !important;
color: var(--fg-color) !important;
font-family: 'Roboto Mono', monospace;
}
select,
input,
option {
height: 40px;
}
input[type="checkbox"] {
display: none;
&,
&+label {
vertical-align: middle;
cursor: pointer;
&:before {
content: "\2714";
border: 1px solid var(--fg-color);
border-radius: 8px;
display: inline-flex;
height: 16px;
width: 16px;
align-items: center;
justify-content: center;
margin: 8px 8px 8px 0;
color: transparent;
transition: all 0.2s ease-in-out;
}
}
&:checked+label:before {
background-color: var(--ac-color);
border-color: var(--ac-color);
color: var(--act-color);
}
}
.error,
.disabled,
[disabled] {
background-color: var(--err-color);
color: var(--fg-light-color);
fill: var(--fg-light-color);
cursor: default;
&.icon {
color: var(--bg-color);
fill: var(--bg-color);
}
}
label {
padding: 4px;
color: var(--fg-light-color);
}
ul,
ol {
display: flex;
margin: 4px 0 4px;
padding: 0;
list-style-type: none;
}
ul li,
ol li {
display: inline-flex;
flex-direction: column;
flex-grow: 1;
}
.flex-wrap {
display: flex;
align-items: center;
justify-content: space-between;
}
.show-on-small-screen {
display: flex;
}
@media (max-width: $responsiveWidth) {
header div {
display: flex;
text-align: center;
flex-direction: column;
nav {
display: inline-flex;
margin-top: 20px;
}
}
ul,
ol {
flex-direction: column;
}
ul li,
ol li {
display: flex;
}
.hide-on-small-screen {
display: none;
}
.show-on-small-screen {
display: inline-flex;
}
}
#installPWA {
display: none;
}
.info-response {
color: #ffeb3b;
}
.success-response {
color: #4bb543;
}
.redir-response {
color: #ff5722;
}
.cl-error-response {
color: #a63232;
}
.sv-error-response {
color: #b71c1c;
}
.missing-data-response {
background-color: var(--err-color);
}
.virtual-list::-webkit-scrollbar {
width: 0;
}
fieldset#history {
.method-list-item {
position: relative;
span {
position: absolute;
top: 12px;
right: 12px;
font-family: 'Roboto Mono', monospace;
}
}
}
.align-left {
text-align: left;
}
.align-center {
text-align: center;
}
.align-right {
text-align: right;
}
#response-details-wrapper {
position: relative;
overflow: hidden;
border-radius: 8px;
textarea {
margin: 0;
width: 100%;
}
.covers-response {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: white;
height: 100%;
width: 100%;
}
}
#send {
#hidden-message {
display: none;
}
&.show {
display: flex;
position: fixed;
top: 16px;
right: 16px;
z-index: 1;
#hidden-message {
display: block;
margin-left: 4px;
}
}
}
section {
display: flex;
flex-wrap: wrap;
}
div.tab {
width: 100%;
order: 1;
}
input[type="radio"],
div.tab {
display: none;
}
input[type="radio"]+label {
padding: 8px 16px;
border-bottom: 2px solid transparent;
cursor: pointer;
transition: all 0.2s ease-in-out;
&:hover {
border-color: var(--brd-color);
}
}
input[type="radio"]:checked+label {
border-color: var(--fg-color);
}
input[type="radio"]:checked+label+div.tab {
display: block;
}
.toasted-container .toasted {
justify-content: start !important;
}
.toasted.info {
background-color: var(--ac-color) !important;
color: var(--act-color) !important;
}
.toasted.bubble .action {
color: inherit !important;
}