code.css 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. @reference "./globals.css";
  2. .Code {
  3. width: 100%;
  4. .prism-code {
  5. @apply m-0 p-1;
  6. background-color: none;
  7. white-space: normal;
  8. word-break: break-word;
  9. /* overflow: auto !important; */
  10. }
  11. .token-line {
  12. @apply text-sm;
  13. }
  14. .token.imports,
  15. .token.property-access {
  16. @apply !text-foreground-lighter;
  17. }
  18. .token.keyword.module,
  19. .token.function {
  20. font-style: normal !important;
  21. @apply !text-foreground-lighter;
  22. }
  23. .token.plain,
  24. .token.parameter,
  25. .token.punctuation,
  26. .token.operator,
  27. .token.console.class-name,
  28. .token.doc-comment.parameter,
  29. .token.doc-comment.optional-parameter,
  30. .token.doc-comment.parameter.punctuation,
  31. .token.doc-comment.optional-parameter.punctuation {
  32. font-style: normal !important;
  33. @apply !text-foreground-light;
  34. }
  35. .token.keyword,
  36. .token.doc-comment.keyword {
  37. font-style: normal !important;
  38. @apply !text-blue-900;
  39. }
  40. .token.string {
  41. font-style: normal !important;
  42. @apply !text-brand;
  43. }
  44. .token.constant {
  45. font-style: normal !important;
  46. @apply !text-blue-900;
  47. }
  48. .token.comment {
  49. font-style: normal !important;
  50. @apply !text-foreground-lighter;
  51. }
  52. .token.number {
  53. @apply !text-brand;
  54. }
  55. .token.boolean,
  56. .token.doc-comment.class-name {
  57. @apply text-brand;
  58. }
  59. .codeBlock {
  60. margin-bottom: 0;
  61. overflow: hidden;
  62. overflow-wrap: break-word;
  63. white-space: pre-wrap;
  64. }
  65. &.codeBlockWrapper {
  66. position: relative;
  67. }
  68. &.codeBlockWrapper:hover .buttonContainer {
  69. visibility: visible;
  70. opacity: 1;
  71. }
  72. .buttonContainer {
  73. right: 5px;
  74. top: 5px;
  75. opacity: 0;
  76. position: absolute;
  77. visibility: hidden;
  78. transition:
  79. opacity 200ms ease-in-out,
  80. visibility 200ms ease-in-out,
  81. bottom 200ms ease-in-out;
  82. button {
  83. @apply rounded-sm text-xs;
  84. background: rgb(1, 22, 39);
  85. border: 1px solid rgb(214, 222, 235);
  86. color: rgb(214, 222, 235);
  87. cursor: pointer;
  88. line-height: 12px;
  89. outline: none;
  90. padding: 4px 8px;
  91. }
  92. }
  93. &.codeBlockWrapper .sbui-btn-container {
  94. position: absolute;
  95. top: 2px;
  96. right: 3px;
  97. visibility: hidden;
  98. opacity: 0;
  99. }
  100. &.codeBlockWrapper:hover .sbui-btn-container {
  101. visibility: visible;
  102. opacity: 1;
  103. }
  104. }
  105. .CustomCodeBlock {
  106. width: 100%;
  107. .code-with-header pre {
  108. border-radius: 0 0 4px 4px;
  109. }
  110. .code-with-response pre {
  111. border-radius: 0;
  112. }
  113. .code-header {
  114. /* @apply bg-gray-600; */
  115. color: #ccc;
  116. padding: 5px 15px;
  117. border-radius: 4px 4px 0 0;
  118. font-size: 0.8rem;
  119. font-weight: bold;
  120. border-bottom: 1px solid #444;
  121. }
  122. }
  123. .FunctionBlock {
  124. h4 {
  125. margin-top: 36px;
  126. margin-bottom: 12px;
  127. }
  128. p {
  129. margin-top: 0px;
  130. margin-bottom: 24px;
  131. }
  132. }
  133. .panel-form {
  134. button {
  135. @apply m-4 mr-0;
  136. }
  137. .form {
  138. .form-group {
  139. @apply border-t border-b m-0 -mt-px text-left py-2;
  140. input {
  141. @apply px-4 text-white;
  142. border: none !important;
  143. width: 100%;
  144. }
  145. }
  146. }
  147. }