Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Backup of old ruby-stylus-source working with Rails 3.2.0

  • Loading branch information...
commit 2b1959175dbf73352fdc85a4e1d6b55b391681f6 1 parent ed3f2a7
@x2002g authored
Showing with 14,121 additions and 3 deletions.
  1. +2 −3 README.md
  2. BIN  lib/.DS_Store
  3. +9 −0 lib/node_modules/cssom/.idea/CSSOM.iml
  4. +3 −0  lib/node_modules/cssom/.idea/dictionaries/nv.xml
  5. +5 −0 lib/node_modules/cssom/.idea/encodings.xml
  6. +17 −0 lib/node_modules/cssom/.idea/misc.xml
  7. +9 −0 lib/node_modules/cssom/.idea/modules.xml
  8. +82 −0 lib/node_modules/cssom/.idea/projectCodeStyle.xml
  9. +8 −0 lib/node_modules/cssom/.idea/vcs.xml
  10. +467 −0 lib/node_modules/cssom/.idea/workspace.xml
  11. +19 −0 lib/node_modules/cssom/.livereload
  12. +37 −0 lib/node_modules/cssom/Jakefile
  13. +33 −0 lib/node_modules/cssom/README.mdown
  14. +23 −0 lib/node_modules/cssom/Rakefile
  15. +19 −0 lib/node_modules/cssom/docs/.livereload
  16. +3 −0  lib/node_modules/cssom/docs/bar.css
  17. 0  lib/node_modules/cssom/docs/demo.css
  18. +4 −0 lib/node_modules/cssom/docs/foo.css
  19. +170 −0 lib/node_modules/cssom/docs/parse.html
  20. +431 −0 lib/node_modules/cssom/docs/parse2.html
  21. +100 −0 lib/node_modules/cssom/index.html
  22. +34 −0 lib/node_modules/cssom/lib/CSSImportRule.js
  23. +38 −0 lib/node_modules/cssom/lib/CSSMediaRule.js
  24. +3 −0  lib/node_modules/cssom/lib/CSSOM.js
  25. +38 −0 lib/node_modules/cssom/lib/CSSRule.js
  26. +130 −0 lib/node_modules/cssom/lib/CSSStyleDeclaration.js
  27. +187 −0 lib/node_modules/cssom/lib/CSSStyleRule.js
  28. +85 −0 lib/node_modules/cssom/lib/CSSStyleSheet.js
  29. +61 −0 lib/node_modules/cssom/lib/MediaList.js
  30. +15 −0 lib/node_modules/cssom/lib/StyleSheet.js
  31. +69 −0 lib/node_modules/cssom/lib/clone.js
  32. +10 −0 lib/node_modules/cssom/lib/index.js
  33. +195 −0 lib/node_modules/cssom/lib/parse.js
  34. +17 −0 lib/node_modules/cssom/media.html
  35. +30 −0 lib/node_modules/cssom/package.json
  36. +32 −0 lib/node_modules/cssom/plugins/toHTML.js
  37. +22 −0 lib/node_modules/cssom/server/index.html
  38. +21 −0 lib/node_modules/cssom/server/index.js
  39. +21 −0 lib/node_modules/cssom/shorthands.html
  40. +35 −0 lib/node_modules/cssom/test/CSSStyleDeclaration.test.js
  41. +12 −0 lib/node_modules/cssom/test/CSSStyleRule.test.js
  42. +16 −0 lib/node_modules/cssom/test/CSSStyleSheet.test.js
  43. +21 −0 lib/node_modules/cssom/test/MediaList.test.js
  44. +38 −0 lib/node_modules/cssom/test/clone.test.js
  45. +3 −0  lib/node_modules/cssom/test/fixtures/dummy.css
  46. +97 −0 lib/node_modules/cssom/test/helper.js
  47. +42 −0 lib/node_modules/cssom/test/index.html
  48. +346 −0 lib/node_modules/cssom/test/parse.test.js
  49. +189 −0 lib/node_modules/cssom/test/vendor/qunit.css
  50. +1,341 −0 lib/node_modules/cssom/test/vendor/qunit.js
  51. +16 −0 lib/node_modules/growl/History.md
  52. +74 −0 lib/node_modules/growl/Readme.md
  53. +82 −0 lib/node_modules/growl/lib/growl.js
  54. +6 −0 lib/node_modules/growl/package.json
  55. +17 −0 lib/node_modules/growl/test.js
  56. +156 −0 lib/stylus/colors.js
  57. +130 −0 lib/stylus/convert/css.js
  58. +58 −0 lib/stylus/errors.js
  59. +120 −0 lib/stylus/functions/image.js
  60. +722 −0 lib/stylus/functions/index.js
  61. +123 −0 lib/stylus/functions/index.styl
  62. +98 −0 lib/stylus/functions/url.js
  63. +728 −0 lib/stylus/lexer.js
  64. +223 −0 lib/stylus/middleware.js
  65. +65 −0 lib/stylus/nodes/arguments.js
  66. +54 −0 lib/stylus/nodes/binop.js
  67. +99 −0 lib/stylus/nodes/block.js
  68. +103 −0 lib/stylus/nodes/boolean.js
  69. +57 −0 lib/stylus/nodes/call.js
  70. +42 −0 lib/stylus/nodes/charset.js
  71. +32 −0 lib/stylus/nodes/comment.js
  72. +56 −0 lib/stylus/nodes/each.js
  73. +168 −0 lib/stylus/nodes/expression.js
  74. +55 −0 lib/stylus/nodes/fontface.js
  75. +104 −0 lib/stylus/nodes/function.js
  76. +79 −0 lib/stylus/nodes/group.js
  77. +256 −0 lib/stylus/nodes/hsla.js
  78. +127 −0 lib/stylus/nodes/ident.js
  79. +55 −0 lib/stylus/nodes/if.js
  80. +30 −0 lib/stylus/nodes/import.js
  81. +52 −0 lib/stylus/nodes/index.js
  82. +32 −0 lib/stylus/nodes/jsliteral.js
  83. +78 −0 lib/stylus/nodes/keyframes.js
  84. +92 −0 lib/stylus/nodes/literal.js
  85. +42 −0 lib/stylus/nodes/media.js
  86. +209 −0 lib/stylus/nodes/node.js
  87. +72 −0 lib/stylus/nodes/null.js
  88. +43 −0 lib/stylus/nodes/page.js
  89. +72 −0 lib/stylus/nodes/params.js
  90. +72 −0 lib/stylus/nodes/property.js
  91. +44 −0 lib/stylus/nodes/return.js
  92. +335 −0 lib/stylus/nodes/rgba.js
  93. +50 −0 lib/stylus/nodes/root.js
  94. +57 −0 lib/stylus/nodes/selector.js
  95. +120 −0 lib/stylus/nodes/string.js
  96. +51 −0 lib/stylus/nodes/ternary.js
  97. +46 −0 lib/stylus/nodes/unaryop.js
  98. +207 −0 lib/stylus/nodes/unit.js
  99. +1,514 −0 lib/stylus/parser.js
  100. +157 −0 lib/stylus/renderer.js
  101. +7 −0 lib/stylus/source.rb
  102. +66 −0 lib/stylus/stack/frame.js
  103. +146 −0 lib/stylus/stack/index.js
  104. +53 −0 lib/stylus/stack/scope.js
  105. +102 −0 lib/stylus/stylus.js
  106. +53 −0 lib/stylus/token.js
  107. +237 −0 lib/stylus/utils.js
  108. +472 −0 lib/stylus/visitor/compiler.js
  109. +1,070 −0 lib/stylus/visitor/evaluator.js
  110. +31 −0 lib/stylus/visitor/index.js
  111. +15 −0 stylus-source.gemspec
View
5 README.md
@@ -1,4 +1,3 @@
-ruby-stylus-source
-==================
+# Ruby Stylus Source
-ruby-stylus-source
+https://github.com/LearnBoost/stylus
View
BIN  lib/.DS_Store
Binary file not shown
View
9 lib/node_modules/cssom/.idea/CSSOM.iml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="RUBY_MODULE" version="4">
+ <component name="NewModuleRootManager">
+ <content url="file://$MODULE_DIR$" />
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ </component>
+</module>
+
View
3  lib/node_modules/cssom/.idea/dictionaries/nv.xml
@@ -0,0 +1,3 @@
+<component name="ProjectDictionaryState">
+ <dictionary name="nv" />
+</component>
View
5 lib/node_modules/cssom/.idea/encodings.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" defaultCharsetForPropertiesFiles="UTF-8" />
+</project>
+
View
17 lib/node_modules/cssom/.idea/misc.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="DependencyValidationManager">
+ <option name="SKIP_IMPORT_STATEMENTS" value="false" />
+ </component>
+ <component name="ProjectDetails">
+ <option name="projectName" value="CSSOM" />
+ </component>
+ <component name="ProjectResources">
+ <default-html-doctype>http://www.w3.org/1999/xhtml</default-html-doctype>
+ </component>
+ <component name="ProjectRootManager" version="2" project-jdk-name="Ruby SDK 1.8.7 (/usr/bin/ruby)" project-jdk-type="RUBY_SDK" />
+ <component name="SvnBranchConfigurationManager">
+ <option name="mySupportsUserInfoFilter" value="true" />
+ </component>
+</project>
+
View
9 lib/node_modules/cssom/.idea/modules.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ProjectModuleManager">
+ <modules>
+ <module fileurl="file://$PROJECT_DIR$/.idea/CSSOM.iml" filepath="$PROJECT_DIR$/.idea/CSSOM.iml" />
+ </modules>
+ </component>
+</project>
+
View
82 lib/node_modules/cssom/.idea/projectCodeStyle.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="CodeStyleSettingsManager">
+ <option name="PER_PROJECT_SETTINGS">
+ <value>
+ <option name="USE_SAME_INDENTS" value="true" />
+ <option name="OTHER_INDENT_OPTIONS">
+ <value>
+ <option name="INDENT_SIZE" value="4" />
+ <option name="CONTINUATION_INDENT_SIZE" value="0" />
+ <option name="TAB_SIZE" value="4" />
+ <option name="USE_TAB_CHARACTER" value="true" />
+ <option name="SMART_TABS" value="false" />
+ <option name="LABEL_INDENT_SIZE" value="0" />
+ <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+ <option name="USE_RELATIVE_INDENTS" value="false" />
+ </value>
+ </option>
+ <option name="LINE_SEPARATOR" value="&#10;" />
+ <option name="XML_ATTRIBUTE_WRAP" value="0" />
+ <option name="XML_TEXT_WRAP" value="0" />
+ <option name="XML_ALIGN_ATTRIBUTES" value="false" />
+ <option name="HTML_ATTRIBUTE_WRAP" value="0" />
+ <option name="HTML_TEXT_WRAP" value="0" />
+ <option name="HTML_ALIGN_ATTRIBUTES" value="false" />
+ <option name="HTML_DO_NOT_INDENT_CHILDREN_OF" value="html,body,thead,tbody,tfoot,style,script" />
+ <ADDITIONAL_INDENT_OPTIONS fileType="js">
+ <option name="INDENT_SIZE" value="4" />
+ <option name="CONTINUATION_INDENT_SIZE" value="8" />
+ <option name="TAB_SIZE" value="4" />
+ <option name="USE_TAB_CHARACTER" value="false" />
+ <option name="SMART_TABS" value="false" />
+ <option name="LABEL_INDENT_SIZE" value="0" />
+ <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+ <option name="USE_RELATIVE_INDENTS" value="false" />
+ </ADDITIONAL_INDENT_OPTIONS>
+ <ADDITIONAL_INDENT_OPTIONS fileType="jsp">
+ <option name="INDENT_SIZE" value="4" />
+ <option name="CONTINUATION_INDENT_SIZE" value="8" />
+ <option name="TAB_SIZE" value="4" />
+ <option name="USE_TAB_CHARACTER" value="false" />
+ <option name="SMART_TABS" value="false" />
+ <option name="LABEL_INDENT_SIZE" value="0" />
+ <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+ <option name="USE_RELATIVE_INDENTS" value="false" />
+ </ADDITIONAL_INDENT_OPTIONS>
+ <ADDITIONAL_INDENT_OPTIONS fileType="sass">
+ <option name="INDENT_SIZE" value="2" />
+ <option name="CONTINUATION_INDENT_SIZE" value="8" />
+ <option name="TAB_SIZE" value="4" />
+ <option name="USE_TAB_CHARACTER" value="false" />
+ <option name="SMART_TABS" value="false" />
+ <option name="LABEL_INDENT_SIZE" value="0" />
+ <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+ <option name="USE_RELATIVE_INDENTS" value="false" />
+ </ADDITIONAL_INDENT_OPTIONS>
+ <ADDITIONAL_INDENT_OPTIONS fileType="xml">
+ <option name="INDENT_SIZE" value="4" />
+ <option name="CONTINUATION_INDENT_SIZE" value="8" />
+ <option name="TAB_SIZE" value="4" />
+ <option name="USE_TAB_CHARACTER" value="false" />
+ <option name="SMART_TABS" value="false" />
+ <option name="LABEL_INDENT_SIZE" value="0" />
+ <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+ <option name="USE_RELATIVE_INDENTS" value="false" />
+ </ADDITIONAL_INDENT_OPTIONS>
+ <ADDITIONAL_INDENT_OPTIONS fileType="yml">
+ <option name="INDENT_SIZE" value="2" />
+ <option name="CONTINUATION_INDENT_SIZE" value="8" />
+ <option name="TAB_SIZE" value="4" />
+ <option name="USE_TAB_CHARACTER" value="false" />
+ <option name="SMART_TABS" value="false" />
+ <option name="LABEL_INDENT_SIZE" value="0" />
+ <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+ <option name="USE_RELATIVE_INDENTS" value="false" />
+ </ADDITIONAL_INDENT_OPTIONS>
+ </value>
+ </option>
+ <option name="USE_PER_PROJECT_SETTINGS" value="true" />
+ </component>
+</project>
+
View
8 lib/node_modules/cssom/.idea/vcs.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="VcsDirectoryMappings">
+ <mapping directory="" vcs="" />
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
+ </component>
+</project>
+
View
467 lib/node_modules/cssom/.idea/workspace.xml
@@ -0,0 +1,467 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ChangeListManager">
+ <list default="true" id="30285013-672e-4686-875b-58c4268c29f5" name="Default" comment="">
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/docs/build.html" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/CSSImportRule.js" afterPath="$PROJECT_DIR$/lib/CSSImportRule.js" />
+ </list>
+ <ignored path=".idea/workspace.xml" />
+ <ignored path="CSSOM.iws" />
+ <option name="TRACKING_ENABLED" value="true" />
+ <option name="SHOW_DIALOG" value="false" />
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
+ <option name="LAST_RESOLUTION" value="IGNORE" />
+ </component>
+ <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
+ <component name="CreatePatchCommitExecutor">
+ <option name="PATCH_PATH" value="" />
+ <option name="REVERSE_PATCH" value="false" />
+ </component>
+ <component name="DaemonCodeAnalyzer">
+ <disable_hints />
+ </component>
+ <component name="FavoritesManager">
+ <favorites_list name="CSSOM" />
+ </component>
+ <component name="FileEditorManager">
+ <leaf>
+ <file leaf-file-name="parse.html" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/docs/parse.html">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="26" column="16" selection-start="713" selection-end="713" vertical-scroll-proportion="-16.0">
+ <folding>
+ <marker date="1292697557000" expanded="true" signature="681:774" placeholder="{...}" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="parse2.html" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/docs/parse2.html">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="197" column="25" selection-start="3686" selection-end="3686" vertical-scroll-proportion="-0.6666667">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="build.html" pinned="false" current="true" current-in-tab="true">
+ <entry file="file://$PROJECT_DIR$/docs/build.html">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="50" column="28" selection-start="1126" selection-end="1126" vertical-scroll-proportion="0.6090535">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="parse.js" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/lib/parse.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="44" column="11" selection-start="880" selection-end="880" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="CSSOM.js" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/build/CSSOM.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="11" column="11" selection-start="226" selection-end="226" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="helper.js" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/test/helper.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="32" column="0" selection-start="771" selection-end="771" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="qunit.js" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/test/vendor/qunit.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="42" column="59" selection-start="1027" selection-end="1027" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="CSSStyleDeclaration.test.js" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/test/CSSStyleDeclaration.test.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="12" column="19" selection-start="279" selection-end="279" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="CSSStyleDeclaration.js" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/lib/CSSStyleDeclaration.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="105" column="22" selection-start="2425" selection-end="2443" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="clone.test.js" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/test/clone.test.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="36" column="14" selection-start="805" selection-end="805" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ </leaf>
+ </component>
+ <component name="FindManager">
+ <FindUsagesManager>
+ <setting name="OPEN_NEW_TAB" value="false" />
+ </FindUsagesManager>
+ </component>
+ <component name="Git.Branch.Configurations">
+ <option name="CURRENT" value="parser" />
+ <option name="CONFIGURATIONS">
+ <array>
+ <BranchConfiguration>
+ <option name="IS_AUTO_DETECTED" value="true" />
+ <option name="NAME" value="master" />
+ <option name="BRANCHES">
+ <array>
+ <BranchInfo>
+ <option name="ROOT" value="$PROJECT_DIR$" />
+ <option name="REFERENCE" value="master" />
+ </BranchInfo>
+ </array>
+ </option>
+ </BranchConfiguration>
+ <BranchConfiguration>
+ <option name="IS_AUTO_DETECTED" value="true" />
+ <option name="NAME" value="parser" />
+ <option name="BRANCHES">
+ <array>
+ <BranchInfo>
+ <option name="ROOT" value="$PROJECT_DIR$" />
+ <option name="REFERENCE" value="parser" />
+ </BranchInfo>
+ </array>
+ </option>
+ </BranchConfiguration>
+ </array>
+ </option>
+ </component>
+ <component name="Git.Settings">
+ <option name="CHECKOUT_INCLUDE_TAGS" value="false" />
+ <option name="UPDATE_CHANGES_POLICY" value="STASH" />
+ </component>
+ <component name="IdeDocumentHistory">
+ <option name="changedFiles">
+ <list>
+ <option value="$PROJECT_DIR$/test/parse.test.js" />
+ <option value="$PROJECT_DIR$/lib/CSSImportRule.js" />
+ <option value="$PROJECT_DIR$/server/index.html" />
+ <option value="$PROJECT_DIR$/server/index.js" />
+ <option value="$PROJECT_DIR$/lib/parse.js" />
+ <option value="$PROJECT_DIR$/lib/index.js" />
+ <option value="$PROJECT_DIR$/test/index.html" />
+ <option value="$PROJECT_DIR$/test/clone.test.js" />
+ <option value="$PROJECT_DIR$/lib/clone.js" />
+ <option value="$PROJECT_DIR$/test/helper.js" />
+ <option value="$PROJECT_DIR$/test/vendor/qunit.js" />
+ <option value="$PROJECT_DIR$/lib/CSSStyleDeclaration.js" />
+ <option value="$PROJECT_DIR$/test/CSSStyleDeclaration.test.js" />
+ <option value="$PROJECT_DIR$/docs/parse2.html" />
+ <option value="$PROJECT_DIR$/docs/parse.html" />
+ <option value="$PROJECT_DIR$/docs/build.html" />
+ </list>
+ </option>
+ </component>
+ <component name="PerforceDirect.Settings">
+ <option name="ENABLED" value="false" />
+ </component>
+ <component name="ProjectLevelVcsManager">
+ <OptionsSetting value="true" id="Add" />
+ <OptionsSetting value="true" id="Remove" />
+ <OptionsSetting value="true" id="Checkout" />
+ <OptionsSetting value="true" id="Update" />
+ <OptionsSetting value="true" id="Status" />
+ <OptionsSetting value="true" id="Edit" />
+ <ConfirmationsSetting value="2" id="Add" />
+ <ConfirmationsSetting value="0" id="Remove" />
+ </component>
+ <component name="ProjectReloadState">
+ <option name="STATE" value="0" />
+ </component>
+ <component name="ProjectView">
+ <navigator currentView="ProjectPane" proportions="" version="1" splitterProportion="0.5">
+ <flattenPackages />
+ <showMembers />
+ <showModules />
+ <showLibraryContents ProjectPane="false" />
+ <hideEmptyPackages />
+ <abbreviatePackageNames />
+ <autoscrollToSource />
+ <autoscrollFromSource />
+ <sortByType />
+ </navigator>
+ <panes>
+ <pane id="Favorites" />
+ <pane id="Scope" />
+ <pane id="ProjectPane">
+ <subPane>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="CSSOM" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="CSSOM" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ </subPane>
+ </pane>
+ </panes>
+ </component>
+ <component name="PropertiesComponent">
+ <property name="options.splitter.main.proportions" value="0.3" />
+ <property name="WebServerToolWindowFactoryState" value="true" />
+ <property name="WebServerToolWindowPanel.toolwindow.show.permissions" value="false" />
+ <property name="WebServerToolWindowPanel.toolwindow.show.date" value="false" />
+ <property name="options.lastSelected" value="preferences.sourceCode.HTML" />
+ <property name="WebServerToolWindowPanel.toolwindow.show.size" value="false" />
+ <property name="WebServerToolWindowPanel.toolwindow.highlight.symlinks" value="true" />
+ <property name="DefaultHtmlFileTemplate" value="Html5" />
+ <property name="WebServerToolWindowPanel.toolwindow.highlight.mappings" value="true" />
+ <property name="options.searchVisible" value="true" />
+ <property name="options.splitter.details.proportions" value="0.2" />
+ <property name="GoToClass.includeJavaFiles" value="false" />
+ </component>
+ <component name="PublishConfig" exclude=".svn;.cvs;.idea;.DS_Store;.git;.hg" autoUpload="true">
+ <servers>
+ <server id="03e3dd9a-a049-4a09-8d26-9d8ee4abc8ea">
+ <serverdata>
+ <mappings>
+ <mapping local="$PROJECT_DIR$" />
+ </mappings>
+ </serverdata>
+ </server>
+ </servers>
+ </component>
+ <component name="RunManager">
+ <configuration default="true" type="JavascriptDebugSession" factoryName="Remote">
+ <JSRemoteDebuggerConfigurationSettings>
+ <option name="engineId" value="embedded" />
+ <option name="fileUrl" />
+ </JSRemoteDebuggerConfigurationSettings>
+ <method />
+ </configuration>
+ <list size="0" />
+ </component>
+ <component name="ShelveChangesManager" show_recycled="false" />
+ <component name="SvnConfiguration" maxAnnotateRevisions="500">
+ <option name="USER" value="" />
+ <option name="PASSWORD" value="" />
+ <option name="LAST_MERGED_REVISION" />
+ <option name="UPDATE_RUN_STATUS" value="false" />
+ <option name="MERGE_DRY_RUN" value="false" />
+ <option name="MERGE_DIFF_USE_ANCESTRY" value="true" />
+ <option name="UPDATE_LOCK_ON_DEMAND" value="false" />
+ <option name="IGNORE_SPACES_IN_MERGE" value="false" />
+ <option name="DETECT_NESTED_COPIES" value="false" />
+ <option name="CHECK_NESTED_FOR_QUICK_MERGE" value="false" />
+ <option name="IGNORE_SPACES_IN_ANNOTATE" value="true" />
+ <option name="SHOW_MERGE_SOURCES_IN_ANNOTATE" value="true" />
+ <configuration useDefault="true">$USER_HOME$/.subversion_IDEA</configuration>
+ <myIsUseDefaultProxy>false</myIsUseDefaultProxy>
+ <supportedVersion>125</supportedVersion>
+ </component>
+ <component name="TaskManager">
+ <task active="true" id="Default" summary="Default task">
+ <changelist id="30285013-672e-4686-875b-58c4268c29f5" name="Default" comment="" />
+ <created>1285386214790</created>
+ <updated>1285386214790</updated>
+ </task>
+ <servers />
+ </component>
+ <component name="TodoView" selected-index="0">
+ <todo-panel id="selected-file">
+ <are-packages-shown value="false" />
+ <are-modules-shown value="false" />
+ <flatten-packages value="false" />
+ <is-autoscroll-to-source value="false" />
+ </todo-panel>
+ <todo-panel id="all">
+ <are-packages-shown value="false" />
+ <are-modules-shown value="false" />
+ <flatten-packages value="false" />
+ <is-autoscroll-to-source value="false" />
+ </todo-panel>
+ <todo-panel id="default-changelist">
+ <are-packages-shown value="false" />
+ <are-modules-shown value="false" />
+ <flatten-packages value="false" />
+ <is-autoscroll-to-source value="false" />
+ </todo-panel>
+ </component>
+ <component name="ToolWindowManager">
+ <frame x="851" y="22" width="907" height="1087" extended-state="0" />
+ <editor active="true" />
+ <layout>
+ <window_info id="Changes" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="true" content_ui="tabs" />
+ <window_info id="TODO" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.2691867" sideWeight="0.3254902" order="1" side_tool="true" content_ui="tabs" />
+ <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.24948454" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
+ <window_info id="Remote Host" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3866775" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
+ <window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3565976" sideWeight="0.9709977" order="0" side_tool="false" content_ui="tabs" />
+ <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
+ <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
+ <window_info id="Version Control" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="4" side_tool="true" content_ui="tabs" />
+ <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
+ <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
+ <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.327451" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
+ <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
+ <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
+ <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
+ </layout>
+ </component>
+ <component name="VcsManagerConfiguration">
+ <option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true" />
+ <option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="true" />
+ <option name="PERFORM_UPDATE_IN_BACKGROUND" value="true" />
+ <option name="PERFORM_COMMIT_IN_BACKGROUND" value="true" />
+ <option name="PERFORM_EDIT_IN_BACKGROUND" value="true" />
+ <option name="PERFORM_CHECKOUT_IN_BACKGROUND" value="true" />
+ <option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true" />
+ <option name="PERFORM_ROLLBACK_IN_BACKGROUND" value="false" />
+ <option name="CHECK_LOCALLY_CHANGED_CONFLICTS_IN_BACKGROUND" value="true" />
+ <option name="ENABLE_BACKGROUND_PROCESSES" value="true" />
+ <option name="CHANGED_ON_SERVER_INTERVAL" value="5" />
+ <option name="SHOW_ONLY_CHANGED_IN_SELECTION_DIFF" value="true" />
+ <option name="FORCE_NON_EMPTY_COMMENT" value="false" />
+ <option name="LAST_COMMIT_MESSAGE" />
+ <option name="MAKE_NEW_CHANGELIST_ACTIVE" value="true" />
+ <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
+ <option name="CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT" value="false" />
+ <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
+ <option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
+ <option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
+ <option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
+ <option name="ACTIVE_VCS_NAME" />
+ <option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
+ <option name="UPDATE_GROUP_BY_CHANGELIST" value="false" />
+ <option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
+ <option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
+ </component>
+ <component name="XDebuggerManager">
+ <breakpoint-manager />
+ </component>
+ <component name="XSLT-Support.FileAssociations.UIState">
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="CSSOM" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ </component>
+ <component name="editorHistoryManager">
+ <entry file="file://$PROJECT_DIR$/server/index.html">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="11" column="39" selection-start="306" selection-end="306" vertical-scroll-proportion="0.30877194" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/server/index.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="15" column="40" selection-start="432" selection-end="432" vertical-scroll-proportion="0.4040404" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/test/index.html">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="15" column="34" selection-start="423" selection-end="423" vertical-scroll-proportion="-10.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/lib/CSSStyleRule.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="4" column="2" selection-start="143" selection-end="143" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/lib/CSSStyleSheet.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="12" column="6" selection-start="250" selection-end="250" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/lib/clone.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="55" column="9" selection-start="1506" selection-end="1506" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/lib/parse.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="44" column="11" selection-start="880" selection-end="880" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/build/CSSOM.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="11" column="11" selection-start="226" selection-end="226" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/test/helper.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="32" column="0" selection-start="771" selection-end="771" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/test/vendor/qunit.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="42" column="59" selection-start="1027" selection-end="1027" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/test/CSSStyleDeclaration.test.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="12" column="19" selection-start="279" selection-end="279" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/lib/CSSStyleDeclaration.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="105" column="22" selection-start="2425" selection-end="2443" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/test/clone.test.js">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="36" column="14" selection-start="805" selection-end="805" vertical-scroll-proportion="0.0" />
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/docs/parse.html">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="26" column="16" selection-start="713" selection-end="713" vertical-scroll-proportion="-16.0">
+ <folding>
+ <marker date="1292697557000" expanded="true" signature="681:774" placeholder="{...}" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/docs/parse2.html">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="197" column="25" selection-start="3686" selection-end="3686" vertical-scroll-proportion="-0.6666667">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/docs/build.html">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="50" column="28" selection-start="1126" selection-end="1126" vertical-scroll-proportion="0.6090535">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </component>
+</project>
+
View
19 lib/node_modules/cssom/.livereload
@@ -0,0 +1,19 @@
+# Lines starting with pound sign (#) are ignored.
+
+# additional extensions to monitor
+#config.exts << 'haml'
+
+# exclude files with NAMES matching this mask
+#config.exclusions << '~*'
+# exclude files with PATHS matching this mask (if the mask contains a slash)
+#config.exclusions << '/excluded_dir/*'
+# exclude files with PATHS matching this REGEXP
+#config.exclusions << /somedir.*(ab){2,4}.(css|js)$/
+
+# reload the whole page when .js changes
+#config.apply_js_live = false
+# reload the whole page when .css changes
+#config.apply_css_live = false
+
+# wait 100ms for more changes before reloading a page
+#config.grace_period = 0.1
View
37 lib/node_modules/cssom/Jakefile
@@ -0,0 +1,37 @@
+var PATH = require("path");
+var FS = require("fs");
+
+function readFile(path) {
+ var abs_path = PATH.join(__dirname, "lib", path);
+ return FS.readFileSync(abs_path, "utf8");
+}
+
+function stripCommonJS(text) {
+ return text.replace(/\/\/\.CommonJS(?:.|\n)*?\/\/\/CommonJS/g, "");
+}
+
+desc("Packages lib files into the one huge");
+task("default", [], function(){
+ var files = [readFile("CSSOM.js")];
+ var index_file = readFile("index.js");
+
+ (function(){
+ var exports = {};
+ function require(path) {
+ var text = readFile(path + ".js");
+ files.push(stripCommonJS(text).trimLeft());
+ return {};
+ }
+ eval(index_file);
+ })();
+
+ var build_dir = PATH.join(__dirname, "build");
+ try {
+ FS.statSync(build_dir);
+ } catch(e) {
+ FS.mkdirSync(build_dir, 0755);
+ }
+ var build_path = PATH.join(build_dir, "CSSOM.js");
+ FS.writeFileSync(build_path, files.join(""));
+ process.stdout.write("build/CSSOM.js is done\n");
+});
View
33 lib/node_modules/cssom/README.mdown
@@ -0,0 +1,33 @@
+# CSSOM
+
+CSSOM.js is a CSS parser written in pure JavaScript. It also a partial implementation of [CSS Object Model](http://dev.w3.org/csswg/cssom/).
+
+ CSSOM.parse("body {color: black}")
+ -> {
+ cssRules: [
+ {
+ selectorText: "body",
+ style: {
+ 0: "color",
+ color: "black",
+ length: 1
+ }
+ }
+ ]
+ }
+
+
+## [Parser demo](http://nv.github.com/CSSOM/docs/parse.html)
+
+
+## [Tests](http://nv.github.com/CSSOM/test/)
+
+Works well in Google Chrome 6+, Safari 5+, Firefox 3.6+, Opera 10.63+.
+Doesn't work in IE < 9 because of unsupported getters/setters.
+
+## Build
+
+Build one-file version of CSSOM.js with [Jake](http://github.com/mde/node-jake):
+
+ ➤ jake
+ build/CSSOM.js is done
View
23 lib/node_modules/cssom/Rakefile
@@ -0,0 +1,23 @@
+def version
+ git_describe_tags = `git describe --tags`
+ tag = git_describe_tags.split('-').first || git_describe_tags
+ tag.strip!
+ commit = `git rev-list --full-history #{tag}.. -- src/ | wc -l`.strip
+ tag.slice! 0
+ "#{tag}.#{commit}"
+end
+
+task :upload do
+ require 'net/github-upload'
+ gh = Net::GitHub::Upload.new(
+ :login => `git config github.user`.chomp,
+ :token => `git config github.token`.chomp
+ )
+ puts gh.upload(
+ :repos => 'CSSOM',
+ :file => 'build/CSSOM.js',
+ :name => "CSSOM.v#{version}.js",
+ :content_type => 'text/javascript',
+ :description => "CSS Object Model implemented in pure JavaScript"
+ )
+end
View
19 lib/node_modules/cssom/docs/.livereload
@@ -0,0 +1,19 @@
+# Lines starting with pound sign (#) are ignored.
+
+# additional extensions to monitor
+#config.exts << 'haml'
+
+# exclude files with NAMES matching this mask
+#config.exclusions << '~*'
+# exclude files with PATHS matching this mask (if the mask contains a slash)
+#config.exclusions << '/excluded_dir/*'
+# exclude files with PATHS matching this REGEXP
+#config.exclusions << /somedir.*(ab){2,4}.(css|js)$/
+
+# reload the whole page when .js changes
+#config.apply_js_live = false
+# reload the whole page when .css changes
+#config.apply_css_live = false
+
+# wait 100ms for more changes before reloading a page
+#config.grace_period = 0.1
View
3  lib/node_modules/cssom/docs/bar.css
@@ -0,0 +1,3 @@
+body * {
+ color: red !important;
+}
View
0  lib/node_modules/cssom/docs/demo.css
No changes.
View
4 lib/node_modules/cssom/docs/foo.css
@@ -0,0 +1,4 @@
+@import "bar.css" screen;
+body {
+ background: black !important;
+}
View
170 lib/node_modules/cssom/docs/parse.html
@@ -0,0 +1,170 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <title>CSSOM.js parse method</title>
+ <script>
+ var exports = {};
+ function require(){
+ return exports;
+ }
+ </script>
+ <script src="../lib/CSSStyleDeclaration.js"></script>
+ <script src="../lib/CSSRule.js"></script>
+ <script src="../lib/CSSStyleRule.js"></script>
+ <script src="../lib/CSSImportRule.js"></script>
+ <script src="../lib/MediaList.js"></script>
+ <script src="../lib/CSSMediaRule.js"></script>
+ <script src="../lib/StyleSheet.js"></script>
+ <script src="../lib/CSSStyleSheet.js"></script>
+ <script src="../lib/parse.js"></script>
+ <script>
+ window.CSSOM = exports;
+ </script>
+ <style type="text/css">
+ html, body {
+ background: #333;
+ color: #EEE;
+ font: 12px sans-serif;
+ margin: 0;
+ height: 100%;
+ }
+ body {
+ padding-bottom: 1.7em;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ }
+ table {
+ width: 100%;
+ table-layout: fixed;
+ margin: 0 auto;
+ }
+ td {
+ vertical-align: top;
+ }
+ h1 {
+ font: normal 1em sans-serif;
+ display: inline;
+ }
+ #labels {
+ color: #FFE992;
+ width: 66%;
+ }
+ #labels td {
+ width: 50%;
+ text-align: center;
+ }
+ #labels td::before {
+ content: '';
+ color: #998e62;
+ position: relative;
+ top: .4em;
+ }
+ #labels td::after {
+ content: '';
+ color: #998e62;
+ position: relative;
+ top: .4em;
+ }
+ #content {
+ width: 100%;
+ height: 100%;
+ }
+ #content td {
+ width: 33%;
+ }
+ #content td + td {
+ padding-left: 1%;
+ }
+ .style-cell textarea {
+ width: 99%;
+ height: 100%;
+ font: 12px monospace;
+ white-space: pre-wrap;
+ }
+ .serialized-cell {
+ border-left: 1px solid #363636;
+ }
+ #message {
+ visibility: hidden;
+ }
+ .error #message {
+ visibility: visible;
+ position: absolute;
+ top: 0;
+ left: 34%;
+ padding: 1em;
+ background: black;
+ color: #e34343;
+ font-size: 24px;
+ }
+ </style>
+</head>
+<body>
+<table id="labels">
+ <tr><td><h1>CSSOM.parse</h1></td><td>.toString</td></tr>
+</table>
+<table id="content">
+ <tr>
+ <td class="style-cell">
+<textarea id="style" spellcheck="false" rows="40">img {
+ border: none
+}</textarea></td>
+ <td class="output-cell"><pre id="output"></pre></td>
+ <td class="serialized-cell"><pre id="serialized"></pre></td>
+ </tr>
+</table>
+<div id="message"></div>
+<script defer>
+var errors = [];
+if (!("__defineGetter__" in {})) {
+ errors.push("Object.prototype.__defineGetter__ isn’t supported");
+}
+if (errors.length) {
+ document.getElementById("message").innerHTML = errors.join("<br>");
+ document.body.className = "error";
+ throw errors.join("\n\n");
+}
+
+var style = document.getElementById("style");
+var output = document.getElementById("output");
+var serialized = document.getElementById("serialized");
+
+function outputUpdated(){
+ var value = style.value;
+ if (value != style.prevValue) {
+ var css = CSSOM.parse(value);
+ output.innerHTML = JSON.stringify(css, null, 2);
+ serialized.innerHTML = css.toString();
+ style.prevValue = value;
+ }
+}
+
+function hashChanged(){
+ var hash = location.hash;
+ var splitted = hash.split("=");
+ if (splitted.length < 2) {
+ return;
+ }
+ var name = splitted[0];
+ var value = splitted[1];
+ if (name == "#css") {
+ style.value = decodeURIComponent(value);
+ outputUpdated();
+ }
+}
+
+hashChanged();
+outputUpdated();
+
+window.onhashchange = hashChanged;
+style.onkeyup = style.onpaste = function changed(){
+ outputUpdated();
+};
+style.onchange = function updateLocation(){
+ location.hash = "css=" + encodeURIComponent(style.value);
+};
+</script>
+</body>
+</html>
View
431 lib/node_modules/cssom/docs/parse2.html
@@ -0,0 +1,431 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <title>CSSOM.js parse method</title>
+ <script>
+ var exports = {};
+ function require(){
+ return exports;
+ }
+ </script>
+ <script src="../lib/CSSStyleDeclaration.js"></script>
+ <script src="../lib/CSSRule.js"></script>
+ <script src="../lib/CSSStyleRule.js"></script>
+ <script src="../lib/CSSImportRule.js"></script>
+ <script src="../lib/MediaList.js"></script>
+ <script src="../lib/CSSMediaRule.js"></script>
+ <script src="../lib/StyleSheet.js"></script>
+ <script src="../lib/CSSStyleSheet.js"></script>
+ <script src="../lib/parse.js"></script>
+ <script>
+ window.CSSOM = exports;
+ </script>
+ <style>
+ html {
+ padding: 0;
+ }
+ </style>
+ <style type="text/css">
+ html, body {
+ background: #333;
+ color: #EEE;
+ font: 12px sans-serif;
+ margin: 0;
+ height: 100%;
+ }
+ body {
+ padding-bottom: 1.7em;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ }
+ table {
+ width: 100%;
+ table-layout: fixed;
+ margin: 0 auto;
+ }
+ td {
+ vertical-align: top;
+ }
+ h1 {
+ font: normal 1em sans-serif;
+ display: inline;
+ }
+ #labels {
+ color: #FFE992;
+ width: 66%;
+ }
+ #labels td {
+ width: 50%;
+ text-align: center;
+ }
+ #labels td::before {
+ content: '';
+ color: #998e62;
+ position: relative;
+ top: .4em;
+ }
+ #labels td::after {
+ content: '';
+ color: #998e62;
+ position: relative;
+ top: .4em;
+ }
+ #content {
+ width: 100%;
+ height: 100%;
+ }
+ #content td {
+ width: 33%;
+ }
+ #content td + td {
+ padding-left: 1%;
+ }
+ .style-cell textarea {
+ width: 99%;
+ height: 100%;
+ font: 12px monospace;
+ white-space: pre-wrap;
+ }
+ .serialized-cell {
+ border-left: 1px solid #363636;
+ }
+ #message {
+ visibility: hidden;
+ }
+ .error #message {
+ visibility: visible;
+ position: absolute;
+ top: 0;
+ left: 34%;
+ padding: 1em;
+ background: black;
+ color: #e34343;
+ font-size: 24px;
+ }
+ </style>
+</head>
+<body>
+<table id="labels">
+ <tr><td><h1>CSSOM.parse</h1></td><td>.toString</td></tr>
+</table>
+<table id="content">
+ <tr>
+ <td class="style-cell">
+<textarea id="style" spellcheck="false" rows="40">img {
+ border: none
+}</textarea></td>
+ <td class="output-cell"><pre id="output"></pre></td>
+ <td class="serialized-cell"><pre id="serialized"></pre></td>
+ </tr>
+</table>
+<div id="message"></div>
+<script defer>
+console.dir(document.styleSheets[0].cssRules[0].style);
+//console.log(document.styleSheets[0].cssRules[0].style["table-layout"]);
+var CSS = {
+ background: [
+ "background-image",
+ "background-repeat",
+ "background-attachment",
+ "background-position",
+ "background-origin",
+ "background-clip",
+ "background-color"
+ ],
+ "background-repeat": [
+ "background-repeat-x",
+ "background-repeat-y"
+ ],
+ "background-position": [
+ "background-position-x",
+ "background-position-y"
+ ],
+ border: [
+ "border-top",
+ "border-right",
+ "border-bottom",
+ "border-left",
+ "border-width",
+ "border-style",
+ "border-color"
+ ],
+ "border-top": [
+ "border-top-width",
+ "border-top-style",
+ "border-top-color"
+ ],
+ "border-right": [
+ "border-right-width",
+ "border-right-style",
+ "border-right-color"
+ ],
+ "border-bottom": [
+ "border-bottom-width",
+ "border-bottom-style",
+ "border-bottom-color"
+ ],
+ "border-left": [
+ "border-left-width",
+ "border-left-style",
+ "border-left-color"
+ ],
+ font: [
+ "font-style",
+ "font-variant",
+ "font-weight",
+ "font-size",
+ "font-size-adjust",
+ "font-stretch",
+ "line-height",
+ "font-family"
+ ],
+ "list-style": [
+ "list-style-type",
+ "list-style-position",
+ "list-style-image"
+ ],
+ margin: [
+ "margin-top",
+ "margin-right",
+ "margin-bottom",
+ "margin-left"
+ ],
+ padding: [
+ "padding-top",
+ "padding-right",
+ "padding-bottom",
+ "padding-left"
+ ]
+};
+
+function camelize(string) {
+ return string.replace(/-+(.)?/g, function(match, chr) {
+ return chr ? chr.toUpperCase() : '';
+ });
+}
+
+CSS["background-repeat"].shorthand = function(style) {
+ if (style["background-repeat-x"] == style["background-repeat-y"]) {
+ return style["background-repeat-x"];
+ } else {
+ return style["background-repeat-x"] + " " + style["background-repeat-y"];
+ }
+};
+
+CSS["background-position"].shorthand = function(style) {
+ if (style["background-position-x"] == style["background-position-y"]) {
+ return style["background-position-x"];
+ } else {
+ return style["background-position-x"] + " " + style["background-position-y"];
+ }
+};
+
+CSS.background.shorthand = function(style) {
+ var values = [];
+
+ //FIXME
+ // Support CSS3 background shorthand
+ // http://www.w3.org/TR/css3-background/#the-background
+
+ var backgroundColor = style["background-color"];
+ if (backgroundColor != "initial" && backgroundColor != "transparent") {
+ values.push(backgroundColor);
+ }
+
+ var backgroundImage = style["background-image"];
+ if (backgroundImage != "initial" && backgroundImage != "none") {
+ values.push(backgroundImage);
+ }
+
+ var backgroundRepeat = style["background-repeat"];
+ if (backgroundRepeat != "initial" && backgroundRepeat != "repeat") {
+ values.push(backgroundRepeat);
+ }
+
+ var backgroundAttachment = style["background-attachment"];
+ if (backgroundAttachment != "initial" && backgroundAttachment != "scroll") {
+ values.push(backgroundAttachment);
+ }
+
+ var backgroundPosition = style["background-position"];
+ if (backgroundPosition != "initial" && parseInt(backgroundPosition) !== 0) {
+ values.push(backgroundPosition);
+ }
+
+ return values.join(" ") || "";
+};
+
+
+(function(){
+ for (var key in CSS) {
+ var longhand = CSS[key];
+ if (!longhand.length) {
+ continue;
+ }
+ for (var i=0, ii=longhand.length; i<ii; i++) {
+ var siblings = longhand.slice(0);
+ siblings.splice(i, 1);
+ if (CSS[longhand[i]]) {
+ //console.log("array", CSS[longhand[i]]);
+ } else {
+ CSS[longhand[i]] = {}
+ }
+ CSS[longhand[i]].parent = key;
+ CSS[longhand[i]].siblings = siblings;
+ }
+ }
+})();
+
+
+function cloneMinimized(stylesheet) {
+ var cloned = new CSSOM.CSSStyleSheet;
+
+ var rules = stylesheet.cssRules;
+ if (!rules) {
+ return cloned;
+ }
+
+ var RULE_TYPES = {
+ 1: CSSOM.CSSStyleRule,
+ 4: CSSOM.CSSMediaRule
+ //FIXME
+ //3: CSSOM.CSSImportRule,
+ //5: CSSOM.CSSFontFaceRule,
+ //6: CSSOM.CSSPageRule,
+ };
+
+ for (var i=0, rulesLength=rules.length; i < rulesLength; i++) {
+ var rule = rules[i];
+ var ruleClone = cloned.cssRules[i] = new RULE_TYPES[rule.type];
+
+ var style = rule.style;
+ if (style) {
+ var styleClone = ruleClone.style = minimizeStyle(style);
+ }
+
+ if ("selectorText" in rule) {
+ ruleClone.selectorText = rule.selectorText;
+ }
+
+ if ("mediaText" in rule) {
+ ruleClone.mediaText = rule.mediaText;
+ }
+
+ if ("cssRules" in rule) {
+ rule.cssRules = clone(rule).cssRules;
+ }
+ }
+
+ return cloned;
+
+};
+
+function minimizeStyle(style) {
+ var result = new CSSOM.CSSStyleDeclaration;
+ for (var i=0; i<style.length; i++) {
+ var name = closestShorthand(style, style[i]);
+ if (!(name in result)) {
+ result[name] = style[camelize(name)];
+ result[result.length++] = name;
+ }
+ }
+ return result;
+}
+
+function closestShorthand(style, name) {
+ if (!(name in CSS)) {
+ return name;
+ }
+ var siblings = CSS[name].siblings;
+ if (!siblings || !siblings.length) {
+ return name;
+ }
+ var properties = {};
+ var allPresent = true;
+ for (var j=0; j<siblings.length; j++) {
+ var sibling = siblings[j];
+ var aSibling = camelize(sibling);
+ if (style[aSibling] === "") {
+ console.warn(sibling);
+ if (CSS[sibling].length) {
+ for (var i=0; i<CSS[sibling].length; i++) {
+ if (style[camelize(CSS[sibling][i])] === "") {
+ allPresent = false;
+ break;
+ }
+ }
+ } else {
+ allPresent = false;
+ break;
+ }
+ }
+ }
+ if (allPresent) {
+ return closestShorthand(style, CSS[name].parent);
+ } else {
+ return name;
+ }
+
+}
+
+console.log(cloneMinimized(document.styleSheets[0]).toString());
+//console.log(CSSOM.CSSStyleSheet.prototype.toString.call(minimize(document.styleSheets[0].cssRules[0].style)));
+//console.log(document.styleSheets[0].cssRules[0].style["background-image"]);
+
+//console.log(CSS);
+
+
+
+var errors = [];
+//if (!Object.defineProperty) {
+// errors.push("Object.defineProperty isn’t supported");
+//}
+if (errors.length) {
+ document.getElementById("message").innerHTML = errors.join("<br>");
+ document.body.className = "error";
+ throw errors.join("\n\n");
+}
+
+var style = document.getElementById("style");
+var output = document.getElementById("output");
+var serialized = document.getElementById("serialized");
+
+function outputUpdated(){
+ var value = style.value;
+ if (value != style.prevValue) {
+ var css = CSSOM.parse(value);
+ output.innerHTML = JSON.stringify(css, null, 2);
+ serialized.innerHTML = css.toString();
+ style.prevValue = value;
+ }
+}
+
+function hashChanged(){
+ var hash = location.hash;
+ var splitted = hash.split("=");
+ if (splitted.length < 2) {
+ return;
+ }
+ var name = splitted[0];
+ var value = splitted[1];
+ if (name == "#css") {
+ style.value = decodeURIComponent(value);
+ outputUpdated();
+ }
+}
+
+hashChanged();
+outputUpdated();
+
+window.onhashchange = hashChanged;
+style.onkeyup = style.onpaste = function changed(){
+ outputUpdated();
+};
+style.onchange = function updateLocation(){
+ location.hash = "css=" + encodeURIComponent(style.value);
+};
+</script>
+</body>
+</html>
View
100 lib/node_modules/cssom/index.html
@@ -0,0 +1,100 @@
+<!DOCTYPE html>
+<style type="text/css">
+html, body {
+ background: #CCC;
+ font-size: 14px;
+ margin: 0;
+ height: 100%;
+}
+table {
+ width: 100%;
+ border-collapse: collapse;
+}
+td {
+ width: 50%;
+ padding: 0;
+ vertical-align: top;
+}
+#output, #style {
+ width: 49%;
+ min-height: 99%;
+ display: inline-block;
+ vertical-align: top;
+}
+#style {
+ position: absolute;
+ top: 0;
+ height: 100%;
+ left: 4px;
+ width: 49%;
+ background: #FFF;
+ border: 1px solid #999;
+ font: 14px monospace;
+ white-space: pre-wrap;
+}
+#output {
+ position: absolute;
+ top: 0;
+ min-height: 100%;
+ right: 0;
+ width: 50%;
+ margin: 0;
+ padding: 4px;
+ box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ background: #333;
+}
+
+.rule {
+ color: #8CB7D1;
+}
+.name {
+ color: #D7AA69;
+}
+.value {
+ color: #D7AA69;
+}
+.brace-open, .brace-close, .colon, .semicolon {
+ color: #625035;
+}
+/*@import url("test/fixtures/dummy.css") screen, handheld;*/
+@media screen, all {
+ body {
+ color: black;
+ }
+}
+</style>
+
+<textarea id="style">.rule {
+ display: block;
+}
+.properties {
+ display: block;
+}</textarea>
+<pre id="output"></pre>
+
+
+<script type="text/javascript" src="lib/StyleSheet.js"></script>
+<script type="text/javascript" src="lib/CSSStyleSheet.js"></script>
+<script type="text/javascript" src="lib/MediaList.js"></script>
+<script type="text/javascript" src="lib/CSSRule.js"></script>
+<script type="text/javascript" src="lib/CSSStyleRule.js"></script>
+<script type="text/javascript" src="lib/CSSMediaRule.js"></script>
+<script type="text/javascript" src="lib/CSSStyleDeclaration.js"></script>
+<script type="text/javascript" src="lib/parse.js"></script>
+<script type="text/javascript" src="lib/parse.js"></script>
+<script type="text/javascript" src="plugins/toHTML.js"></script>
+<script type="text/javascript">
+CSSStyleSheet.prototype.toHTML = toHTML;
+window.onload = function(){
+ var style = document.getElementById("style");
+ var output = document.getElementById("output")
+
+ function outputUpdated(){
+ output.innerHTML = parse(style.value).toHTML();
+ }
+
+ style.onkeyup = outputUpdated;
+ outputUpdated();
+}
+</script>
View
34 lib/node_modules/cssom/lib/CSSImportRule.js
@@ -0,0 +1,34 @@
+//.CommonJS
+var CSSOM = {
+ CSSRule: require("./CSSRule").CSSRule,
+ CSSStyleSheet: require("./CSSStyleSheet").CSSStyleSheet,
+ MediaList: require("./MediaList").MediaList
+};
+///CommonJS
+
+
+/**
+ * @constructor
+ * @see http://dev.w3.org/csswg/cssom/#cssimportrule
+ * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSImportRule
+ */
+CSSOM.CSSImportRule = function CSSImportRule() {
+ this.href = "";
+ this.media = new CSSOM.MediaList;
+ this.styleSheet = new CSSOM.CSSStyleSheet;
+};
+
+CSSOM.CSSImportRule.prototype = new CSSOM.CSSRule;
+CSSOM.CSSImportRule.prototype.constructor = CSSOM.CSSImportRule;
+CSSOM.CSSImportRule.prototype.type = 3;
+CSSOM.CSSImportRule.prototype.__defineGetter__("cssText", function() {
+ return "@import url("+ this.href +") "+ this.media.mediaText +";"
+});
+CSSOM.CSSImportRule.prototype.__defineSetter__("cssText", function() {
+ return "@import url("+ this.href +") "+ this.media.mediaText +";"
+});
+
+
+//.CommonJS
+exports.CSSImportRule = CSSOM.CSSImportRule;
+///CommonJS
View
38 lib/node_modules/cssom/lib/CSSMediaRule.js
@@ -0,0 +1,38 @@
+//.CommonJS
+var CSSOM = {
+ CSSRule: require("./CSSRule").CSSRule,
+ MediaList: require("./MediaList").MediaList
+};
+///CommonJS
+
+
+/**
+ * @constructor
+ * @see http://dev.w3.org/csswg/cssom/#cssmediarule
+ * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSMediaRule
+ */
+CSSOM.CSSMediaRule = function CSSMediaRule() {
+ this.media = new CSSOM.MediaList;
+ this.cssRules = [];
+};
+
+CSSOM.CSSMediaRule.prototype = new CSSOM.CSSRule;
+CSSOM.CSSMediaRule.prototype.constructor = CSSOM.CSSMediaRule;
+CSSOM.CSSMediaRule.prototype.type = 4;
+//FIXME
+//CSSOM.CSSMediaRule.prototype.insertRule = CSSStyleSheet.prototype.insertRule;
+//CSSOM.CSSMediaRule.prototype.deleteRule = CSSStyleSheet.prototype.deleteRule;
+
+// http://opensource.apple.com/source/WebCore/WebCore-658.28/css/CSSMediaRule.cpp
+CSSOM.CSSMediaRule.prototype.__defineGetter__("cssText", function() {
+ var cssTexts = [];
+ for (var i=0, length=this.cssRules.length; i < length; i++) {
+ cssTexts.push(this.cssRules[i].cssText);
+ }
+ return "@media " + this.media.mediaText + " {" + cssTexts.join("") + "}"
+});
+
+
+//.CommonJS
+exports.CSSMediaRule = CSSOM.CSSMediaRule;
+///CommonJS
View
3  lib/node_modules/cssom/lib/CSSOM.js
@@ -0,0 +1,3 @@
+var CSSOM = {};
+
+
View
38 lib/node_modules/cssom/lib/CSSRule.js
@@ -0,0 +1,38 @@
+//.CommonJS
+var CSSOM = {};
+///CommonJS
+
+
+/**
+ * @constructor
+ * @see http://dev.w3.org/csswg/cssom/#the-cssrule-interface
+ * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule
+ */
+CSSOM.CSSRule = function CSSRule() {
+ this.parentRule = null;
+};
+
+CSSOM.CSSRule.STYLE_RULE = 1;
+CSSOM.CSSRule.IMPORT_RULE = 3;
+CSSOM.CSSRule.MEDIA_RULE = 4;
+CSSOM.CSSRule.FONT_FACE_RULE = 5;
+CSSOM.CSSRule.PAGE_RULE = 6;
+CSSOM.CSSRule.WEBKIT_KEYFRAMES_RULE = 8;
+CSSOM.CSSRule.WEBKIT_KEYFRAME_RULE = 9;
+
+// Obsolete in CSSOM http://dev.w3.org/csswg/cssom/
+//CSSOM.CSSRule.UNKNOWN_RULE = 0;
+//CSSOM.CSSRule.CHARSET_RULE = 2;
+
+// Never implemented
+//CSSOM.CSSRule.VARIABLES_RULE = 7;
+
+CSSOM.CSSRule.prototype = {
+ constructor: CSSOM.CSSRule
+ //FIXME
+};
+
+
+//.CommonJS
+exports.CSSRule = CSSOM.CSSRule;
+///CommonJS
View
130 lib/node_modules/cssom/lib/CSSStyleDeclaration.js
@@ -0,0 +1,130 @@
+//.CommonJS
+var CSSOM = {};
+///CommonJS
+
+
+/**
+ * @constructor
+ * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration
+ */
+CSSOM.CSSStyleDeclaration = function CSSStyleDeclaration(){
+ this.length = 0;
+
+ // NON-STANDARD
+ this._importants = {};
+};
+
+
+CSSOM.CSSStyleDeclaration.prototype = {
+
+ constructor: CSSOM.CSSStyleDeclaration,
+
+ /**
+ *
+ * @param {string} name
+ * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-getPropertyValue
+ * @return {string} the value of the property if it has been explicitly set for this declaration block.
+ * Returns the empty string if the property has not been set.
+ */
+ getPropertyValue: function(name) {
+ return this[name] || ""
+ },
+
+ /**
+ *
+ * @param {string} name
+ * @param {string} value
+ * @param {string} [priority=null] "important" or null
+ * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-setProperty
+ */
+ setProperty: function(name, value, priority) {
+ if (this[name]) {
+ // Property already exist. Overwrite it.
+ var index = Array.prototype.indexOf.call(this, name);
+ if (index < 0) {
+ this[this.length] = name;
+ this.length++;
+ }
+ } else {
+ // New property.
+ this[this.length] = name;
+ this.length++;
+ }
+ this[name] = value;
+ this._importants[name] = priority;
+ },
+
+ /**
+ *
+ * @param {string} name
+ * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration-removeProperty
+ * @return {string} the value of the property if it has been explicitly set for this declaration block.
+ * Returns the empty string if the property has not been set or the property name does not correspond to a known CSS property.
+ */
+ removeProperty: function(name) {
+ if (!(name in this)) {
+ return ""
+ }
+ var index = Array.prototype.indexOf.call(this, name);
+ if (index < 0) {
+ return ""
+ }
+ var prevValue = this[name];
+ this[name] = "";
+
+ // That's what WebKit and Opera do
+ Array.prototype.splice.call(this, index, 1);
+
+ // That's what Firefox does
+ //this[index] = ""
+
+ return prevValue
+ },
+
+ getPropertyCSSValue: function() {
+ //FIXME
+ },
+
+ /**
+ *
+ * @param {String} name
+ */
+ getPropertyPriority: function(name) {
+ return this._importants[name] || "";
+ },
+
+
+ /**
+ * element.style.overflow = "auto"
+ * element.style.getPropertyShorthand("overflow-x")
+ * -> "overflow"
+ */
+ getPropertyShorthand: function() {
+ //FIXME
+ },
+
+ isPropertyImplicit: function() {
+ //FIXME
+ },
+
+ // Doesn't work in IE < 9
+ get cssText(){
+ var properties = [];
+ for (var i=0, length=this.length; i < length; ++i) {
+ var name = this[i];
+ var value = this.getPropertyValue(name);
+ var priority = this.getPropertyPriority(name);
+ if (priority) {
+ priority = " !" + priority;
+ }
+ properties[i] = name + ": " + value + priority + ";";
+ }
+ return properties.join(" ")
+ }
+
+};
+
+
+//.CommonJS
+exports.CSSStyleDeclaration = CSSOM.CSSStyleDeclaration;
+///CommonJS
View
187 lib/node_modules/cssom/lib/CSSStyleRule.js
@@ -0,0 +1,187 @@
+//.CommonJS
+var CSSOM = {
+ CSSStyleDeclaration: require("./CSSStyleDeclaration").CSSStyleDeclaration,
+ CSSRule: require("./CSSRule").CSSRule
+};
+///CommonJS
+
+
+/**
+ * @constructor
+ * @see http://dev.w3.org/csswg/cssom/#cssstylerule
+ * @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleRule
+ */
+CSSOM.CSSStyleRule = function CSSStyleRule() {
+ this.selectorText = "";
+ this.style = new CSSOM.CSSStyleDeclaration;
+};
+
+CSSOM.CSSStyleRule.prototype = new CSSOM.CSSRule;
+CSSOM.CSSStyleRule.prototype.constructor = CSSOM.CSSStyleRule;
+CSSOM.CSSStyleRule.prototype.type = 1;
+
+CSSOM.CSSStyleRule.prototype.__defineGetter__("cssText", function() {
+ var text;
+ if (this.selectorText) {
+ text = this.selectorText + " {" + this.style.cssText + "}";
+ } else {
+ text = "";
+ }
+ return text;
+});
+
+CSSOM.CSSStyleRule.prototype.__defineSetter__("cssText", function(cssText) {
+ var rule = CSSOM.CSSStyleRule.parse(cssText);
+ this.style = rule.style;
+ this.selectorText = rule.selectorText;
+});
+
+
+/**
+ * NON-STANDARD
+ * lightweight version of parse.js.
+ * @param {string} ruleText
+ * @return CSSStyleRule
+ */
+CSSOM.CSSStyleRule.parse = function(ruleText) {
+ var i = 0;
+ var state = "selector";
+ var index;
+ var j = i;
+ var buffer = "";
+
+ var SIGNIFICANT_WHITESPACE = {
+ "selector": true,
+ "value": true
+ };
+
+ var styleRule = new CSSOM.CSSStyleRule;
+ var selector, name, value, priority="";
+
+ for (var character; character = ruleText.charAt(i); i++) {
+
+ switch (character) {
+
+ case " ":
+ case "\t":
+ case "\r":
+ case "\n":
+ case "\f":
+ if (SIGNIFICANT_WHITESPACE[state]) {
+ // Squash 2 or more white-spaces in the row into 1
+ switch (ruleText.charAt(i - 1)) {
+ case " ":
+ case "\t":
+ case "\r":
+ case "\n":
+ case "\f":
+ break;
+ default:
+ buffer += " ";
+ break;
+ }
+ }
+ break;
+
+ // String
+ case '"':
+ j = i + 1;
+ index = ruleText.indexOf('"', j) + 1;
+ if (!index) {
+ throw '" is missing';
+ }
+ buffer += ruleText.slice(i, index);
+ i = index - 1;
+ break;
+
+ case "'":
+ j = i + 1;
+ index = ruleText.indexOf("'", j) + 1;
+ if (!index) {
+ throw "' is missing";
+ }
+ buffer += ruleText.slice(i, index);
+ i = index - 1;
+ break;
+
+ // Comment
+ case "/":
+ if (ruleText.charAt(i + 1) == "*") {
+ i += 2;
+ index = ruleText.indexOf("*/", i);
+ if (index == -1) {
+ throw SyntaxError("Missing */");
+ } else {
+ i = index + 1;
+ }
+ } else {
+ buffer += character;
+ }
+ break;
+
+ case "{":
+ if (state == "selector") {
+ styleRule.selectorText = buffer.trim();
+ buffer = "";
+ state = "name";
+ }
+ break;
+
+ case ":":
+ if (state == "name") {
+ name = buffer.trim();
+ buffer = "";
+ state = "value";
+ } else {
+ buffer += character;
+ }
+ break;
+
+ case "!":
+ if (state == "value" && ruleText.indexOf("!important", i) === i) {
+ priority = "important";
+ i += "important".length;
+ } else {
+ buffer += character;
+ }
+ break;
+
+ case ";":
+ if (state == "value") {
+ styleRule.style.setProperty(name, buffer.trim(), priority);
+ priority = "";