base.less 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. /*
  2. This defines styling rules for syntax classes.
  3. See the naming conventions for a list of syntax classes:
  4. https://flight-manual.atom.io/hacking-atom/sections/syntax-naming-conventions
  5. When styling rules conflict:
  6. - The last rule overrides previous rules.
  7. - The rule with most classes and pseudo-classes overrides the last rule.
  8. */
  9. // if for and del let = &&
  10. .syntax--keyword {
  11. color: @hue-3;
  12. // int char float
  13. &.syntax--type {
  14. color: @hue-1;
  15. }
  16. // super
  17. &.syntax--function {
  18. color: @hue-5;
  19. }
  20. // this self
  21. &.syntax--variable {
  22. color: @hue-5;
  23. }
  24. }
  25. // identifier
  26. .syntax--entity {
  27. color: @mono-1;
  28. // function(parameter)
  29. &.syntax--parameter {
  30. color: @mono-1;
  31. }
  32. // self cls iota
  33. &.syntax--support {
  34. color: @hue-5;
  35. }
  36. // @entity.decorator
  37. &.syntax--decorator:last-child {
  38. color: @hue-2;
  39. }
  40. // label:
  41. &.syntax--label {
  42. text-decoration: underline;
  43. }
  44. // function method
  45. &.syntax--function {
  46. color: @hue-2;
  47. }
  48. // add
  49. &.syntax--operator {
  50. color: @hue-2;
  51. // %>% <=>
  52. &.syntax--symbolic {
  53. color: @mono-1;
  54. }
  55. }
  56. // String Class int rune list
  57. &.syntax--type {
  58. color: @hue-1;
  59. }
  60. // div span
  61. &.syntax--tag {
  62. color: @hue-5;
  63. }
  64. // href src alt
  65. &.syntax--attribute {
  66. color: @hue-6;
  67. }
  68. }
  69. // () [] {} => @
  70. .syntax--punctuation {
  71. color: @mono-1;
  72. &.syntax--accessor {
  73. color: @mono-1;
  74. // . -> ::
  75. &.syntax--member,
  76. &.syntax--scope {
  77. color: @hue-3;
  78. }
  79. }
  80. // { } ~~~
  81. &.syntax--embedded {
  82. color: @hue-3;
  83. }
  84. }
  85. // "string"
  86. .syntax--string {
  87. color: @hue-4;
  88. // :immutable
  89. &.syntax--immutable {
  90. color: @hue-4;
  91. }
  92. // {placeholder} %().2f
  93. &.syntax--part {
  94. color: @hue-1;
  95. }
  96. // ${ }
  97. &.syntax--interpolation {
  98. color: @hue-3;
  99. }
  100. // /^reg[ex]?p/
  101. &.syntax--regexp {
  102. color: @hue-4;
  103. // ^ $ \b ? + i
  104. &.syntax--language {
  105. color: @hue-3;
  106. }
  107. // <variable> \1
  108. &.syntax--variable {
  109. color: @hue-2;
  110. }
  111. // ( ) [^ ] (?= ) |
  112. &.syntax--punctuation {
  113. color: @hue-3;
  114. }
  115. }
  116. }
  117. // literal 4 1.3 true nil
  118. .syntax--constant {
  119. color: @hue-6;
  120. // &lt; 'a'
  121. &.syntax--character {
  122. color: @hue-4;
  123. // \" \' \g \.
  124. &.syntax--escape {
  125. color: @hue-4;
  126. }
  127. // \u2661 \n \t \W .
  128. &.syntax--code {
  129. color: @hue-1;
  130. }
  131. }
  132. }
  133. // text
  134. .syntax--text {
  135. color: @mono-1;
  136. }
  137. // __formatted__
  138. .syntax--markup {
  139. // # Heading
  140. &.syntax--heading {
  141. color: @hue-5;
  142. }
  143. // 1. * -
  144. &.syntax--list.syntax--punctuation {
  145. color: @hue-5;
  146. }
  147. // > quote
  148. &.syntax--quote {
  149. color: @mono-3;
  150. font-style: italic;
  151. }
  152. // **bold**
  153. &.syntax--bold {
  154. color: @hue-6;
  155. font-weight: bold;
  156. }
  157. // *italic*
  158. &.syntax--italic {
  159. color: @hue-3;
  160. font-style: italic;
  161. }
  162. // __underline__
  163. &.syntax--underline {
  164. color: @hue-1;
  165. text-decoration: underline;
  166. }
  167. // ~~strike~~
  168. &.syntax--strike {
  169. color: @hue-5;
  170. }
  171. // `raw`
  172. &.syntax--raw {
  173. color: @hue-4;
  174. }
  175. // url.com (path)
  176. &.syntax--link {
  177. color: @hue-1;
  178. }
  179. // [alt] ![alt]
  180. &.syntax--alt {
  181. color: @hue-2;
  182. }
  183. // {++ inserted ++}
  184. &.syntax--inserted {
  185. color: @hue-4;
  186. .syntax--punctuation {
  187. color: @hue-4;
  188. }
  189. }
  190. // {== highlighted ==}
  191. &.syntax--highlighted {
  192. color: @hue-4;
  193. .syntax--punctuation {
  194. color: @hue-4;
  195. }
  196. }
  197. // {-- deleted --}
  198. &.syntax--deleted {
  199. color: @hue-5;
  200. .syntax--punctuation {
  201. color: @hue-5;
  202. }
  203. }
  204. // {~~ from~>to ~~}
  205. &.syntax--changed {
  206. color: @hue-3;
  207. .syntax--punctuation {
  208. color: @hue-3;
  209. }
  210. }
  211. // {>> commented <<}
  212. &.syntax--commented {
  213. color: @mono-3;
  214. .syntax--punctuation {
  215. color: @mono-3;
  216. }
  217. }
  218. }
  219. // /* comment */
  220. .syntax--comment {
  221. color: @mono-3;
  222. font-style: italic;
  223. // @param TODO NOTE
  224. &.syntax--caption {
  225. color: lighten(@mono-3, 6);
  226. font-weight: bold;
  227. }
  228. // variable function type
  229. &.syntax--term {
  230. color: lighten(@mono-3, 9);
  231. }
  232. // { } / .
  233. &.syntax--punctuation {
  234. color: @mono-3;
  235. font-weight: normal;
  236. }
  237. }
  238. // 0invalid
  239. .syntax--invalid:not(.syntax--punctuation) {
  240. // §illegal
  241. &.syntax--illegal {
  242. color: @syntax-illegal-fg !important;
  243. background-color: @syntax-illegal-bg !important;
  244. }
  245. // obsolete()
  246. &.syntax--deprecated {
  247. color: @syntax-deprecated-fg !important;
  248. background-color: @syntax-deprecated-bg !important;
  249. }
  250. }