_syntax.sass 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. @keyframes pulse
  2. 0%
  3. opacity: 1
  4. 75%
  5. opacity: 0.1
  6. 100%
  7. opacity: 1
  8. code
  9. font-size: 15px
  10. font-weight: 400
  11. overflow-y: hidden
  12. display: block
  13. font-family: 'Monaco', monospace
  14. word-break: break-all
  15. &.noClass
  16. --inlineColor: rgb(194, 29, 0)
  17. color: var(--inlineColor)
  18. display: inline
  19. line-break: anywhere
  20. .windows .highlight
  21. overflow-x: hidden
  22. &:hover
  23. overflow-x: auto
  24. .highlight
  25. display: grid
  26. width: 100%
  27. border-radius: 0 0.2rem 0.2rem 0
  28. overflow-x: auto
  29. // @media screen and (min-width: 1240px)
  30. // overflow-x: hidden
  31. // &:hover
  32. // overflow-x: auto
  33. position: relative
  34. &_wrap
  35. background: #fafafa
  36. border-radius: 0.5rem
  37. position: relative
  38. padding: 0 1rem
  39. margin: 1.5rem auto 1rem auto
  40. & + &
  41. margin-top: 2.25rem
  42. &:hover > div
  43. opacity: 1
  44. .lang
  45. position: absolute
  46. // background-color: var(--bg)
  47. top: 0
  48. right: 0
  49. text-align: right
  50. width: 7.5rem
  51. padding: 0.5rem 1rem
  52. font-style: italic
  53. text-transform: uppercase
  54. font-size: 67%
  55. opacity: 0.5
  56. color: #333
  57. &:hover .lang
  58. opacity: 0.1
  59. & &
  60. margin: 0
  61. pre
  62. background: #fafafa
  63. color: #333 !important
  64. border-radius: 4px
  65. font-family: 'Monaco', monospace
  66. padding-top: 1.5rem
  67. padding-bottom: 2rem
  68. table
  69. display: grid
  70. max-width: 100%
  71. margin-bottom: 0
  72. background: transparent
  73. td, th
  74. padding: 0
  75. .lntd
  76. width: 100%
  77. border: none
  78. &:first-child
  79. &, pre
  80. width: 2.5rem !important
  81. padding-left: 0
  82. padding-right: 0
  83. color: rgba(255,255,255,0.5)
  84. user-select: none
  85. pre
  86. width: 100%
  87. display: flex
  88. align-items: center
  89. flex-direction: column
  90. code
  91. .err
  92. color: #a61717
  93. background-color: #e3d2d2
  94. .hl
  95. width: 100%
  96. background-color: rgba(255,255,255,0.25)
  97. .ln, .lnt
  98. margin-right: 0.75rem
  99. padding: 0
  100. transition: opacity 0.3s var(--ease)
  101. &, span
  102. color: #666
  103. .k, .kc, .kd, .kn, .kp, .kr, .kt, .nt
  104. color: #6ab825
  105. font-weight: 500
  106. .kn, .kp
  107. font-weight: 400
  108. .nb, .no, .nv
  109. color: #24909d
  110. .nc, .nf, .nn
  111. color: #447fcf
  112. .s, .sa, .sb, .sc, .dl, .sd, .s2, .se, .sh, .si, .sx, .sr, .s1, .ss
  113. color: #ed9d13
  114. .m, .mb, .mf, .mh, .mi, .il, .mo
  115. color: #3677a9
  116. .ow
  117. color: #6ab825
  118. font-weight: 500
  119. .c, .ch, .cm, .c1
  120. color: #999
  121. font-style: italic
  122. .cs
  123. color: #e50808
  124. background-color: #520000
  125. font-weight: 500
  126. .cp, .cpf
  127. color: #cd2828
  128. font-weight: 500
  129. .gd, .gr
  130. color: #d22323
  131. .ge
  132. font-style: italic
  133. .gh, .gu, .nd, .na, .ne
  134. color: #ffa500
  135. font-weight: 500
  136. .gi
  137. color: #589819
  138. .go
  139. color: #ccc
  140. .gp
  141. color: #aaa
  142. .gs
  143. font-weight: 500
  144. .gt
  145. color: #d22323
  146. .w
  147. color: #666
  148. .hljs
  149. &-string
  150. color: #6ab825
  151. &-attr
  152. color: #ed9d13
  153. .p &-attr
  154. color: var(--light)
  155. .pre
  156. &_wrap
  157. white-space: pre-wrap
  158. white-space: -moz-pre-wrap
  159. white-space: -pre-wrap
  160. white-space: -o-pre-wrap
  161. word-wrap: break-word
  162. &_nolines.ln
  163. display: none
  164. // crayon-like widget styles
  165. .panel
  166. &_box
  167. display: inline-flex
  168. // grid-template-columns: repeat(3, 1fr)
  169. // max-width: 10rem
  170. perspective: 300px
  171. grid-gap: 0.5rem
  172. transition: opacity 0.3s var(--easing)
  173. background: var(--code-bg)
  174. padding: 0.5rem 1.5rem
  175. border-radius: 2rem
  176. align-items: center
  177. position: absolute
  178. right: 0rem
  179. top: -2.1rem
  180. opacity: 0
  181. &_icon
  182. display: inline-flex
  183. align-items: center
  184. justify-content: center
  185. cursor: pointer
  186. // transition: opacity 0.3s var(--easing)
  187. padding: 0.1rem
  188. transform-origin: 50% 50%
  189. // opacity: 0.7
  190. &.active
  191. animation: pulse 0.1s linear
  192. svg
  193. fill: var(--light)
  194. width: 1.5rem
  195. height: 1.5rem
  196. &_hide
  197. // hide icon if not needed
  198. display: none
  199. &_from
  200. position: absolute
  201. color: var(--theme)
  202. bottom: 0
  203. font-size: 1.5rem
  204. font-weight: 500
  205. padding: 0.5rem 0
  206. cursor: pointer
  207. letter-spacing: 0.1px
  208. z-index: 19
  209. &_expanded &_from
  210. display: none