Files
hoppscotch/assets/css/styles.scss
Liyas Thomas 32d57814a9 🎉 Powered by Netlify
2020-01-22 19:29:11 +05:30

937 lines
14 KiB
SCSS

.page-enter-active,
.page-leave-active,
.layout-enter-active,
.layout-leave-active {
transition: opacity 0.2s;
}
.page-enter,
.page-leave-active,
.layout-enter,
.layout-leave-active {
opacity: 0;
}
$responsiveWidth: 768px;
::selection {
background-color: var(--ac-color);
color: var(--act-color);
}
::-webkit-scrollbar {
width: 4px;
height: 4px;
border-radius: 4px;
background-color: var(--bg-light-color);
}
::-webkit-scrollbar-thumb {
background-color: var(--fg-light-color);
border-radius: 8px;
&:hover {
background-color: var(--fg-color);
}
}
::placeholder {
color: var(--fg-light-color);
opacity: 0.3;
}
* {
box-sizing: border-box;
outline: 0;
border: 0;
}
html,
body {
background-color: var(--bg-color);
color: var(--fg-color);
font-weight: 500;
font-size: 14px;
font-family: "Poppins", "Roboto", "Noto", sans-serif;
line-height: 1.5;
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
user-select: none;
padding: 0;
margin: 0;
scroll-behavior: smooth;
}
// Make theme transition smoother.
body.afterLoad {
transition: background-color 0.2s ease-in-out;
}
body.sticky-footer footer {
opacity: 0.25;
}
a {
display: inline-flex;
color: inherit;
text-decoration: none;
transition: all 0.2s ease-in-out;
}
header,
footer {
& > div {
display: flex;
padding: 16px 8px;
width: 100%;
align-items: center;
justify-content: space-between;
}
}
.wrapper {
min-height: 100vh;
display: flex;
flex-direction: column;
}
.wrapper .page {
min-height: calc(100vh - 153px);
}
.header,
.content,
.columns,
.footer {
display: flex;
flex: 1;
}
.slide-in {
position: relative;
animation: slideIn 0.2s forwards ease-in-out;
}
@keyframes slideIn {
0% {
opacity: 0;
left: -16px;
}
100% {
opacity: 1;
left: 0px;
}
}
.logo {
font-size: 22px;
&:hover {
color: var(--ac-color);
}
}
.nav-first,
.sticky-inner {
display: flex;
order: 1;
flex-flow: column;
position: sticky;
top: 0;
align-self: flex-start;
}
.nav-first {
z-index: 1;
height: 100vh;
padding: 0 8px;
background-color: var(--bg-light-color);
}
.main {
display: flex;
flex-flow: column;
flex: 1;
order: 2;
position: relative;
padding: 0 16px;
height: 100%;
}
.nav-second {
display: flex;
width: 10%;
order: 3;
// comment below this to display
display: none;
}
nav.primary-nav {
display: flex;
flex-flow: column nowrap;
svg {
fill: var(--fg-light-color);
}
a {
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
padding: 14px;
border-radius: 50%;
background-color: var(--bg-light-color);
color: var(--fg-light-color);
fill: var(--fg-light-color);
margin: 8px 0;
transition: all 0.2s ease-in-out;
&:hover {
color: var(--fg-color);
fill: var(--fg-color);
svg {
fill: var(--fg-color);
}
}
&.nuxt-link-exact-active {
background-color: var(--ac-color);
color: var(--act-color);
fill: var(--act-color);
border-radius: 16px;
svg {
fill: var(--act-color);
}
}
}
}
nav.secondary-nav {
display: flex;
border-top: 1px dashed var(--brd-color);
ul {
display: flex;
flex-flow: column nowrap;
li {
display: flex;
a {
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
padding: 14px;
border-radius: 50%;
background-color: var(--bg-dark-color);
color: var(--fg-light-color);
margin: 8px 0;
&:hover {
color: var(--fg-color);
}
&.current {
color: var(--ac-color);
fill: var(--ac-color);
}
}
}
}
}
.footer {
flex-direction: column;
}
h1,
h2,
h3,
h4 {
display: flex;
align-items: center;
margin: 0;
font-weight: 700;
}
.tooltip {
$bgcolor: var(--tt-color);
$fgcolor: var(--fg-color);
display: block !important;
z-index: 10000;
.tooltip-inner {
background: $bgcolor;
color: $fgcolor;
border-radius: 8px;
padding: 8px 16px;
font-size: 12px;
font-weight: 500;
box-shadow: 0 4px 24px rgba(black, 0.1);
}
.tooltip-arrow {
width: 0;
height: 0;
border-style: solid;
position: absolute;
margin: 5px;
border-color: $bgcolor;
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 {
.wrapper {
min-height: auto;
}
.popover-inner {
background: $bgcolor;
color: $fgcolor;
padding: 4px;
border-radius: 8px;
box-shadow: 0 5px 30px rgba(black, 0.1);
max-height: 256px;
overflow: auto;
}
.popover-arrow {
border-color: $bgcolor;
}
}
&[aria-hidden="true"] {
visibility: hidden;
opacity: 0;
transition: opacity 0.15s, visibility 0.15s;
}
&[aria-hidden="false"] {
visibility: visible;
opacity: 1;
transition: opacity 0.15s;
}
}
h3.title {
margin: 4px;
}
.info {
margin-left: 4px;
color: var(--fg-light-color);
}
button {
display: inline-flex;
align-items: center;
justify-content: center;
margin: 4px;
padding: 6px 16px;
border-radius: 20px;
background-color: var(--ac-color);
color: var(--act-color);
font-size: 16px;
font-family: "Poppins", "Roboto", "Noto", sans-serif;
font-weight: 700;
transition: all 0.2s ease-in-out;
fill: var(--act-color);
cursor: pointer;
span {
display: inline-flex;
margin-left: 8px;
}
&:not([disabled]):hover,
&:not([disabled]):active,
&:not([disabled]):focus {
color: var(--act-color);
fill: var(--act-color);
box-shadow: inset 0 0 0 2px var(--fg-color);
transition: all 0.2s ease-in-out;
}
&.icon {
background-color: transparent;
color: var(--fg-light-color);
fill: var(--fg-light-color);
border-radius: 8px;
&:not([disabled]):hover,
&:not([disabled]):active,
&:not([disabled]):focus {
color: var(--fg-color);
fill: var(--fg-color);
box-shadow: none;
transition: all 0.2s ease-in-out;
}
}
&.primary {
color: var(--ac-color);
&:not([disabled]):hover,
&:not([disabled]):active,
&:not([disabled]):focus {
background-color: var(--ac-color);
color: var(--act-color);
}
}
}
@keyframes beat {
30% {
transform: scale(1.1);
}
50% {
transform: scale(0.9);
}
100% {
transform: scale(1);
}
}
.material-icons:active {
animation: beat 0.5s forwards 1;
}
fieldset {
margin: 16px 0;
border-radius: 16px;
transition: all 0.2s ease-in-out;
background-color: var(--bg-dark-color);
}
legend {
display: inline-block;
align-items: center;
justify-content: center;
color: var(--fg-color);
font-weight: 700;
cursor: pointer;
* {
vertical-align: middle;
}
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;
}
input[type="file"],
input[type="radio"],
.tab,
.hide-on-large-screen,
#installPWA,
.hidden {
display: none;
}
kbd,
select,
input,
textarea,
pre,
code {
display: inline-flex;
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;
font-weight: 400;
line-height: 1;
transition: all 0.2s ease-in-out;
user-select: text;
width: calc(100% - 8px);
resize: vertical;
text-overflow: ellipsis;
&:not([readonly]):not(.ace_editor):hover,
&:not([readonly]):not(.ace_editor):active,
&:not([readonly]):not(.ace_editor):focus {
box-shadow: inset 0 0 0 2px var(--fg-light-color);
transition: all 0.2s ease-in-out;
}
}
pre {
display: grid;
}
pre.ace_editor {
font-family: "Roboto Mono", monospace;
font-weight: 400;
z-index: 0;
}
kbd,
code,
pre {
width: auto;
}
.select-wrapper {
position: relative;
&:after {
display: inline-block;
position: absolute;
pointer-events: none;
content: "\e313";
font-family: "Material Icons";
top: 14px;
right: 14px;
}
}
select {
height: 37px;
background-color: var(--bg-dark-color);
cursor: pointer;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
&::-ms-expand {
display: none;
}
}
option {
background-color: var(--bg-color);
}
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:not(input),
.disabled:not(input),
[disabled] {
background-color: var(--err-color);
color: var(--fg-light-color);
fill: var(--fg-light-color);
cursor: not-allowed;
&.icon {
color: var(--err-color);
fill: var(--err-color);
}
}
label {
padding: 4px;
color: var(--fg-light-color);
}
ul,
ol {
display: flex;
margin: 4px 0 4px;
padding: 0;
list-style-type: none;
ul,
ol {
margin: 0;
}
}
ul li,
ol li {
display: inline-flex;
flex-direction: column;
flex-grow: 1;
justify-content: center;
}
.flex-wrap {
display: flex;
align-items: center;
justify-content: space-between;
flex-grow: 1;
flex-direction: row;
* {
display: inline-flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
}
}
.show-on-small-screen {
display: flex;
}
.show-on-large-screen {
display: inline-flex;
}
.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);
}
.align-left {
text-align: left;
}
.align-center {
text-align: center;
}
.align-right {
text-align: right;
}
.mono {
font-family: "Roboto Mono", monospace;
font-weight: 400;
}
#response-details-wrapper {
position: relative;
overflow: hidden;
border-radius: 8px;
textarea {
margin: 0;
width: 100%;
line-height: 1;
}
.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: 12px;
right: 12px;
z-index: 2;
// #hidden-message {
// display: block;
// margin-left: 4px;
// }
}
}
section {
display: flex;
flex-wrap: wrap;
}
.tab {
width: 100%;
order: 1;
}
input[type="radio"] + label {
padding: 8px 16px;
border-bottom: 2px solid transparent;
cursor: pointer;
transition: all 0.2s ease-in-out;
&:hover,
&:active,
&:focus {
border-color: var(--brd-color);
}
}
input[type="radio"]:checked + label {
border-color: var(--fg-color);
color: var(--fg-color);
}
input[type="radio"]:checked + label + .tab {
display: block;
}
.toasted-container .toasted {
justify-content: flex-start !important;
}
.toasted.info {
background-color: var(--ac-color) !important;
color: var(--act-color) !important;
font-weight: 700 !important;
}
.toasted.bubble .action {
color: inherit !important;
}
.toasted .action {
margin-left: auto !important;
}
.page-columns {
display: flex;
flex: 1;
flex-flow: column;
}
.inner-left {
display: flex;
order: 1;
}
.inner-right {
display: flex;
width: 30%;
order: 2;
margin-left: 16px;
}
@media (max-width: $responsiveWidth) {
.content,
.columns {
flex-flow: column;
}
.nav-first {
position: fixed;
top: auto;
bottom: 0;
height: auto;
padding: 0;
width: 100%;
background-color: var(--bg-color);
transition: all 0.2s ease-in-out;
box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.45);
}
nav.primary-nav {
flex-flow: row nowrap;
overflow: auto;
justify-content: space-around;
a {
background-color: transparent;
margin: 8px;
&.nuxt-link-exact-active {
background-color: transparent;
color: var(--ac-color);
fill: var(--ac-color);
svg {
fill: var(--ac-color);
}
}
}
}
nav.secondary-nav {
display: none;
}
.main {
padding: 0 8px 68px;
}
ul,
ol {
flex-direction: column;
}
ul li,
ol li {
display: flex;
}
.hide-on-small-screen {
display: none;
}
.hide-on-large-screen,
.show-on-small-screen {
display: inline-flex;
}
.sticky-inner {
position: relative;
width: 100%;
}
.inner-left {
order: 0;
}
.inner-right {
margin-left: 0;
}
.toasted-container {
margin-bottom: 68px;
}
}