Project

General

Profile

Revision 229 trunk/scripts/codemirror/mode/less/index.html

View differences:

index.html
1

  
2 1
<!doctype html>
3 2
<html>
4 3
  <head>
......
6 5
    <link rel="stylesheet" href="../../lib/codemirror.css">
7 6
    <script src="../../lib/codemirror.js"></script>
8 7
    <script src="less.js"></script>
9
    <style>.CodeMirror {background: #f8f8f8; border: 1px solid #ddd;}</style>
8
    <style>.CodeMirror {background: #f8f8f8; border: 1px solid #ddd;} .CodeMirror-scroll {height: 400px}</style>
10 9
    <link rel="stylesheet" href="../../doc/docs.css">
10
    <link rel="stylesheet" href="../../theme/lesser-dark.css">
11 11
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
12 12
  </head>
13 13
  <body>
14 14
    <h1>CodeMirror: LESS mode</h1>
15
    <form><textarea id="code" name="code">
16
/* Some LESS code */
15
    <form><textarea id="code" name="code">/* Some LESS code */
17 16

  
17
button {
18
    width:  32px;
19
    height: 32px;
20
    border: 0;
21
    margin: 4px;
22
    cursor: pointer;
23
}
24
button.icon-plus { background: url(http://dahlström.net/tmp/sharp-icons/svg-icon-target.svg#plus) no-repeat; }
25
button.icon-chart { background: url(http://dahlström.net/tmp/sharp-icons/svg-icon-target.svg#chart) no-repeat; }
26

  
27
button:hover { background-color: #999; }
28
button:active { background-color: #666; }
29

  
30
@test_a: #eeeQQQ;//this is not a valid hex value and thus parsed as an element id
31
@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
32

  
33
#eee aaa .box
34
{
35
  #test bbb {
36
    width: 500px;
37
    height: 250px;
38
    background-image: url(dir/output/sheep.png), url( betweengrassandsky.png );
39
    background-position: center bottom, left top;
40
    background-repeat: no-repeat;
41
  }
42
}
43

  
44
@base: #f938ab;
45

  
46
.box-shadow(@style, @c) when (iscolor(@c)) {
47
  box-shadow:         @style @c;
48
  -webkit-box-shadow: @style @c;
49
  -moz-box-shadow:    @style @c;
50
}
51
.box-shadow(@style, @alpha: 50%) when (isnumber(@alpha)) {
52
  .box-shadow(@style, rgba(0, 0, 0, @alpha));
53
}
54

  
18 55
@color: #4D926F;
19 56

  
20 57
#header {
......
160 197
body > footer {
161 198
  text-align: left;
162 199
  margin-left: 10px;
163
	font-style: italic;
200
  font-style: italic;
164 201
  font-size: 18px;
165 202
  color: #888;
166 203
}
......
569 606
}
570 607
</textarea></form>
571 608
    <script>
572
      var editor = CodeMirror.fromTextArea(document.getElementById("code"), {});
609
      var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
610
        theme: "lesser-dark",
611
        lineNumbers : true,
612
  		  matchBrackets : true
613
      });
573 614
    </script>
574 615

  
575
    <p><strong>MIME types defined:</strong> <code>text/less</code>.</p>
616
    <p><strong>MIME types defined:</strong> <code>text/x-less</code>, <code>text/css</code> (if not previously defined).</p>
576 617
  </body>
577 618
</html>

Also available in: Unified diff