styles.scss 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596
  1. /*
  2. * Write hoppscotch-common related custom styles in this file.
  3. * If styles are sharable across all package then write into hoppscotch-ui/assets/scss/styles.scss file.
  4. */
  5. * {
  6. backface-visibility: hidden;
  7. -moz-backface-visibility: hidden;
  8. -webkit-backface-visibility: hidden;
  9. &::before {
  10. backface-visibility: hidden;
  11. -moz-backface-visibility: hidden;
  12. -webkit-backface-visibility: hidden;
  13. }
  14. &::after {
  15. backface-visibility: hidden;
  16. -moz-backface-visibility: hidden;
  17. -webkit-backface-visibility: hidden;
  18. }
  19. @apply selection:bg-accentDark;
  20. @apply selection:text-accentContrast;
  21. @apply overscroll-none;
  22. }
  23. :root {
  24. @apply antialiased;
  25. accent-color: var(--accent-color);
  26. font-variant-ligatures: common-ligatures;
  27. }
  28. ::-webkit-scrollbar-track {
  29. @apply bg-transparent;
  30. @apply border-b-0 border-l border-r-0 border-t-0 border-solid border-dividerLight;
  31. }
  32. ::-webkit-scrollbar-thumb {
  33. @apply bg-divider bg-clip-content;
  34. @apply rounded-full;
  35. @apply border-4 border-solid border-transparent;
  36. @apply hover:bg-dividerDark;
  37. @apply hover:bg-clip-content;
  38. }
  39. ::-webkit-scrollbar {
  40. @apply w-4;
  41. @apply h-0;
  42. }
  43. .no-scrollbar {
  44. scrollbar-width: none;
  45. }
  46. input::placeholder,
  47. textarea::placeholder,
  48. .cm-placeholder {
  49. @apply text-secondary;
  50. @apply opacity-50 #{!important};
  51. }
  52. input,
  53. textarea {
  54. @apply text-secondaryDark;
  55. @apply font-medium;
  56. }
  57. html {
  58. scroll-behavior: smooth;
  59. }
  60. body {
  61. @apply bg-primary;
  62. @apply text-body text-secondary;
  63. @apply font-medium;
  64. @apply select-none;
  65. @apply overflow-x-hidden;
  66. @apply leading-body #{!important};
  67. animation: fade 300ms forwards;
  68. -webkit-tap-highlight-color: transparent;
  69. -webkit-touch-callout: none;
  70. }
  71. @keyframes fade {
  72. 0% {
  73. @apply opacity-0;
  74. }
  75. 100% {
  76. @apply opacity-100;
  77. }
  78. }
  79. .fade-enter-active,
  80. .fade-leave-active {
  81. @apply transition-opacity;
  82. }
  83. .fade-enter-from,
  84. .fade-leave-to {
  85. @apply opacity-0;
  86. }
  87. .slide-enter-active,
  88. .slide-leave-active {
  89. @apply transition;
  90. @apply duration-300;
  91. }
  92. .slide-enter-from,
  93. .slide-leave-to {
  94. @apply transform;
  95. @apply translate-x-full;
  96. }
  97. .bounce-enter-active,
  98. .bounce-leave-active {
  99. @apply transition;
  100. }
  101. .bounce-enter-from,
  102. .bounce-leave-to {
  103. @apply transform;
  104. @apply scale-95;
  105. }
  106. .svg-icons {
  107. @apply flex-shrink-0;
  108. @apply overflow-hidden;
  109. height: var(--line-height-body);
  110. width: var(--line-height-body);
  111. }
  112. a {
  113. @apply inline-flex;
  114. @apply text-current;
  115. @apply no-underline;
  116. @apply transition;
  117. @apply leading-body;
  118. @apply focus:outline-none;
  119. &.link {
  120. @apply items-center;
  121. @apply px-1 py-0.5;
  122. @apply -mx-1 -my-0.5;
  123. @apply text-accent;
  124. @apply rounded;
  125. @apply hover:text-accentDark;
  126. @apply focus-visible:ring;
  127. @apply focus-visible:ring-accent;
  128. @apply focus-visible:text-accentDark;
  129. }
  130. }
  131. .cm-tooltip {
  132. .tippy-box {
  133. @apply shadow-none #{!important};
  134. @apply fixed;
  135. @apply inline-flex;
  136. @apply -mt-7;
  137. }
  138. }
  139. .tippy-box[data-theme~="tooltip"] {
  140. @apply bg-tooltip;
  141. @apply border-solid border-tooltip;
  142. @apply rounded;
  143. @apply shadow;
  144. .tippy-content {
  145. @apply flex;
  146. @apply text-tiny text-primary;
  147. @apply font-semibold;
  148. @apply px-2 py-1;
  149. @apply truncate;
  150. @apply leading-body;
  151. @apply items-center;
  152. kbd {
  153. @apply hidden;
  154. @apply font-sans;
  155. background-color: rgba(107, 114, 128, 0.45);
  156. @apply text-primaryLight;
  157. @apply rounded-sm;
  158. @apply px-1;
  159. @apply my-0 ml-1;
  160. @apply truncate;
  161. @apply sm:inline-flex;
  162. }
  163. .env-icon {
  164. @apply transition;
  165. @apply inline-flex;
  166. @apply items-center;
  167. }
  168. }
  169. .tippy-svg-arrow {
  170. svg:first-child {
  171. @apply fill-tooltip;
  172. }
  173. svg:last-child {
  174. @apply fill-tooltip;
  175. }
  176. }
  177. }
  178. .tippy-box[data-theme~="popover"] {
  179. @apply bg-popover;
  180. @apply border-solid border-dividerDark;
  181. @apply rounded;
  182. @apply shadow-lg;
  183. @apply max-w-[45vw] #{!important};
  184. .tippy-content {
  185. @apply flex flex-col;
  186. @apply max-h-[45vh];
  187. @apply items-stretch;
  188. @apply overflow-y-auto;
  189. @apply text-body text-secondary;
  190. @apply p-2;
  191. @apply leading-body;
  192. @apply focus:outline-none;
  193. scroll-behavior: smooth;
  194. & > span {
  195. @apply block #{!important};
  196. }
  197. }
  198. .tippy-svg-arrow {
  199. svg:first-child {
  200. @apply fill-dividerDark;
  201. }
  202. svg:last-child {
  203. @apply fill-popover;
  204. }
  205. }
  206. }
  207. [data-v-tippy] {
  208. @apply flex flex-1;
  209. @apply truncate;
  210. }
  211. [interactive] > div {
  212. @apply flex flex-1;
  213. @apply h-full;
  214. }
  215. hr {
  216. @apply border-b border-dividerLight;
  217. @apply my-2 #{!important};
  218. }
  219. .heading {
  220. @apply font-bold;
  221. @apply text-lg text-secondaryDark;
  222. @apply tracking-tight;
  223. }
  224. .input,
  225. .select,
  226. .textarea {
  227. @apply flex;
  228. @apply w-full;
  229. @apply px-4 py-2;
  230. @apply bg-transparent;
  231. @apply rounded;
  232. @apply text-secondaryDark;
  233. @apply border border-divider;
  234. @apply focus-visible:border-dividerDark;
  235. }
  236. input,
  237. select,
  238. textarea,
  239. button {
  240. @apply truncate;
  241. @apply transition;
  242. @apply text-body;
  243. @apply leading-body;
  244. @apply focus:outline-none;
  245. @apply disabled:cursor-not-allowed;
  246. }
  247. .input[type="file"],
  248. .input[type="radio"],
  249. #installPWA {
  250. @apply hidden;
  251. }
  252. .floating-input ~ label {
  253. @apply absolute;
  254. @apply px-2 py-0.5;
  255. @apply m-2;
  256. @apply rounded;
  257. @apply transition;
  258. @apply origin-top-left;
  259. }
  260. .floating-input:focus-within ~ label,
  261. .floating-input:not(:placeholder-shown) ~ label {
  262. @apply bg-primary;
  263. @apply transform;
  264. @apply origin-top-left;
  265. @apply scale-75;
  266. @apply -translate-y-4 translate-x-1;
  267. }
  268. .floating-input:focus-within ~ label {
  269. @apply text-secondaryDark;
  270. }
  271. .floating-input ~ .end-actions {
  272. @apply absolute;
  273. @apply right-[.05rem];
  274. @apply inset-y-0;
  275. @apply flex;
  276. @apply items-center;
  277. }
  278. .floating-input:has(~ .end-actions) {
  279. @apply pr-12;
  280. }
  281. pre.ace_editor {
  282. @apply font-mono;
  283. @apply resize-none;
  284. @apply z-0;
  285. }
  286. .select {
  287. @apply appearance-none;
  288. @apply cursor-pointer;
  289. &::-ms-expand {
  290. @apply hidden;
  291. }
  292. }
  293. .info-response {
  294. color: var(--status-info-color);
  295. }
  296. .success-response {
  297. color: var(--status-success-color);
  298. }
  299. .redirect-response {
  300. color: var(--status-redirect-color);
  301. }
  302. .critical-error-response {
  303. color: var(--status-critical-error-color);
  304. }
  305. .server-error-response {
  306. color: var(--status-server-error-color);
  307. }
  308. .missing-data-response {
  309. color: var(--status-missing-data-color);
  310. }
  311. .toasted-container {
  312. @apply max-w-md;
  313. @apply z-[10000];
  314. .toasted {
  315. &.toasted-primary {
  316. @apply px-4 py-2;
  317. @apply bg-tooltip;
  318. @apply border-secondaryDark;
  319. @apply text-body text-primary;
  320. @apply justify-between;
  321. @apply shadow-lg;
  322. @apply font-semibold;
  323. @apply transition;
  324. @apply leading-body;
  325. @apply sm:rounded;
  326. @apply sm:border;
  327. .action {
  328. @apply relative;
  329. @apply flex flex-shrink-0;
  330. @apply text-body;
  331. @apply px-4;
  332. @apply my-1;
  333. @apply ml-auto;
  334. @apply normal-case;
  335. @apply font-semibold;
  336. @apply leading-body;
  337. @apply tracking-normal;
  338. @apply rounded;
  339. @apply last:ml-4;
  340. @apply sm:ml-8;
  341. @apply before:absolute;
  342. @apply before:bg-current;
  343. @apply before:opacity-10;
  344. @apply before:inset-0;
  345. @apply before:transition;
  346. @apply before:content-[''];
  347. @apply hover:no-underline;
  348. @apply hover:before:opacity-20;
  349. }
  350. }
  351. &.info {
  352. @apply bg-accent;
  353. @apply text-accentContrast;
  354. @apply border-accentDark;
  355. }
  356. &.error {
  357. @apply bg-red-200;
  358. @apply text-red-800;
  359. @apply border-red-400;
  360. }
  361. &.success {
  362. @apply bg-green-200;
  363. @apply text-green-800;
  364. @apply border-green-400;
  365. }
  366. }
  367. }
  368. .smart-splitter .splitpanes__splitter {
  369. @apply relative;
  370. @apply before:absolute;
  371. @apply before:inset-0;
  372. @apply before:bg-accentLight;
  373. @apply before:opacity-0;
  374. @apply before:z-20;
  375. @apply before:transition;
  376. @apply before:content-[''];
  377. @apply hover:before:opacity-100;
  378. }
  379. .no-splitter .splitpanes__splitter {
  380. @apply relative;
  381. }
  382. .smart-splitter.splitpanes--vertical > .splitpanes__splitter {
  383. @apply w-0;
  384. @apply before:-left-0.5;
  385. @apply before:-right-0.5;
  386. @apply before:h-full;
  387. @apply bg-divider;
  388. }
  389. .smart-splitter.splitpanes--horizontal > .splitpanes__splitter {
  390. @apply h-0;
  391. @apply before:-top-0.5;
  392. @apply before:-bottom-0.5;
  393. @apply before:w-full;
  394. @apply bg-divider;
  395. }
  396. .no-splitter.splitpanes--vertical > .splitpanes__splitter {
  397. @apply w-0;
  398. @apply pointer-events-none;
  399. @apply bg-dividerLight;
  400. }
  401. .no-splitter.splitpanes--horizontal > .splitpanes__splitter {
  402. @apply h-0;
  403. @apply pointer-events-none;
  404. @apply bg-dividerLight;
  405. }
  406. .splitpanes--horizontal .splitpanes__pane {
  407. @apply transition-none;
  408. }
  409. .splitpanes--vertical .splitpanes__pane {
  410. @apply transition-none;
  411. }
  412. .cm-focused {
  413. @apply select-auto;
  414. @apply outline-none #{!important};
  415. .cm-activeLine {
  416. @apply bg-primaryLight;
  417. }
  418. .cm-activeLineGutter {
  419. @apply bg-primaryDark;
  420. }
  421. }
  422. .cm-scroller {
  423. @apply overscroll-y-auto;
  424. }
  425. .cm-editor {
  426. .cm-line::selection {
  427. @apply bg-accentDark #{!important};
  428. @apply text-accentContrast #{!important};
  429. }
  430. .cm-line ::selection {
  431. @apply bg-accentDark #{!important};
  432. @apply text-accentContrast #{!important};
  433. }
  434. }
  435. .shortcut-key {
  436. @apply inline-flex;
  437. @apply font-sans;
  438. @apply text-tiny;
  439. @apply bg-dividerLight;
  440. @apply rounded;
  441. @apply ml-2;
  442. @apply px-0.5;
  443. @apply min-w-[1rem];
  444. @apply min-h-[1rem];
  445. @apply leading-none;
  446. @apply items-center;
  447. @apply justify-center;
  448. @apply border border-dividerDark;
  449. @apply shadow-sm;
  450. @apply <sm:hidden;
  451. }
  452. .capitalize-first {
  453. @apply first-letter:capitalize;
  454. }
  455. details {
  456. @apply select-none;
  457. }
  458. details summary::-webkit-details-marker {
  459. @apply hidden;
  460. }
  461. details summary .indicator {
  462. @apply transition;
  463. }
  464. details[open] summary .indicator {
  465. @apply transform;
  466. @apply rotate-90;
  467. }
  468. @media (max-width: 767px) {
  469. main {
  470. margin-bottom: env(safe-area-inset-bottom);
  471. }
  472. }
  473. .env-highlight {
  474. @apply text-accentContrast;
  475. &.env-found {
  476. @apply bg-accentDark;
  477. @apply hover:bg-accent;
  478. }
  479. &.env-not-found {
  480. @apply bg-red-500;
  481. @apply hover:bg-red-600;
  482. }
  483. }
  484. #nprogress .bar {
  485. @apply bg-accent #{!important};
  486. }
  487. .color-picker[type="color"] {
  488. @apply appearance-none;
  489. }
  490. .color-picker[type="color"]::-webkit-color-swatch-wrapper {
  491. @apply rounded;
  492. @apply p-0;
  493. }
  494. .color-picker[type="color"]::-webkit-color-swatch {
  495. @apply rounded;
  496. @apply border-0;
  497. }
  498. .gql-operation-not-highlight {
  499. @apply opacity-50;
  500. }
  501. .gql-operation-highlight {
  502. @apply opacity-100;
  503. }