index.html 1.5 KB

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