本站源代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
1.6KB

  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="../css/css.js"></script>
  9. <script src="sass.js"></script>
  10. <style>.CodeMirror {border: 1px solid #ddd; font-size:12px; height: 400px}</style>
  11. <div id=nav>
  12. <a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
  13. <ul>
  14. <li><a href="../../index.html">Home</a>
  15. <li><a href="../../doc/manual.html">Manual</a>
  16. <li><a href="https://github.com/codemirror/codemirror">Code</a>
  17. </ul>
  18. <ul>
  19. <li><a href="../index.html">Language modes</a>
  20. <li><a class=active href="#">Sass</a>
  21. </ul>
  22. </div>
  23. <article>
  24. <h2>Sass mode</h2>
  25. <form><textarea id="code" name="code">// Variable Definitions
  26. $page-width: 800px
  27. $sidebar-width: 200px
  28. $primary-color: #eeeeee
  29. // Global Attributes
  30. body
  31. font:
  32. family: sans-serif
  33. size: 30em
  34. weight: bold
  35. // Scoped Styles
  36. #contents
  37. width: $page-width
  38. #sidebar
  39. float: right
  40. width: $sidebar-width
  41. #main
  42. width: $page-width - $sidebar-width
  43. background: $primary-color
  44. h2
  45. color: blue
  46. #footer
  47. height: 200px
  48. </textarea></form>
  49. <script>
  50. var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
  51. lineNumbers : true,
  52. matchBrackets : true,
  53. mode: "sass"
  54. });
  55. </script>
  56. <p><strong>MIME types defined:</strong> <code>text/x-sass</code>.</p>
  57. </article>
上海开阖软件有限公司 沪ICP备12045867号-1