1
0

index.html 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>CodeMirror: Sass mode</title>
  6. <link rel="stylesheet" href="../../lib/codemirror.css">
  7. <script src="../../lib/codemirror.js"></script>
  8. <script src="../../addon/edit/matchbrackets.js"></script>
  9. <script src="sass.js"></script>
  10. <style>.CodeMirror {border: 1px solid #ddd; font-size:12px; height: 400px}</style>
  11. <link rel="stylesheet" href="../../doc/docs.css">
  12. </head>
  13. <body>
  14. <h1>CodeMirror: Sass mode</h1>
  15. <form><textarea id="code" name="code">// Variable Definitions
  16. $page-width: 800px
  17. $sidebar-width: 200px
  18. $primary-color: #eeeeee
  19. // Global Attributes
  20. body
  21. font:
  22. family: sans-serif
  23. size: 30em
  24. weight: bold
  25. // Scoped Styles
  26. #contents
  27. width: $page-width
  28. #sidebar
  29. float: right
  30. width: $sidebar-width
  31. #main
  32. width: $page-width - $sidebar-width
  33. background: $primary-color
  34. h2
  35. color: blue
  36. #footer
  37. height: 200px
  38. </textarea></form>
  39. <script>
  40. var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
  41. lineNumbers : true,
  42. matchBrackets : true
  43. });
  44. </script>
  45. <p><strong>MIME types defined:</strong> <code>text/x-sass</code>.</p>
  46. </body>
  47. </html>