api-client/packages/hoppscotch-common/assets/scss/styles.scss

595 lines
10 KiB
SCSS
Raw Normal View History

/*
* Write hoppscotch-common related custom styles in this file.
* If styles are sharable across all package then write into hoppscotch-ui/assets/scss/styles.scss file.
*/
2021-12-31 14:35:39 +00:00
* {
backface-visibility: hidden;
-moz-backface-visibility: hidden;
-webkit-backface-visibility: hidden;
&::before {
backface-visibility: hidden;
-moz-backface-visibility: hidden;
-webkit-backface-visibility: hidden;
}
&::after {
backface-visibility: hidden;
-moz-backface-visibility: hidden;
-webkit-backface-visibility: hidden;
}
2022-12-03 07:31:47 +00:00
@apply selection:bg-accentDark;
@apply selection:text-accentContrast;
@apply overscroll-none;
2020-09-22 17:06:37 +00:00
}
:root {
@apply antialiased;
2021-11-12 12:22:27 +00:00
accent-color: var(--accent-color);
font-variant-ligatures: common-ligatures;
2020-09-22 17:06:37 +00:00
}
2021-07-03 13:14:58 +00:00
::-webkit-scrollbar-track {
@apply bg-transparent;
@apply border-b-0 border-l border-r-0 border-t-0 border-solid border-dividerLight;
2020-09-22 17:06:37 +00:00
}
2021-07-03 13:14:58 +00:00
::-webkit-scrollbar-thumb {
2021-07-20 10:29:30 +00:00
@apply bg-divider bg-clip-content;
2021-07-03 13:14:58 +00:00
@apply rounded-full;
@apply border-4 border-solid border-transparent;
2022-12-03 07:31:47 +00:00
@apply hover:bg-dividerDark;
@apply hover:bg-clip-content;
2020-09-22 17:06:37 +00:00
}
2021-07-03 13:14:58 +00:00
::-webkit-scrollbar {
@apply w-4;
@apply h-0;
2021-07-03 13:14:58 +00:00
}
2020-09-22 17:06:37 +00:00
.no-scrollbar {
scrollbar-width: none;
}
2021-08-29 17:56:27 +00:00
input::placeholder,
2022-02-11 04:54:08 +00:00
textarea::placeholder,
.cm-placeholder {
2021-09-11 02:56:54 +00:00
@apply text-secondary;
@apply opacity-50 #{!important};
}
2021-08-29 17:56:27 +00:00
input,
textarea {
@apply text-secondaryDark;
@apply font-medium;
}
2020-09-22 17:06:37 +00:00
html {
scroll-behavior: smooth;
}
body {
2021-06-12 16:46:17 +00:00
@apply bg-primary;
@apply text-body text-secondary;
2020-09-22 17:06:37 +00:00
@apply font-medium;
@apply select-none;
2021-06-13 15:01:42 +00:00
@apply overflow-x-hidden;
@apply leading-body #{!important};
2021-08-20 09:38:54 +00:00
animation: fade 300ms forwards;
2020-09-22 17:06:37 +00:00
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
}
2021-08-20 09:38:54 +00:00
@keyframes fade {
0% {
2021-11-04 12:53:50 +00:00
@apply opacity-0;
2021-08-20 09:38:54 +00:00
}
2021-10-18 02:04:26 +00:00
2021-08-20 09:38:54 +00:00
100% {
2021-11-04 12:53:50 +00:00
@apply opacity-100;
2021-08-20 09:38:54 +00:00
}
}
2021-07-05 16:52:15 +00:00
.fade-enter-active,
.fade-leave-active {
2021-07-03 13:14:58 +00:00
@apply transition-opacity;
2020-09-22 17:06:37 +00:00
}
.fade-enter-from,
.fade-leave-to {
2020-09-22 17:06:37 +00:00
@apply opacity-0;
}
.slide-enter-active,
.slide-leave-active {
@apply transition;
@apply duration-300;
}
.slide-enter-from,
.slide-leave-to {
@apply transform;
@apply translate-x-full;
2021-07-03 13:14:58 +00:00
}
2022-10-20 14:17:17 +00:00
.bounce-enter-active,
.bounce-leave-active {
@apply transition;
}
.bounce-enter-from,
.bounce-leave-to {
@apply transform;
@apply scale-95;
}
2021-07-03 13:14:58 +00:00
.svg-icons {
@apply flex-shrink-0;
2021-12-31 07:09:23 +00:00
@apply overflow-hidden;
2021-12-14 17:11:07 +00:00
height: var(--line-height-body);
width: var(--line-height-body);
2021-07-03 13:14:58 +00:00
}
2020-09-22 17:06:37 +00:00
a {
@apply inline-flex;
@apply text-current;
@apply no-underline;
2021-07-20 10:29:30 +00:00
@apply transition;
2021-12-14 17:11:07 +00:00
@apply leading-body;
2022-12-03 07:31:47 +00:00
@apply focus:outline-none;
2020-09-22 17:06:37 +00:00
&.link {
2021-07-03 13:14:58 +00:00
@apply items-center;
@apply px-1 py-0.5;
@apply -mx-1 -my-0.5;
2021-06-12 16:46:17 +00:00
@apply text-accent;
2021-08-06 16:10:26 +00:00
@apply rounded;
2022-12-03 07:31:47 +00:00
@apply hover:text-accentDark;
@apply focus-visible:ring;
@apply focus-visible:ring-accent;
@apply focus-visible:text-accentDark;
2020-09-22 17:06:37 +00:00
}
}
2022-02-14 00:22:44 +00:00
.cm-tooltip {
.tippy-box {
@apply shadow-none #{!important};
2022-02-14 00:22:44 +00:00
@apply fixed;
@apply inline-flex;
@apply -mt-8;
2022-02-14 00:22:44 +00:00
}
}
.tippy-box[data-theme~="tooltip"] {
@apply bg-tooltip;
@apply border-solid border-tooltip;
@apply rounded;
@apply shadow;
.tippy-content {
@apply flex;
@apply text-tiny text-primary;
@apply font-semibold;
@apply px-2 py-1;
2021-08-23 04:52:07 +00:00
@apply truncate;
@apply leading-body;
@apply items-center;
kbd {
@apply hidden;
@apply font-sans;
background-color: rgba(107, 114, 128, 0.45);
@apply text-primaryLight;
@apply rounded-sm;
@apply px-1;
@apply my-0 ml-1;
@apply truncate;
2022-12-03 07:31:47 +00:00
@apply sm:inline-flex;
}
.env-icon {
@apply transition;
@apply inline-flex;
@apply items-center;
}
}
.tippy-svg-arrow {
svg:first-child {
@apply fill-tooltip;
}
svg:last-child {
@apply fill-tooltip;
}
}
}
2021-07-02 05:01:29 +00:00
.tippy-box[data-theme~="popover"] {
@apply bg-popover;
@apply border-solid border-dividerDark;
@apply rounded;
@apply shadow-lg;
@apply max-w-[45vw] #{!important};
2021-08-05 15:59:05 +00:00
.tippy-content {
@apply flex flex-col;
@apply max-h-[45vh];
@apply items-stretch;
@apply overflow-y-auto;
@apply text-body text-secondary;
@apply p-2;
@apply leading-body;
2022-12-03 07:31:47 +00:00
@apply focus:outline-none;
scroll-behavior: smooth;
& > span {
@apply block #{!important};
}
2021-07-02 05:01:29 +00:00
}
.tippy-svg-arrow {
svg:first-child {
@apply fill-dividerDark;
}
svg:last-child {
@apply fill-popover;
}
}
}
[data-v-tippy] {
@apply flex flex-1;
@apply truncate;
}
2022-09-30 04:17:12 +00:00
[interactive] > div {
@apply flex flex-1;
@apply h-full;
2020-09-22 17:06:37 +00:00
}
hr {
2021-07-20 10:29:30 +00:00
@apply border-b border-dividerLight;
@apply my-2 #{!important};
}
2021-07-03 13:14:58 +00:00
.heading {
@apply font-bold;
@apply text-lg text-secondaryDark;
@apply tracking-tight;
2021-07-03 13:14:58 +00:00
}
2021-07-09 17:19:45 +00:00
.input,
2021-08-03 16:05:01 +00:00
.select,
.textarea {
2021-08-30 16:33:59 +00:00
@apply flex;
2021-07-09 17:19:45 +00:00
@apply w-full;
@apply px-4 py-2;
2021-08-27 04:07:29 +00:00
@apply bg-transparent;
@apply rounded;
@apply text-secondaryDark;
2021-07-20 10:29:30 +00:00
@apply border border-divider;
2022-12-03 07:31:47 +00:00
@apply focus-visible:border-dividerDark;
}
2021-08-03 16:05:01 +00:00
input,
select,
textarea,
button {
2021-08-17 07:26:36 +00:00
@apply truncate;
@apply transition;
2021-12-14 17:11:07 +00:00
@apply text-body;
@apply leading-body;
2022-12-03 07:31:47 +00:00
@apply focus:outline-none;
@apply disabled:cursor-not-allowed;
2021-08-03 16:05:01 +00:00
}
2021-07-09 17:19:45 +00:00
.input[type="file"],
.input[type="radio"],
2020-09-22 17:06:37 +00:00
#installPWA {
@apply hidden;
}
2022-09-30 04:17:12 +00:00
.floating-input ~ label {
@apply absolute;
@apply px-2 py-0.5;
2021-08-07 09:21:13 +00:00
@apply m-2;
@apply rounded;
@apply transition;
2021-08-08 06:31:36 +00:00
@apply origin-top-left;
2021-08-07 09:21:13 +00:00
}
2022-09-30 04:17:12 +00:00
.floating-input:focus-within ~ label,
.floating-input:not(:placeholder-shown) ~ label {
2021-08-28 00:17:33 +00:00
@apply bg-primary;
2021-08-07 09:21:13 +00:00
@apply transform;
2021-08-08 06:31:36 +00:00
@apply origin-top-left;
2021-08-07 09:21:13 +00:00
@apply scale-75;
@apply -translate-y-4 translate-x-1;
2021-08-07 09:21:13 +00:00
}
2022-09-30 04:17:12 +00:00
.floating-input:focus-within ~ label {
2021-08-21 19:09:05 +00:00
@apply text-secondaryDark;
2021-08-07 09:21:13 +00:00
}
2022-11-27 17:49:19 +00:00
.floating-input ~ .end-actions {
@apply absolute;
@apply right-[.05rem];
2022-11-27 17:49:19 +00:00
@apply inset-y-0;
@apply flex;
@apply items-center;
}
.floating-input:has(~ .end-actions) {
@apply pr-12;
}
2020-09-22 17:06:37 +00:00
pre.ace_editor {
@apply font-mono;
@apply resize-none;
2021-07-20 10:29:30 +00:00
@apply z-0;
2020-09-22 17:06:37 +00:00
}
.select {
2020-09-22 17:06:37 +00:00
@apply appearance-none;
2021-08-20 16:05:54 +00:00
@apply cursor-pointer;
2020-10-21 06:50:32 +00:00
2020-09-22 17:06:37 +00:00
&::-ms-expand {
@apply hidden;
}
}
.info-response {
color: var(--status-info-color);
2020-09-22 17:06:37 +00:00
}
.success-response {
color: var(--status-success-color);
2020-09-22 17:06:37 +00:00
}
.redirect-response {
color: var(--status-redirect-color);
2020-09-22 17:06:37 +00:00
}
.critical-error-response {
color: var(--status-critical-error-color);
2020-09-22 17:06:37 +00:00
}
.server-error-response {
color: var(--status-server-error-color);
2020-09-22 17:06:37 +00:00
}
.missing-data-response {
color: var(--status-missing-data-color);
2020-09-22 17:06:37 +00:00
}
2021-07-05 12:56:00 +00:00
.toasted-container {
@apply max-w-md;
2021-07-05 12:56:00 +00:00
.toasted {
&.toasted-primary {
@apply px-4 py-2;
@apply bg-tooltip;
@apply border-secondaryDark;
@apply text-body text-primary;
2021-11-19 15:43:58 +00:00
@apply justify-between;
@apply shadow-lg;
@apply font-semibold;
@apply transition;
2021-12-14 17:11:07 +00:00
@apply leading-body;
2022-12-03 07:31:47 +00:00
@apply sm:rounded;
@apply sm:border;
2021-08-05 15:59:05 +00:00
.action {
@apply relative;
@apply flex flex-shrink-0;
@apply text-body;
@apply px-4;
@apply my-1;
2021-07-27 19:38:11 +00:00
@apply ml-auto;
@apply normal-case;
@apply font-semibold;
2021-12-14 17:11:07 +00:00
@apply leading-body;
@apply tracking-normal;
2022-09-30 04:17:12 +00:00
@apply rounded;
2022-12-03 07:31:47 +00:00
@apply last:ml-4;
@apply sm:ml-8;
@apply before:absolute;
@apply before:bg-current;
@apply before:opacity-10;
@apply before:inset-0;
@apply before:transition;
@apply before:content-[''];
2022-12-03 07:31:47 +00:00
@apply hover:no-underline;
@apply hover:before:opacity-20;
}
2021-07-05 12:56:00 +00:00
}
2020-09-22 17:06:37 +00:00
&.info {
@apply bg-accent;
@apply text-accentContrast;
@apply border-accentDark;
2021-07-24 16:46:48 +00:00
}
&.error {
@apply bg-red-200;
@apply text-red-800;
@apply border-red-400;
2021-07-24 16:46:48 +00:00
}
&.success {
@apply bg-green-200;
@apply text-green-800;
@apply border-green-400;
2021-07-05 12:56:00 +00:00
}
}
2020-09-22 17:06:37 +00:00
}
2021-08-21 19:09:05 +00:00
.smart-splitter .splitpanes__splitter {
@apply relative;
2022-12-03 07:31:47 +00:00
@apply before:absolute;
@apply before:inset-0;
@apply before:bg-accentLight;
@apply before:opacity-0;
@apply before:z-20;
@apply before:transition;
@apply before:content-[''];
2022-12-03 07:31:47 +00:00
@apply hover:before:opacity-100;
2021-08-21 19:09:05 +00:00
}
.no-splitter .splitpanes__splitter {
2021-07-06 17:31:18 +00:00
@apply relative;
}
2022-09-30 04:17:12 +00:00
.smart-splitter.splitpanes--vertical > .splitpanes__splitter {
2023-02-08 09:43:24 +00:00
@apply w-0;
2022-12-03 07:31:47 +00:00
@apply before:-left-0.5;
@apply before:-right-0.5;
@apply before:h-full;
2023-02-08 09:43:24 +00:00
@apply bg-divider;
2021-07-06 17:31:18 +00:00
}
2022-09-30 04:17:12 +00:00
.smart-splitter.splitpanes--horizontal > .splitpanes__splitter {
2023-02-08 09:43:24 +00:00
@apply h-0;
2022-12-03 07:31:47 +00:00
@apply before:-top-0.5;
@apply before:-bottom-0.5;
@apply before:w-full;
2023-02-08 09:43:24 +00:00
@apply bg-divider;
2021-07-06 17:31:18 +00:00
}
2022-09-30 04:17:12 +00:00
.no-splitter.splitpanes--vertical > .splitpanes__splitter {
2023-02-08 09:43:24 +00:00
@apply w-0;
2021-08-21 19:09:05 +00:00
@apply pointer-events-none;
2023-02-08 09:43:24 +00:00
@apply bg-dividerLight;
2021-08-21 19:09:05 +00:00
}
2022-09-30 04:17:12 +00:00
.no-splitter.splitpanes--horizontal > .splitpanes__splitter {
2023-02-08 09:43:24 +00:00
@apply h-0;
2021-08-21 19:09:05 +00:00
@apply pointer-events-none;
2023-02-08 09:43:24 +00:00
@apply bg-dividerLight;
2021-08-21 19:09:05 +00:00
}
.splitpanes--horizontal .splitpanes__pane {
@apply transition-none;
}
.splitpanes--vertical .splitpanes__pane {
@apply transition-none;
}
.cm-focused {
@apply select-auto;
2022-09-30 04:17:12 +00:00
@apply outline-none #{!important};
.cm-activeLine {
2021-09-11 20:38:37 +00:00
@apply bg-primaryLight;
}
.cm-activeLineGutter {
@apply bg-primaryDark;
}
2021-09-07 06:44:13 +00:00
}
.cm-scroller {
@apply overscroll-y-auto;
}
.cm-editor {
.cm-line::selection {
@apply bg-accentDark #{!important};
@apply text-accentContrast #{!important};
}
.cm-line ::selection {
@apply bg-accentDark #{!important};
@apply text-accentContrast #{!important};
}
}
2021-12-13 06:56:24 +00:00
.shortcut-key {
@apply inline-flex;
2021-12-14 17:11:07 +00:00
@apply font-sans;
@apply text-tiny;
@apply bg-dividerLight;
2021-12-13 06:56:24 +00:00
@apply rounded;
@apply ml-2;
@apply px-1;
@apply min-w-[1.25rem];
@apply min-h-[1.25rem];
2022-12-29 05:40:16 +00:00
@apply items-center;
@apply justify-center;
2022-10-01 13:49:43 +00:00
@apply border border-dividerDark;
@apply shadow-sm;
2022-10-05 03:10:09 +00:00
@apply <sm:hidden;
2021-12-13 06:56:24 +00:00
}
2021-12-31 14:35:39 +00:00
.capitalize-first {
2022-12-03 07:31:47 +00:00
@apply first-letter:capitalize;
}
details {
@apply select-none;
2021-12-31 07:09:23 +00:00
}
2022-01-02 01:30:17 +00:00
details summary::-webkit-details-marker {
@apply hidden;
}
2022-10-06 15:51:24 +00:00
details summary .indicator {
@apply transition;
}
details[open] summary .indicator {
@apply transform;
@apply rotate-90;
}
2021-07-20 10:29:30 +00:00
@media (max-width: 767px) {
main {
margin-bottom: env(safe-area-inset-bottom);
}
}
.env-highlight {
@apply text-accentContrast;
&.env-found {
@apply bg-accentDark;
@apply hover:bg-accent;
}
&.env-not-found {
@apply bg-red-500;
@apply hover:bg-red-600;
}
}
#nprogress .bar {
@apply bg-accent #{!important};
}
2022-11-27 17:49:19 +00:00
2022-12-03 07:31:47 +00:00
.color-picker[type="color"] {
@apply appearance-none;
}
.color-picker[type="color"]::-webkit-color-swatch-wrapper {
2022-11-27 17:49:19 +00:00
@apply rounded;
2022-12-03 07:31:47 +00:00
@apply p-0;
2022-11-27 17:49:19 +00:00
}
2022-12-03 07:31:47 +00:00
.color-picker[type="color"]::-webkit-color-swatch {
2022-11-27 17:49:19 +00:00
@apply rounded;
2022-12-03 07:31:47 +00:00
@apply border-0;
2022-11-27 17:49:19 +00:00
}
.gql-operation-not-highlight {
2023-08-24 18:25:22 +00:00
@apply opacity-50;
}
.gql-operation-highlight {
2023-08-24 18:25:22 +00:00
@apply opacity-100;
}