marty 2.4.7 → 2.4.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (225) hide show
  1. checksums.yaml +4 -4
  2. data/Dockerfile.dummy +8 -5
  3. data/Gemfile.lock +1 -1
  4. data/README.md +8 -0
  5. data/app/assets/javascripts/marty/application.js +1 -0
  6. data/app/assets/javascripts/marty/codemirror/codemirror.js +9730 -0
  7. data/app/{components/marty/script_form/client → assets/javascripts/marty/codemirror}/mode/delorean/delorean.js +0 -0
  8. data/app/assets/javascripts/marty/codemirror/mode/javascript/javascript.js +900 -0
  9. data/app/assets/javascripts/marty/codemirror/mode/python/python.js +399 -0
  10. data/app/{components/marty/script_form/client → assets/javascripts/marty/codemirror}/mode/ruby/ruby.js +135 -34
  11. data/app/{components/marty/script_form/client/Ext.ux.form.field.CodeMirror.js → assets/javascripts/marty/extjs/extensions/marty.js} +87 -6
  12. data/app/assets/stylesheets/marty/application.css +1 -13
  13. data/app/assets/stylesheets/marty/codemirror/codemirror.css +346 -0
  14. data/app/{components/marty/script_form/client → assets/stylesheets/marty/codemirror}/delorean.css +0 -0
  15. data/app/components/marty/auth_app/client/auth_app.js +82 -80
  16. data/app/components/marty/data_grid_view.rb +1 -54
  17. data/app/components/marty/data_grid_view/client/data_grid_view.js +49 -0
  18. data/app/components/marty/form.rb +1 -5
  19. data/app/components/marty/form/client/form.js +5 -0
  20. data/app/components/marty/grid.rb +1 -146
  21. data/app/components/marty/grid/client/grid.js +146 -0
  22. data/app/components/marty/import_view.rb +1 -32
  23. data/app/components/marty/import_view/client/import_view.js +32 -0
  24. data/app/components/marty/live_search_grid_panel.rb +1 -21
  25. data/app/components/marty/live_search_grid_panel/client/live_search_grid_panel.js +27 -0
  26. data/app/components/marty/main_auth_app.rb +4 -145
  27. data/app/components/marty/main_auth_app/client/main_auth_app.js +124 -0
  28. data/app/components/marty/mcfly_grid_panel.rb +1 -17
  29. data/app/components/marty/mcfly_grid_panel/client/mcfly_grid_panel.js +37 -0
  30. data/app/components/marty/new_posting_form.rb +1 -6
  31. data/app/components/marty/new_posting_form/client/new_posting_form.js +6 -0
  32. data/app/components/marty/panel.rb +1 -5
  33. data/app/components/marty/panel/client/panel.js +5 -0
  34. data/app/components/marty/posting_grid.rb +4 -55
  35. data/app/components/marty/posting_grid/client/posting_grid.js +50 -0
  36. data/app/components/marty/promise_view.rb +2 -75
  37. data/app/components/marty/promise_view/client/promise_view.css +12 -9
  38. data/app/components/marty/promise_view/client/promise_view.js +57 -0
  39. data/app/components/marty/report_form.rb +3 -69
  40. data/app/components/marty/report_form/client/report_form.js +78 -0
  41. data/app/components/marty/report_select.rb +1 -45
  42. data/app/components/marty/report_select/client/report_select.js +50 -0
  43. data/app/components/marty/reporting.rb +1 -8
  44. data/app/components/marty/reporting/client/reporting.js +8 -0
  45. data/app/components/marty/script_form.rb +2 -63
  46. data/app/components/marty/script_form/client/script_form.js +44 -0
  47. data/app/components/marty/script_tester.rb +1 -7
  48. data/app/components/marty/script_tester/client/script_tester.js +7 -0
  49. data/app/components/marty/scripting.rb +1 -55
  50. data/app/components/marty/scripting/client/scripting.js +62 -0
  51. data/app/components/marty/simple_app/client/simple_app.js +21 -13
  52. data/app/models/marty/promise.rb +22 -1
  53. data/app/views/layouts/marty/application.html.erb +8 -6
  54. data/docker-compose.dummy.yml +2 -0
  55. data/lib/marty/monkey.rb +0 -16
  56. data/lib/marty/version.rb +1 -1
  57. data/spec/dummy/config/initializers/assets.rb +1 -0
  58. data/spec/features/reporting_spec.rb +1 -0
  59. data/spec/features/scripting_spec.rb +4 -4
  60. data/spec/spec_helper.rb +1 -0
  61. data/spec/support/chromedriver.rb +5 -1
  62. data/spec/support/shared_connection_db_helpers.rb +42 -2
  63. metadata +29 -168
  64. data/app/assets/images/marty/.gitkeep +0 -0
  65. data/app/components/marty/mcfly_grid_panel/client/dup_in_form.js +0 -20
  66. data/app/components/marty/script_form/client/codemirror.css +0 -172
  67. data/app/components/marty/script_form/client/codemirror.js +0 -3130
  68. data/app/components/marty/script_form/client/mode/clike/clike.js +0 -284
  69. data/app/components/marty/script_form/client/mode/clike/index.html +0 -102
  70. data/app/components/marty/script_form/client/mode/clike/scala.html +0 -766
  71. data/app/components/marty/script_form/client/mode/clojure/clojure.js +0 -206
  72. data/app/components/marty/script_form/client/mode/clojure/index.html +0 -67
  73. data/app/components/marty/script_form/client/mode/coffeescript/LICENSE +0 -22
  74. data/app/components/marty/script_form/client/mode/coffeescript/coffeescript.js +0 -346
  75. data/app/components/marty/script_form/client/mode/coffeescript/index.html +0 -728
  76. data/app/components/marty/script_form/client/mode/commonlisp/commonlisp.js +0 -101
  77. data/app/components/marty/script_form/client/mode/commonlisp/index.html +0 -165
  78. data/app/components/marty/script_form/client/mode/css/css.js +0 -448
  79. data/app/components/marty/script_form/client/mode/css/index.html +0 -58
  80. data/app/components/marty/script_form/client/mode/css/test.js +0 -501
  81. data/app/components/marty/script_form/client/mode/diff/diff.js +0 -32
  82. data/app/components/marty/script_form/client/mode/diff/index.html +0 -105
  83. data/app/components/marty/script_form/client/mode/ecl/ecl.js +0 -203
  84. data/app/components/marty/script_form/client/mode/ecl/index.html +0 -42
  85. data/app/components/marty/script_form/client/mode/erlang/erlang.js +0 -463
  86. data/app/components/marty/script_form/client/mode/erlang/index.html +0 -63
  87. data/app/components/marty/script_form/client/mode/gfm/gfm.js +0 -150
  88. data/app/components/marty/script_form/client/mode/gfm/index.html +0 -48
  89. data/app/components/marty/script_form/client/mode/go/go.js +0 -170
  90. data/app/components/marty/script_form/client/mode/go/index.html +0 -73
  91. data/app/components/marty/script_form/client/mode/groovy/groovy.js +0 -210
  92. data/app/components/marty/script_form/client/mode/groovy/index.html +0 -72
  93. data/app/components/marty/script_form/client/mode/haskell/haskell.js +0 -242
  94. data/app/components/marty/script_form/client/mode/haskell/index.html +0 -61
  95. data/app/components/marty/script_form/client/mode/haxe/haxe.js +0 -429
  96. data/app/components/marty/script_form/client/mode/haxe/index.html +0 -91
  97. data/app/components/marty/script_form/client/mode/htmlembedded/htmlembedded.js +0 -72
  98. data/app/components/marty/script_form/client/mode/htmlembedded/index.html +0 -50
  99. data/app/components/marty/script_form/client/mode/htmlmixed/htmlmixed.js +0 -84
  100. data/app/components/marty/script_form/client/mode/htmlmixed/index.html +0 -52
  101. data/app/components/marty/script_form/client/mode/javascript/index.html +0 -78
  102. data/app/components/marty/script_form/client/mode/javascript/javascript.js +0 -361
  103. data/app/components/marty/script_form/client/mode/jinja2/index.html +0 -38
  104. data/app/components/marty/script_form/client/mode/jinja2/jinja2.js +0 -42
  105. data/app/components/marty/script_form/client/mode/less/index.html +0 -740
  106. data/app/components/marty/script_form/client/mode/less/less.js +0 -266
  107. data/app/components/marty/script_form/client/mode/lua/index.html +0 -73
  108. data/app/components/marty/script_form/client/mode/lua/lua.js +0 -140
  109. data/app/components/marty/script_form/client/mode/markdown/index.html +0 -343
  110. data/app/components/marty/script_form/client/mode/markdown/markdown.js +0 -382
  111. data/app/components/marty/script_form/client/mode/markdown/test.js +0 -1084
  112. data/app/components/marty/script_form/client/mode/mysql/index.html +0 -42
  113. data/app/components/marty/script_form/client/mode/mysql/mysql.js +0 -186
  114. data/app/components/marty/script_form/client/mode/ntriples/index.html +0 -33
  115. data/app/components/marty/script_form/client/mode/ntriples/ntriples.js +0 -172
  116. data/app/components/marty/script_form/client/mode/ocaml/index.html +0 -130
  117. data/app/components/marty/script_form/client/mode/ocaml/ocaml.js +0 -114
  118. data/app/components/marty/script_form/client/mode/pascal/LICENSE +0 -7
  119. data/app/components/marty/script_form/client/mode/pascal/index.html +0 -49
  120. data/app/components/marty/script_form/client/mode/pascal/pascal.js +0 -94
  121. data/app/components/marty/script_form/client/mode/perl/LICENSE +0 -19
  122. data/app/components/marty/script_form/client/mode/perl/index.html +0 -63
  123. data/app/components/marty/script_form/client/mode/perl/perl.js +0 -816
  124. data/app/components/marty/script_form/client/mode/php/index.html +0 -49
  125. data/app/components/marty/script_form/client/mode/php/php.js +0 -148
  126. data/app/components/marty/script_form/client/mode/pig/index.html +0 -43
  127. data/app/components/marty/script_form/client/mode/pig/pig.js +0 -172
  128. data/app/components/marty/script_form/client/mode/plsql/index.html +0 -63
  129. data/app/components/marty/script_form/client/mode/plsql/plsql.js +0 -217
  130. data/app/components/marty/script_form/client/mode/properties/index.html +0 -41
  131. data/app/components/marty/script_form/client/mode/properties/properties.js +0 -63
  132. data/app/components/marty/script_form/client/mode/python/LICENSE.txt +0 -21
  133. data/app/components/marty/script_form/client/mode/python/index.html +0 -123
  134. data/app/components/marty/script_form/client/mode/python/python.js +0 -338
  135. data/app/components/marty/script_form/client/mode/r/LICENSE +0 -24
  136. data/app/components/marty/script_form/client/mode/r/index.html +0 -74
  137. data/app/components/marty/script_form/client/mode/r/r.js +0 -141
  138. data/app/components/marty/script_form/client/mode/rpm/changes/changes.js +0 -19
  139. data/app/components/marty/script_form/client/mode/rpm/changes/index.html +0 -54
  140. data/app/components/marty/script_form/client/mode/rpm/spec/index.html +0 -100
  141. data/app/components/marty/script_form/client/mode/rpm/spec/spec.css +0 -5
  142. data/app/components/marty/script_form/client/mode/rpm/spec/spec.js +0 -66
  143. data/app/components/marty/script_form/client/mode/rst/index.html +0 -526
  144. data/app/components/marty/script_form/client/mode/rst/rst.js +0 -326
  145. data/app/components/marty/script_form/client/mode/ruby/LICENSE +0 -24
  146. data/app/components/marty/script_form/client/mode/ruby/index.html +0 -172
  147. data/app/components/marty/script_form/client/mode/rust/index.html +0 -49
  148. data/app/components/marty/script_form/client/mode/rust/rust.js +0 -432
  149. data/app/components/marty/script_form/client/mode/scheme/index.html +0 -65
  150. data/app/components/marty/script_form/client/mode/scheme/scheme.js +0 -230
  151. data/app/components/marty/script_form/client/mode/shell/index.html +0 -50
  152. data/app/components/marty/script_form/client/mode/shell/shell.js +0 -118
  153. data/app/components/marty/script_form/client/mode/sieve/LICENSE +0 -23
  154. data/app/components/marty/script_form/client/mode/sieve/index.html +0 -81
  155. data/app/components/marty/script_form/client/mode/sieve/sieve.js +0 -156
  156. data/app/components/marty/script_form/client/mode/smalltalk/index.html +0 -56
  157. data/app/components/marty/script_form/client/mode/smalltalk/smalltalk.js +0 -139
  158. data/app/components/marty/script_form/client/mode/smarty/index.html +0 -83
  159. data/app/components/marty/script_form/client/mode/smarty/smarty.js +0 -148
  160. data/app/components/marty/script_form/client/mode/sparql/index.html +0 -41
  161. data/app/components/marty/script_form/client/mode/sparql/sparql.js +0 -143
  162. data/app/components/marty/script_form/client/mode/stex/index.html +0 -98
  163. data/app/components/marty/script_form/client/mode/stex/stex.js +0 -182
  164. data/app/components/marty/script_form/client/mode/stex/test.js +0 -343
  165. data/app/components/marty/script_form/client/mode/tiddlywiki/index.html +0 -141
  166. data/app/components/marty/script_form/client/mode/tiddlywiki/tiddlywiki.css +0 -14
  167. data/app/components/marty/script_form/client/mode/tiddlywiki/tiddlywiki.js +0 -384
  168. data/app/components/marty/script_form/client/mode/tiki/index.html +0 -83
  169. data/app/components/marty/script_form/client/mode/tiki/tiki.css +0 -26
  170. data/app/components/marty/script_form/client/mode/tiki/tiki.js +0 -309
  171. data/app/components/marty/script_form/client/mode/vb/LICENSE.txt +0 -21
  172. data/app/components/marty/script_form/client/mode/vb/index.html +0 -89
  173. data/app/components/marty/script_form/client/mode/vb/vb.js +0 -260
  174. data/app/components/marty/script_form/client/mode/vbscript/index.html +0 -43
  175. data/app/components/marty/script_form/client/mode/vbscript/vbscript.js +0 -26
  176. data/app/components/marty/script_form/client/mode/velocity/index.html +0 -104
  177. data/app/components/marty/script_form/client/mode/velocity/velocity.js +0 -146
  178. data/app/components/marty/script_form/client/mode/verilog/index.html +0 -211
  179. data/app/components/marty/script_form/client/mode/verilog/verilog.js +0 -194
  180. data/app/components/marty/script_form/client/mode/xml/index.html +0 -45
  181. data/app/components/marty/script_form/client/mode/xml/xml.js +0 -318
  182. data/app/components/marty/script_form/client/mode/xquery/LICENSE +0 -20
  183. data/app/components/marty/script_form/client/mode/xquery/index.html +0 -223
  184. data/app/components/marty/script_form/client/mode/xquery/test/index.html +0 -27
  185. data/app/components/marty/script_form/client/mode/xquery/test/testBase.js +0 -42
  186. data/app/components/marty/script_form/client/mode/xquery/test/testEmptySequenceKeyword.js +0 -16
  187. data/app/components/marty/script_form/client/mode/xquery/test/testMultiAttr.js +0 -16
  188. data/app/components/marty/script_form/client/mode/xquery/test/testNamespaces.js +0 -91
  189. data/app/components/marty/script_form/client/mode/xquery/test/testProcessingInstructions.js +0 -16
  190. data/app/components/marty/script_form/client/mode/xquery/test/testQuotes.js +0 -19
  191. data/app/components/marty/script_form/client/mode/xquery/xquery.js +0 -451
  192. data/app/components/marty/script_form/client/mode/yaml/index.html +0 -68
  193. data/app/components/marty/script_form/client/mode/yaml/yaml.js +0 -95
  194. data/app/components/marty/script_form/client/theme/ambiance.css +0 -81
  195. data/app/components/marty/script_form/client/theme/blackboard.css +0 -25
  196. data/app/components/marty/script_form/client/theme/cobalt.css +0 -18
  197. data/app/components/marty/script_form/client/theme/eclipse.css +0 -25
  198. data/app/components/marty/script_form/client/theme/elegant.css +0 -10
  199. data/app/components/marty/script_form/client/theme/erlang-dark.css +0 -21
  200. data/app/components/marty/script_form/client/theme/lesser-dark.css +0 -44
  201. data/app/components/marty/script_form/client/theme/monokai.css +0 -28
  202. data/app/components/marty/script_form/client/theme/neat.css +0 -9
  203. data/app/components/marty/script_form/client/theme/night.css +0 -21
  204. data/app/components/marty/script_form/client/theme/rubyblue.css +0 -21
  205. data/app/components/marty/script_form/client/theme/vibrant-ink.css +0 -27
  206. data/app/components/marty/script_form/client/theme/xq-dark.css +0 -46
  207. data/app/components/marty/script_form/client/util/closetag.js +0 -164
  208. data/app/components/marty/script_form/client/util/dialog.css +0 -27
  209. data/app/components/marty/script_form/client/util/dialog.js +0 -70
  210. data/app/components/marty/script_form/client/util/foldcode.js +0 -196
  211. data/app/components/marty/script_form/client/util/formatting.js +0 -193
  212. data/app/components/marty/script_form/client/util/javascript-hint.js +0 -134
  213. data/app/components/marty/script_form/client/util/loadmode.js +0 -51
  214. data/app/components/marty/script_form/client/util/match-highlighter.js +0 -44
  215. data/app/components/marty/script_form/client/util/multiplex.js +0 -77
  216. data/app/components/marty/script_form/client/util/overlay.js +0 -54
  217. data/app/components/marty/script_form/client/util/pig-hint.js +0 -123
  218. data/app/components/marty/script_form/client/util/runmode-standalone.js +0 -90
  219. data/app/components/marty/script_form/client/util/runmode.js +0 -53
  220. data/app/components/marty/script_form/client/util/search.js +0 -118
  221. data/app/components/marty/script_form/client/util/searchcursor.js +0 -119
  222. data/app/components/marty/script_form/client/util/simple-hint.css +0 -16
  223. data/app/components/marty/script_form/client/util/simple-hint.js +0 -97
  224. data/app/components/marty/script_form/client/util/xml-hint.js +0 -137
  225. data/lib/marty/javascript/grid_view_in_form.js +0 -81
@@ -1,38 +0,0 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <title>CodeMirror: Jinja2 mode</title>
6
- <link rel="stylesheet" href="../../lib/codemirror.css">
7
- <script src="../../lib/codemirror.js"></script>
8
- <script src="jinja2.js"></script>
9
- <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
10
- <link rel="stylesheet" href="../../doc/docs.css">
11
- </head>
12
- <body>
13
- <h1>CodeMirror: Jinja2 mode</h1>
14
- <form><textarea id="code" name="code">
15
- &lt;html style="color: green"&gt;
16
- &lt;!-- this is a comment --&gt;
17
- &lt;head&gt;
18
- &lt;title&gt;Jinja2 Example&lt;/title&gt;
19
- &lt;/head&gt;
20
- &lt;body&gt;
21
- &lt;ul&gt;
22
- {# this is a comment #}
23
- {%- for item in li -%}
24
- &lt;li&gt;
25
- {{ item.label }}
26
- &lt;/li&gt;
27
- {% endfor -%}
28
- &lt;/ul&gt;
29
- &lt;/body&gt;
30
- &lt;/html&gt;
31
- </textarea></form>
32
- <script>
33
- var editor =
34
- CodeMirror.fromTextArea(document.getElementById("code"), {mode:
35
- {name: "jinja2", htmlMode: true}});
36
- </script>
37
- </body>
38
- </html>
@@ -1,42 +0,0 @@
1
- CodeMirror.defineMode("jinja2", function(config, parserConf) {
2
- var keywords = ["block", "endblock", "for", "endfor", "in", "true", "false",
3
- "loop", "none", "self", "super", "if", "as", "not", "and",
4
- "else", "import", "with", "without", "context"];
5
- keywords = new RegExp("^((" + keywords.join(")|(") + "))\\b");
6
-
7
- function tokenBase (stream, state) {
8
- var ch = stream.next();
9
- if (ch == "{") {
10
- if (ch = stream.eat(/\{|%|#/)) {
11
- stream.eat("-");
12
- state.tokenize = inTag(ch);
13
- return "tag";
14
- }
15
- }
16
- }
17
- function inTag (close) {
18
- if (close == "{") {
19
- close = "}";
20
- }
21
- return function (stream, state) {
22
- var ch = stream.next();
23
- if ((ch == close || (ch == "-" && stream.eat(close)))
24
- && stream.eat("}")) {
25
- state.tokenize = tokenBase;
26
- return "tag";
27
- }
28
- if (stream.match(keywords)) {
29
- return "keyword";
30
- }
31
- return close == "#" ? "comment" : "string";
32
- };
33
- }
34
- return {
35
- startState: function () {
36
- return {tokenize: tokenBase};
37
- },
38
- token: function (stream, state) {
39
- return state.tokenize(stream, state);
40
- }
41
- };
42
- });
@@ -1,740 +0,0 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <title>CodeMirror: LESS mode</title>
6
- <link rel="stylesheet" href="../../lib/codemirror.css">
7
- <script src="../../lib/codemirror.js"></script>
8
- <script src="less.js"></script>
9
- <style>.CodeMirror {background: #f8f8f8; border: 1px solid #ddd; font-size:12px} .CodeMirror-scroll {height: 400px}</style>
10
- <link rel="stylesheet" href="../../doc/docs.css">
11
- <link rel="stylesheet" href="../../theme/lesser-dark.css">
12
- </head>
13
- <body>
14
- <h1>CodeMirror: LESS mode</h1>
15
- <form><textarea id="code" name="code">@media screen and (device-aspect-ratio: 16/9) { … }
16
- @media screen and (device-aspect-ratio: 32/18) { … }
17
- @media screen and (device-aspect-ratio: 1280/720) { … }
18
- @media screen and (device-aspect-ratio: 2560/1440) { … }
19
-
20
- html:lang(fr-be)
21
- html:lang(de)
22
- :lang(fr-be) > q
23
- :lang(de) > q
24
-
25
- tr:nth-child(2n+1) /* represents every odd row of an HTML table */
26
- tr:nth-child(odd) /* same */
27
- tr:nth-child(2n+0) /* represents every even row of an HTML table */
28
- tr:nth-child(even) /* same */
29
-
30
- /* Alternate paragraph colours in CSS */
31
- p:nth-child(4n+1) { color: navy; }
32
- p:nth-child(4n+2) { color: green; }
33
- p:nth-child(4n+3) { color: maroon; }
34
- p:nth-child(4n+4) { color: purple; }
35
-
36
- :nth-child(10n-1) /* represents the 9th, 19th, 29th, etc, element */
37
- :nth-child(10n+9) /* Same */
38
- :nth-child(10n+-1) /* Syntactically invalid, and would be ignored */
39
-
40
- :nth-child( 3n + 1 )
41
- :nth-child( +3n - 2 )
42
- :nth-child( -n+ 6)
43
- :nth-child( +6 )
44
-
45
- html|tr:nth-child(-n+6) /* represents the 6 first rows of XHTML tables */
46
-
47
- img:nth-of-type(2n+1) { float: right; }
48
- img:nth-of-type(2n) { float: left; }
49
-
50
- body > h2:nth-of-type(n+2):nth-last-of-type(n+2)
51
- body > h2:not(:first-of-type):not(:last-of-type)
52
-
53
- html|*:not(:link):not(:visited)
54
- *|*:not(:hover)
55
- p::first-line { text-transform: uppercase }
56
-
57
- p { color: red; font-size: 12pt }
58
- p::first-letter { color: green; font-size: 200% }
59
- p::first-line { color: blue }
60
-
61
- p { line-height: 1.1 }
62
- p::first-letter { font-size: 3em; font-weight: normal }
63
- span { font-weight: bold }
64
-
65
- * /* a=0 b=0 c=0 -> specificity = 0 */
66
- LI /* a=0 b=0 c=1 -> specificity = 1 */
67
- UL LI /* a=0 b=0 c=2 -> specificity = 2 */
68
- UL OL+LI /* a=0 b=0 c=3 -> specificity = 3 */
69
- H1 + *[REL=up] /* a=0 b=1 c=1 -> specificity = 11 */
70
- UL OL LI.red /* a=0 b=1 c=3 -> specificity = 13 */
71
- LI.red.level /* a=0 b=2 c=1 -> specificity = 21 */
72
- #x34y /* a=1 b=0 c=0 -> specificity = 100 */
73
- #s12:not(FOO) /* a=1 b=0 c=1 -> specificity = 101 */
74
-
75
- @namespace foo url(http://www.example.com);
76
- foo|h1 { color: blue } /* first rule */
77
- foo|* { color: yellow } /* second rule */
78
- |h1 { color: red } /* ...*/
79
- *|h1 { color: green }
80
- h1 { color: green }
81
-
82
- span[hello="Ocean"][goodbye="Land"]
83
-
84
- a[rel~="copyright"] { ... }
85
- a[href="http://www.w3.org/"] { ... }
86
-
87
- DIALOGUE[character=romeo]
88
- DIALOGUE[character=juliet]
89
-
90
- [att^=val]
91
- [att$=val]
92
- [att*=val]
93
-
94
- @namespace foo "http://www.example.com";
95
- [foo|att=val] { color: blue }
96
- [*|att] { color: yellow }
97
- [|att] { color: green }
98
- [att] { color: green }
99
-
100
-
101
- *:target { color : red }
102
- *:target::before { content : url(target.png) }
103
-
104
- E[foo]{
105
- padding:65px;
106
- }
107
- E[foo] ~ F{
108
- padding:65px;
109
- }
110
- E#myid{
111
- padding:65px;
112
- }
113
- input[type="search"]::-webkit-search-decoration,
114
- input[type="search"]::-webkit-search-cancel-button {
115
- -webkit-appearance: none; // Inner-padding issues in Chrome OSX, Safari 5
116
- }
117
- button::-moz-focus-inner,
118
- input::-moz-focus-inner { // Inner padding and border oddities in FF3/4
119
- padding: 0;
120
- border: 0;
121
- }
122
- .btn {
123
- // reset here as of 2.0.3 due to Recess property order
124
- border-color: #ccc;
125
- border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);
126
- }
127
- fieldset span button, fieldset span input[type="file"] {
128
- font-size:12px;
129
- font-family:Arial, Helvetica, sans-serif;
130
- }
131
- .el tr:nth-child(even):last-child td:first-child{
132
- -moz-border-radius-bottomleft:3px;
133
- -webkit-border-bottom-left-radius:3px;
134
- border-bottom-left-radius:3px;
135
- }
136
-
137
- /* Some LESS code */
138
-
139
- button {
140
- width: 32px;
141
- height: 32px;
142
- border: 0;
143
- margin: 4px;
144
- cursor: pointer;
145
- }
146
- button.icon-plus { background: url(http://dahlström.net/tmp/sharp-icons/svg-icon-target.svg#plus) no-repeat; }
147
- button.icon-chart { background: url(http://dahlström.net/tmp/sharp-icons/svg-icon-target.svg#chart) no-repeat; }
148
-
149
- button:hover { background-color: #999; }
150
- button:active { background-color: #666; }
151
-
152
- @test_a: #eeeQQQ;//this is not a valid hex value and thus parsed as an element id
153
- @test_b: #eeeFFF //this is a valid hex value but the declaration doesn't end with a semicolon and thus parsed as an element id
154
-
155
- #eee aaa .box
156
- {
157
- #test bbb {
158
- width: 500px;
159
- height: 250px;
160
- background-image: url(dir/output/sheep.png), url( betweengrassandsky.png );
161
- background-position: center bottom, left top;
162
- background-repeat: no-repeat;
163
- }
164
- }
165
-
166
- @base: #f938ab;
167
-
168
- .box-shadow(@style, @c) when (iscolor(@c)) {
169
- box-shadow: @style @c;
170
- -webkit-box-shadow: @style @c;
171
- -moz-box-shadow: @style @c;
172
- }
173
- .box-shadow(@style, @alpha: 50%) when (isnumber(@alpha)) {
174
- .box-shadow(@style, rgba(0, 0, 0, @alpha));
175
- }
176
-
177
- @color: #4D926F;
178
-
179
- #header {
180
- color: @color;
181
- color: #000000;
182
- }
183
- h2 {
184
- color: @color;
185
- }
186
-
187
- .rounded-corners (@radius: 5px) {
188
- border-radius: @radius;
189
- -webkit-border-radius: @radius;
190
- -moz-border-radius: @radius;
191
- }
192
-
193
- #header {
194
- .rounded-corners;
195
- }
196
- #footer {
197
- .rounded-corners(10px);
198
- }
199
-
200
- .box-shadow (@x: 0, @y: 0, @blur: 1px, @alpha) {
201
- @val: @x @y @blur rgba(0, 0, 0, @alpha);
202
-
203
- box-shadow: @val;
204
- -webkit-box-shadow: @val;
205
- -moz-box-shadow: @val;
206
- }
207
- .box { @base: #f938ab;
208
- color: saturate(@base, 5%);
209
- border-color: lighten(@base, 30%);
210
- div { .box-shadow(0, 0, 5px, 0.4) }
211
- }
212
-
213
- @import url("something.css");
214
-
215
- @light-blue: hsl(190, 50%, 65%);
216
- @light-yellow: desaturate(#fefec8, 10%);
217
- @dark-yellow: desaturate(darken(@light-yellow, 10%), 40%);
218
- @darkest: hsl(20, 0%, 15%);
219
- @dark: hsl(190, 20%, 30%);
220
- @medium: hsl(10, 60%, 30%);
221
- @light: hsl(90, 40%, 20%);
222
- @lightest: hsl(90, 20%, 90%);
223
- @highlight: hsl(80, 50%, 90%);
224
- @blue: hsl(210, 60%, 20%);
225
- @alpha-blue: hsla(210, 60%, 40%, 0.5);
226
-
227
- .box-shadow (@x, @y, @blur, @alpha) {
228
- @value: @x @y @blur rgba(0, 0, 0, @alpha);
229
- box-shadow: @value;
230
- -moz-box-shadow: @value;
231
- -webkit-box-shadow: @value;
232
- }
233
- .border-radius (@radius) {
234
- border-radius: @radius;
235
- -moz-border-radius: @radius;
236
- -webkit-border-radius: @radius;
237
- }
238
-
239
- .border-radius (@radius, bottom) {
240
- border-top-right-radius: 0;
241
- border-top-left-radius: 0;
242
- -moz-border-top-right-radius: 0;
243
- -moz-border-top-left-radius: 0;
244
- -webkit-border-top-left-radius: 0;
245
- -webkit-border-top-right-radius: 0;
246
- }
247
- .border-radius (@radius, right) {
248
- border-bottom-left-radius: 0;
249
- border-top-left-radius: 0;
250
- -moz-border-bottom-left-radius: 0;
251
- -moz-border-top-left-radius: 0;
252
- -webkit-border-bottom-left-radius: 0;
253
- -webkit-border-top-left-radius: 0;
254
- }
255
- .box-shadow-inset (@x, @y, @blur, @color) {
256
- box-shadow: @x @y @blur @color inset;
257
- -moz-box-shadow: @x @y @blur @color inset;
258
- -webkit-box-shadow: @x @y @blur @color inset;
259
- }
260
- .code () {
261
- font-family: 'Bitstream Vera Sans Mono',
262
- 'DejaVu Sans Mono',
263
- 'Monaco',
264
- Courier,
265
- monospace !important;
266
- }
267
- .wrap () {
268
- text-wrap: wrap;
269
- white-space: pre-wrap; /* css-3 */
270
- white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
271
- white-space: -pre-wrap; /* Opera 4-6 */
272
- white-space: -o-pre-wrap; /* Opera 7 */
273
- word-wrap: break-word; /* Internet Explorer 5.5+ */
274
- }
275
-
276
- html { margin: 0 }
277
- body {
278
- background-color: @darkest;
279
- margin: 0 auto;
280
- font-family: Arial, sans-serif;
281
- font-size: 100%;
282
- overflow-x: hidden;
283
- }
284
- nav, header, footer, section, article {
285
- display: block;
286
- }
287
- a {
288
- color: #b83000;
289
- }
290
- h1 a {
291
- color: black;
292
- text-decoration: none;
293
- }
294
- a:hover {
295
- text-decoration: underline;
296
- }
297
- h1, h2, h3, h4 {
298
- margin: 0;
299
- font-weight: normal;
300
- }
301
- ul, li {
302
- list-style-type: none;
303
- }
304
- code { .code; }
305
- code {
306
- .string, .regexp { color: @dark }
307
- .keyword { font-weight: bold }
308
- .comment { color: rgba(0, 0, 0, 0.5) }
309
- .number { color: @blue }
310
- .class, .special { color: rgba(0, 50, 100, 0.8) }
311
- }
312
- pre {
313
- padding: 0 30px;
314
- .wrap;
315
- }
316
- blockquote {
317
- font-style: italic;
318
- }
319
- body > footer {
320
- text-align: left;
321
- margin-left: 10px;
322
- font-style: italic;
323
- font-size: 18px;
324
- color: #888;
325
- }
326
-
327
- #logo {
328
- margin-top: 30px;
329
- margin-bottom: 30px;
330
- display: block;
331
- width: 199px;
332
- height: 81px;
333
- background: url(/images/logo.png) no-repeat;
334
- }
335
- nav {
336
- margin-left: 15px;
337
- }
338
- nav a, #dropdown li {
339
- display: inline-block;
340
- color: white;
341
- line-height: 42px;
342
- margin: 0;
343
- padding: 0px 15px;
344
- text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.5);
345
- text-decoration: none;
346
- border: 2px solid transparent;
347
- border-width: 0 2px;
348
- &:hover {
349
- .dark-red;
350
- text-decoration: none;
351
- }
352
- }
353
- .dark-red {
354
- @red: @medium;
355
- border: 2px solid darken(@red, 25%);
356
- border-left-color: darken(@red, 15%);
357
- border-right-color: darken(@red, 15%);
358
- border-bottom: 0;
359
- border-top: 0;
360
- background-color: darken(@red, 10%);
361
- }
362
-
363
- .content {
364
- margin: 0 auto;
365
- width: 980px;
366
- }
367
-
368
- #menu {
369
- position: absolute;
370
- width: 100%;
371
- z-index: 3;
372
- clear: both;
373
- display: block;
374
- background-color: @blue;
375
- height: 42px;
376
- border-top: 2px solid lighten(@alpha-blue, 20%);
377
- border-bottom: 2px solid darken(@alpha-blue, 25%);
378
- .box-shadow(0, 1px, 8px, 0.6);
379
- -moz-box-shadow: 0 0 0 #000; // Because firefox sucks.
380
-
381
- &.docked {
382
- background-color: hsla(210, 60%, 40%, 0.4);
383
- }
384
- &:hover {
385
- background-color: @blue;
386
- }
387
-
388
- #dropdown {
389
- margin: 0 0 0 117px;
390
- padding: 0;
391
- padding-top: 5px;
392
- display: none;
393
- width: 190px;
394
- border-top: 2px solid @medium;
395
- color: @highlight;
396
- border: 2px solid darken(@medium, 25%);
397
- border-left-color: darken(@medium, 15%);
398
- border-right-color: darken(@medium, 15%);
399
- border-top-width: 0;
400
- background-color: darken(@medium, 10%);
401
- ul {
402
- padding: 0px;
403
- }
404
- li {
405
- font-size: 14px;
406
- display: block;
407
- text-align: left;
408
- padding: 0;
409
- border: 0;
410
- a {
411
- display: block;
412
- padding: 0px 15px;
413
- text-decoration: none;
414
- color: white;
415
- &:hover {
416
- background-color: darken(@medium, 15%);
417
- text-decoration: none;
418
- }
419
- }
420
- }
421
- .border-radius(5px, bottom);
422
- .box-shadow(0, 6px, 8px, 0.5);
423
- }
424
- }
425
-
426
- #main {
427
- margin: 0 auto;
428
- width: 100%;
429
- background-color: @light-blue;
430
- border-top: 8px solid darken(@light-blue, 5%);
431
-
432
- #intro {
433
- background-color: lighten(@light-blue, 25%);
434
- float: left;
435
- margin-top: -8px;
436
- margin-right: 5px;
437
-
438
- height: 380px;
439
- position: relative;
440
- z-index: 2;
441
- font-family: 'Droid Serif', 'Georgia';
442
- width: 395px;
443
- padding: 45px 20px 23px 30px;
444
- border: 2px dashed darken(@light-blue, 10%);
445
- .box-shadow(1px, 0px, 6px, 0.5);
446
- border-bottom: 0;
447
- border-top: 0;
448
- #download { color: transparent; border: 0; float: left; display: inline-block; margin: 15px 0 15px -5px; }
449
- #download img { display: inline-block}
450
- #download-info {
451
- code {
452
- font-size: 13px;
453
- }
454
- color: @blue + #333; display: inline; float: left; margin: 36px 0 0 15px }
455
- }
456
- h2 {
457
- span {
458
- color: @medium;
459
- }
460
- color: @blue;
461
- margin: 20px 0;
462
- font-size: 24px;
463
- line-height: 1.2em;
464
- }
465
- h3 {
466
- color: @blue;
467
- line-height: 1.4em;
468
- margin: 30px 0 15px 0;
469
- font-size: 1em;
470
- text-shadow: 0px 0px 0px @lightest;
471
- span { color: @medium }
472
- }
473
- #example {
474
- p {
475
- font-size: 18px;
476
- color: @blue;
477
- font-weight: bold;
478
- text-shadow: 0px 1px 1px @lightest;
479
- }
480
- pre {
481
- margin: 0;
482
- text-shadow: 0 -1px 1px @darkest;
483
- margin-top: 20px;
484
- background-color: desaturate(@darkest, 8%);
485
- border: 0;
486
- width: 450px;
487
- color: lighten(@lightest, 2%);
488
- background-repeat: repeat;
489
- padding: 15px;
490
- border: 1px dashed @lightest;
491
- line-height: 15px;
492
- .box-shadow(0, 0px, 15px, 0.5);
493
- .code;
494
- .border-radius(2px);
495
- code .attribute { color: hsl(40, 50%, 70%) }
496
- code .variable { color: hsl(120, 10%, 50%) }
497
- code .element { color: hsl(170, 20%, 50%) }
498
-
499
- code .string, .regexp { color: hsl(75, 50%, 65%) }
500
- code .class { color: hsl(40, 40%, 60%); font-weight: normal }
501
- code .id { color: hsl(50, 40%, 60%); font-weight: normal }
502
- code .comment { color: rgba(255, 255, 255, 0.2) }
503
- code .number, .color { color: hsl(10, 40%, 50%) }
504
- code .class, code .mixin, .special { color: hsl(190, 20%, 50%) }
505
- #time { color: #aaa }
506
- }
507
- float: right;
508
- font-size: 12px;
509
- margin: 0;
510
- margin-top: 15px;
511
- padding: 0;
512
- width: 500px;
513
- }
514
- }
515
-
516
-
517
- .page {
518
- .content {
519
- width: 870px;
520
- padding: 45px;
521
- }
522
- margin: 0 auto;
523
- font-family: 'Georgia', serif;
524
- font-size: 18px;
525
- line-height: 26px;
526
- padding: 0 60px;
527
- code {
528
- font-size: 16px;
529
- }
530
- pre {
531
- border-width: 1px;
532
- border-style: dashed;
533
- padding: 15px;
534
- margin: 15px 0;
535
- }
536
- h1 {
537
- text-align: left;
538
- font-size: 40px;
539
- margin-top: 15px;
540
- margin-bottom: 35px;
541
- }
542
- p + h1 { margin-top: 60px }
543
- h2, h3 {
544
- margin: 30px 0 15px 0;
545
- }
546
- p + h2, pre + h2, code + h2 {
547
- border-top: 6px solid rgba(255, 255, 255, 0.1);
548
- padding-top: 30px;
549
- }
550
- h3 {
551
- margin: 15px 0;
552
- }
553
- }
554
-
555
-
556
- #docs {
557
- @bg: lighten(@light-blue, 5%);
558
- border-top: 2px solid lighten(@bg, 5%);
559
- color: @blue;
560
- background-color: @light-blue;
561
- .box-shadow(0, -2px, 5px, 0.2);
562
-
563
- h1 {
564
- font-family: 'Droid Serif', 'Georgia', serif;
565
- padding-top: 30px;
566
- padding-left: 45px;
567
- font-size: 44px;
568
- text-align: left;
569
- margin: 30px 0 !important;
570
- text-shadow: 0px 1px 1px @lightest;
571
- font-weight: bold;
572
- }
573
- .content {
574
- clear: both;
575
- border-color: transparent;
576
- background-color: lighten(@light-blue, 25%);
577
- .box-shadow(0, 5px, 5px, 0.4);
578
- }
579
- pre {
580
- @background: lighten(@bg, 30%);
581
- color: lighten(@blue, 10%);
582
- background-color: @background;
583
- border-color: lighten(@light-blue, 25%);
584
- border-width: 2px;
585
- code .attribute { color: hsl(40, 50%, 30%) }
586
- code .variable { color: hsl(120, 10%, 30%) }
587
- code .element { color: hsl(170, 20%, 30%) }
588
-
589
- code .string, .regexp { color: hsl(75, 50%, 35%) }
590
- code .class { color: hsl(40, 40%, 30%); font-weight: normal }
591
- code .id { color: hsl(50, 40%, 30%); font-weight: normal }
592
- code .comment { color: rgba(0, 0, 0, 0.4) }
593
- code .number, .color { color: hsl(10, 40%, 30%) }
594
- code .class, code .mixin, .special { color: hsl(190, 20%, 30%) }
595
- }
596
- pre code { font-size: 15px }
597
- p + h2, pre + h2, code + h2 { border-top-color: rgba(0, 0, 0, 0.1) }
598
- }
599
-
600
- td {
601
- padding-right: 30px;
602
- }
603
- #synopsis {
604
- .box-shadow(0, 5px, 5px, 0.2);
605
- }
606
- #synopsis, #about {
607
- h2 {
608
- font-size: 30px;
609
- padding: 10px 0;
610
- }
611
- h1 + h2 {
612
- margin-top: 15px;
613
- }
614
- h3 { font-size: 22px }
615
-
616
- .code-example {
617
- border-spacing: 0;
618
- border-width: 1px;
619
- border-style: dashed;
620
- padding: 0;
621
- pre { border: 0; margin: 0 }
622
- td {
623
- border: 0;
624
- margin: 0;
625
- background-color: desaturate(darken(@darkest, 5%), 20%);
626
- vertical-align: top;
627
- padding: 0;
628
- }
629
- tr { padding: 0 }
630
- }
631
- .css-output {
632
- td {
633
- border-left: 0;
634
- }
635
- }
636
- .less-example {
637
- //border-right: 1px dotted rgba(255, 255, 255, 0.5) !important;
638
- }
639
- .css-output, .less-example {
640
- width: 390px;
641
- }
642
- pre {
643
- padding: 20px;
644
- line-height: 20px;
645
- font-size: 14px;
646
- }
647
- }
648
- #about, #synopsis, #guide {
649
- a {
650
- text-decoration: none;
651
- color: @light-yellow;
652
- border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
653
- &:hover {
654
- text-decoration: none;
655
- border-bottom: 1px dashed @light-yellow;
656
- }
657
- }
658
- @bg: desaturate(darken(@darkest, 5%), 20%);
659
- text-shadow: 0 -1px 1px lighten(@bg, 5%);
660
- color: @highlight;
661
- background-color: @bg;
662
- .content {
663
- background-color: desaturate(@darkest, 20%);
664
- clear: both;
665
- .box-shadow(0, 5px, 5px, 0.4);
666
- }
667
- h1, h2, h3 {
668
- color: @dark-yellow;
669
- }
670
- pre {
671
- code .attribute { color: hsl(40, 50%, 70%) }
672
- code .variable { color: hsl(120, 10%, 50%) }
673
- code .element { color: hsl(170, 20%, 50%) }
674
-
675
- code .string, .regexp { color: hsl(75, 50%, 65%) }
676
- code .class { color: hsl(40, 40%, 60%); font-weight: normal }
677
- code .id { color: hsl(50, 40%, 60%); font-weight: normal }
678
- code .comment { color: rgba(255, 255, 255, 0.2) }
679
- code .number, .color { color: hsl(10, 40%, 50%) }
680
- code .class, code .mixin, .special { color: hsl(190, 20%, 50%) }
681
- background-color: @bg;
682
- border-color: darken(@light-yellow, 5%);
683
- }
684
- code {
685
- color: darken(@dark-yellow, 5%);
686
- .string, .regexp { color: desaturate(@light-blue, 15%) }
687
- .keyword { color: hsl(40, 40%, 60%); font-weight: normal }
688
- .comment { color: rgba(255, 255, 255, 0.2) }
689
- .number { color: lighten(@blue, 10%) }
690
- .class, .special { color: hsl(190, 20%, 50%) }
691
- }
692
- }
693
- #guide {
694
- background-color: @darkest;
695
- .content {
696
- background-color: transparent;
697
- }
698
-
699
- }
700
-
701
- #about {
702
- background-color: @darkest !important;
703
- .content {
704
- background-color: desaturate(lighten(@darkest, 3%), 5%);
705
- }
706
- }
707
- #synopsis {
708
- background-color: desaturate(lighten(@darkest, 3%), 5%) !important;
709
- .content {
710
- background-color: desaturate(lighten(@darkest, 3%), 5%);
711
- }
712
- pre {}
713
- }
714
- #synopsis, #guide {
715
- .content {
716
- .box-shadow(0, 0px, 0px, 0.0);
717
- }
718
- }
719
- #about footer {
720
- margin-top: 30px;
721
- padding-top: 30px;
722
- border-top: 6px solid rgba(0, 0, 0, 0.1);
723
- text-align: center;
724
- font-size: 16px;
725
- color: rgba(255, 255, 255, 0.35);
726
- #copy { font-size: 12px }
727
- text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.02);
728
- }
729
- </textarea></form>
730
- <script>
731
- var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
732
- theme: "lesser-dark",
733
- lineNumbers : true,
734
- matchBrackets : true
735
- });
736
- </script>
737
-
738
- <p><strong>MIME types defined:</strong> <code>text/x-less</code>, <code>text/css</code> (if not previously defined).</p>
739
- </body>
740
- </html>