elabs 4.0.0 → 5.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitlab-ci.yml +9 -0
- data/.node-version +1 -1
- data/.rubocop.yml +4 -0
- data/.stylelintrc.yml +12 -2
- data/CHANGELOG.md +81 -12
- data/Gemfile +1 -1
- data/Gemfile.lock +96 -94
- data/README.md +2 -0
- data/ROADMAP.md +4 -2
- data/app/assets/config/elabs_manifest.js +2 -1
- data/app/assets/fonts/elabs/FontAwesome/fa-brands-400.eot +0 -0
- data/app/assets/fonts/elabs/FontAwesome/fa-brands-400.svg +1148 -0
- data/app/assets/fonts/elabs/FontAwesome/fa-brands-400.ttf +0 -0
- data/app/assets/fonts/elabs/FontAwesome/fa-brands-400.woff +0 -0
- data/app/assets/fonts/elabs/FontAwesome/fa-brands-400.woff2 +0 -0
- data/app/assets/fonts/elabs/FontAwesome/fa-regular-400.eot +0 -0
- data/app/assets/fonts/elabs/FontAwesome/fa-regular-400.svg +467 -0
- data/app/assets/fonts/elabs/FontAwesome/fa-regular-400.ttf +0 -0
- data/app/assets/fonts/elabs/FontAwesome/fa-regular-400.woff +0 -0
- data/app/assets/fonts/elabs/FontAwesome/fa-regular-400.woff2 +0 -0
- data/app/assets/fonts/elabs/FontAwesome/fa-solid-900.eot +0 -0
- data/app/assets/fonts/elabs/FontAwesome/fa-solid-900.svg +2231 -0
- data/app/assets/fonts/elabs/FontAwesome/fa-solid-900.ttf +0 -0
- data/app/assets/fonts/elabs/FontAwesome/fa-solid-900.woff +0 -0
- data/app/assets/fonts/elabs/FontAwesome/fa-solid-900.woff2 +0 -0
- data/app/assets/fonts/elabs/OpenSans/Apache License.txt +201 -0
- data/app/assets/fonts/elabs/OpenSans/OpenSans-Bold.ttf +0 -0
- data/app/assets/fonts/elabs/OpenSans/OpenSans-Light.ttf +0 -0
- data/app/assets/fonts/elabs/OpenSans/OpenSans-Regular.ttf +0 -0
- data/app/assets/fonts/elabs/OpenSans/OpenSans-Semibold.ttf +0 -0
- data/app/assets/fonts/elabs/license-icons/license-icons.eot +0 -0
- data/app/assets/fonts/elabs/license-icons/license-icons.svg +51 -0
- data/app/assets/fonts/elabs/license-icons/license-icons.ttf +0 -0
- data/app/assets/fonts/elabs/license-icons/license-icons.woff +0 -0
- data/app/assets/fonts/elabs/license-icons/license-icons.woff2 +0 -0
- data/app/assets/images/elabs/preview_placeholder.png +0 -0
- data/app/assets/images/elabs/preview_placeholder_nsfw.png +0 -0
- data/app/assets/javascripts/elabs/announcements.js +33 -0
- data/app/assets/javascripts/elabs/application.js.erb +17 -14
- data/app/assets/javascripts/elabs/forms.js +0 -1
- data/app/assets/javascripts/elabs/helpers-markdown.js +2 -2
- data/app/assets/javascripts/elabs/helpers.js +17 -0
- data/app/assets/javascripts/elabs/menu.js +5 -0
- data/app/assets/stylesheets/elabs/_fonts.scss +32 -0
- data/app/assets/stylesheets/elabs/_variables.scss +286 -5
- data/app/assets/stylesheets/elabs/app/components/_act.scss +83 -0
- data/app/assets/stylesheets/elabs/app/components/_announcement.scss +41 -0
- data/app/assets/stylesheets/elabs/app/components/_classifier_types.scss +43 -0
- data/app/assets/stylesheets/elabs/app/components/_comment.scss +29 -0
- data/app/assets/stylesheets/elabs/app/components/_content_relations.scss +53 -0
- data/app/assets/stylesheets/elabs/app/components/_content_statuses.scss +39 -0
- data/app/assets/stylesheets/elabs/app/components/_content_types.scss +41 -0
- data/app/assets/stylesheets/elabs/app/components/_git_cards.scss +122 -0
- data/app/assets/stylesheets/elabs/app/elements/_alerts.scss +3 -0
- data/app/assets/stylesheets/elabs/app/elements/_badges.scss +17 -0
- data/app/assets/stylesheets/elabs/app/elements/_buttons.scss +34 -0
- data/app/assets/stylesheets/elabs/app/elements/_dropdowns.scss +78 -0
- data/app/assets/stylesheets/elabs/app/elements/_empty.scss +31 -0
- data/app/assets/stylesheets/elabs/app/elements/_errors.scss +15 -0
- data/app/assets/stylesheets/elabs/app/elements/_filter_link.scss +23 -0
- data/app/assets/stylesheets/elabs/app/elements/_fixed_links.scss +19 -0
- data/app/assets/stylesheets/elabs/app/elements/_forms.scss +123 -0
- data/app/assets/stylesheets/elabs/app/elements/_icons.scss +74 -0
- data/app/assets/stylesheets/elabs/app/{_medias.scss → elements/_medias.scss} +2 -0
- data/app/assets/stylesheets/elabs/app/{_modals.scss → elements/_modals.scss} +8 -4
- data/app/assets/stylesheets/elabs/app/elements/_nsfw.scss +41 -0
- data/app/assets/stylesheets/elabs/app/{_pagination.scss → elements/_pagination.scss} +0 -0
- data/app/assets/stylesheets/elabs/app/{_tables.scss → elements/_tables.scss} +2 -2
- data/app/assets/stylesheets/elabs/app/elements/_tabs.scss +73 -0
- data/app/assets/stylesheets/elabs/app/helpers/_cards.scss +80 -0
- data/app/assets/stylesheets/elabs/app/helpers/_containers.scss +7 -0
- data/app/assets/stylesheets/elabs/app/helpers/_states.scss +3 -0
- data/app/assets/stylesheets/elabs/app/{_helpers.scss → helpers/_typo.scss} +6 -4
- data/app/assets/stylesheets/elabs/app/layouts/_acts.scss +25 -0
- data/app/assets/stylesheets/elabs/app/layouts/_classifiers.scss +32 -0
- data/app/assets/stylesheets/elabs/app/{_comments.scss → layouts/_comments.scss} +0 -2
- data/app/assets/stylesheets/elabs/app/layouts/_devise.scss +65 -0
- data/app/assets/stylesheets/elabs/app/layouts/_layout.scss +40 -0
- data/app/assets/stylesheets/elabs/app/layouts/_page.scss +14 -0
- data/app/assets/stylesheets/elabs/app/layouts/_page_content.scss +13 -0
- data/app/assets/stylesheets/elabs/app/layouts/_page_footer.scss +20 -0
- data/app/assets/stylesheets/elabs/app/layouts/_page_header.scss +146 -0
- data/app/assets/stylesheets/elabs/app/layouts/_page_menu.scss +232 -0
- data/app/assets/stylesheets/elabs/app/layouts/_page_messages.scss +4 -0
- data/app/assets/stylesheets/elabs/app/layouts/_private_layout.scss +78 -0
- data/app/assets/stylesheets/elabs/app/{_typo.scss → layouts/_typo.scss} +3 -0
- data/app/assets/stylesheets/elabs/app/mixins/_classifier_card.scss +43 -0
- data/app/assets/stylesheets/elabs/app/mixins/_content_card.scss +103 -0
- data/app/assets/stylesheets/elabs/app/mixins/_content_full.scss +158 -0
- data/app/assets/stylesheets/elabs/app/mixins/{_content-inline.scss → _content_inline.scss} +0 -0
- data/app/assets/stylesheets/elabs/lib/_codemirror.scss +2 -2
- data/app/assets/stylesheets/elabs/{_colors.scss → lib/_colors_reference.scss} +0 -52
- data/app/assets/stylesheets/elabs/lib/_license_icons.scss +121 -0
- data/app/assets/stylesheets/elabs/lib/fontawesome/_fontawesome.scss +1 -1
- data/app/assets/stylesheets/elabs/lib/fontawesome/_fonts.scss +18 -18
- data/app/assets/stylesheets/elabs/lib/knacss/_knacss.scss +1 -1
- data/app/assets/stylesheets/elabs/lib/knacss/_knacss_variables.scss +227 -0
- data/app/assets/stylesheets/elabs/style.scss +62 -57
- data/app/controllers/elabs/admin/admin_application_controller.rb +1 -1
- data/app/controllers/elabs/admin/announcements_controller.rb +71 -0
- data/app/controllers/elabs/concerns/elabs_controller.rb +3 -0
- data/app/controllers/elabs/content_application_controller.rb +4 -0
- data/app/controllers/elabs/elabs_public_controller.rb +15 -0
- data/app/controllers/elabs/languages_controller.rb +1 -5
- data/app/controllers/elabs/member/comments_controller.rb +42 -0
- data/app/controllers/elabs/member/member_application_controller.rb +1 -1
- data/app/controllers/elabs/reports_controller.rb +2 -0
- data/app/helpers/elabs/acts_helper.rb +7 -2
- data/app/helpers/elabs/application_helper.rb +8 -50
- data/app/helpers/elabs/content_filters_helper.rb +17 -24
- data/app/helpers/elabs/content_helper.rb +8 -35
- data/app/helpers/elabs/content_renderer_helper.rb +4 -112
- data/app/helpers/elabs/form_helper.rb +11 -11
- data/app/helpers/elabs/icons_helper.rb +63 -0
- data/app/helpers/elabs/{admin_content_helper.rb → links_admin_helper.rb} +1 -1
- data/app/helpers/elabs/links_helper.rb +58 -0
- data/app/helpers/elabs/{member_content_helper.rb → links_member_helper.rb} +2 -2
- data/app/helpers/elabs/notification_helper.rb +17 -3
- data/app/helpers/elabs/shortcodes_helper.rb +108 -0
- data/app/helpers/elabs/thumbnails_helper.rb +1 -1
- data/app/models/elabs/album.rb +14 -0
- data/app/models/elabs/announcement.rb +33 -0
- data/app/models/elabs/article.rb +14 -0
- data/app/models/elabs/comment.rb +10 -4
- data/app/models/elabs/note.rb +14 -0
- data/app/models/elabs/project.rb +12 -0
- data/app/models/elabs/report.rb +1 -0
- data/app/models/elabs/upload.rb +16 -0
- data/app/models/elabs/user.rb +2 -1
- data/app/views/elabs/acts/_filters.html.haml +3 -2
- data/app/views/elabs/acts/index.html.haml +2 -13
- data/app/views/elabs/admin/announcements/_announcement.json.jbuilder +10 -0
- data/app/views/elabs/admin/announcements/_form.html.haml +52 -0
- data/app/views/elabs/admin/announcements/edit.html.haml +3 -0
- data/app/views/elabs/admin/announcements/index.html.haml +28 -0
- data/app/views/elabs/admin/announcements/index.json.jbuilder +1 -0
- data/app/views/elabs/admin/announcements/new.html.haml +3 -0
- data/app/views/elabs/admin/licenses/index.html.haml +2 -2
- data/app/views/elabs/admin/uploads/_upload.json.jbuilder +3 -3
- data/app/views/elabs/albums/_card_content.html.haml +8 -0
- data/app/views/elabs/albums/_filters.html.haml +5 -3
- data/app/views/elabs/albums/index.html.haml +1 -1
- data/app/views/elabs/albums/show.html.haml +38 -29
- data/app/views/elabs/articles/_filters.html.haml +5 -3
- data/app/views/elabs/articles/index.html.haml +1 -1
- data/app/views/elabs/articles/show.html.haml +33 -25
- data/app/views/elabs/auth/confirmations/new.html.haml +1 -1
- data/app/views/elabs/auth/passwords/edit.html.haml +1 -1
- data/app/views/elabs/auth/passwords/new.html.haml +1 -1
- data/app/views/elabs/auth/registrations/new.html.haml +7 -2
- data/app/views/elabs/auth/sessions/_new.html.haml +1 -1
- data/app/views/elabs/auth/unlocks/new.html.haml +1 -1
- data/app/views/elabs/comments/_comments.html.haml +29 -20
- data/app/views/elabs/comments/_form.html.haml +40 -36
- data/app/views/elabs/languages/_filters.html.haml +3 -5
- data/app/views/elabs/languages/index.html.haml +12 -13
- data/app/views/elabs/languages/show.html.haml +36 -31
- data/app/views/elabs/layouts/_announcements.html.haml +9 -0
- data/app/views/elabs/layouts/_content_associations.html.haml +89 -0
- data/app/views/elabs/layouts/_content_card.html.haml +41 -0
- data/app/views/elabs/layouts/_flash_messages.html.haml +4 -0
- data/app/views/elabs/layouts/_footer.html.haml +18 -10
- data/app/views/elabs/layouts/_form_honeypot.html.haml +12 -0
- data/app/views/elabs/layouts/_hidden_entry.html.haml +1 -1
- data/app/views/elabs/layouts/_hidden_entry_full.html.haml +4 -2
- data/app/views/elabs/layouts/_hidden_entry_inline.html.haml +1 -1
- data/app/views/elabs/layouts/_language_menu.html.haml +2 -2
- data/app/views/elabs/layouts/_menu.html.haml +58 -75
- data/app/views/elabs/layouts/_menu_admin.html.haml +40 -0
- data/app/views/elabs/layouts/_menu_member.html.haml +57 -0
- data/app/views/elabs/layouts/application.html.haml +24 -13
- data/app/views/elabs/layouts/application_admin.html.haml +33 -0
- data/app/views/elabs/layouts/application_member.html.haml +36 -0
- data/app/views/elabs/layouts/{lists → content_classifiers_lists}/_albums.html.haml +0 -0
- data/app/views/elabs/layouts/{lists → content_classifiers_lists}/_projects.html.haml +0 -0
- data/app/views/elabs/layouts/{lists → content_classifiers_lists}/_tags.html.haml +0 -0
- data/app/views/elabs/layouts/{_shortcode_infinite_loop.html.haml → shortcodes/_infinite_loop.html.haml} +1 -1
- data/app/views/elabs/layouts/{_shortcode_infinite_loop_inline.html.haml → shortcodes/_infinite_loop_inline.html.haml} +0 -0
- data/app/views/elabs/layouts/{_shortcode_missing_content.html.haml → shortcodes/_missing_content.html.haml} +1 -1
- data/app/views/elabs/layouts/{_shortcode_missing_content_inline.html.haml → shortcodes/_missing_content_inline.html.haml} +0 -0
- data/app/views/elabs/layouts/shortcodes/_open_to_see.html.haml +2 -0
- data/app/views/elabs/layouts/{widgets → shortcodes/widgets}/_github_repo_card.html.haml +1 -1
- data/app/views/elabs/layouts/{widgets → shortcodes/widgets}/_github_repo_inline.html.haml +0 -0
- data/app/views/elabs/layouts/{widgets → shortcodes/widgets}/_github_user_card.html.haml +0 -0
- data/app/views/elabs/layouts/{widgets → shortcodes/widgets}/_gitlab_group_card.html.haml +1 -1
- data/app/views/elabs/layouts/{widgets → shortcodes/widgets}/_gitlab_repo_card.html.haml +1 -1
- data/app/views/elabs/layouts/{widgets → shortcodes/widgets}/_gitlab_repo_inline.html.haml +0 -0
- data/app/views/elabs/layouts/{widgets → shortcodes/widgets}/_gitlab_user_card.html.haml +1 -1
- data/app/views/elabs/layouts/shortcodes/widgets/vue/_all_widgets.html.haml +5 -0
- data/app/views/elabs/layouts/{widgets → shortcodes/widgets}/vue/_github_repo_card_vue.html.haml +8 -8
- data/app/views/elabs/layouts/{widgets → shortcodes/widgets}/vue/_github_user_card_vue.html.haml +5 -5
- data/app/views/elabs/layouts/{widgets → shortcodes/widgets}/vue/_gitlab_group_card_vue.html.haml +5 -5
- data/app/views/elabs/layouts/{widgets → shortcodes/widgets}/vue/_gitlab_repo_card_vue.html.haml +8 -8
- data/app/views/elabs/layouts/{widgets → shortcodes/widgets}/vue/_gitlab_user_card_vue.html.haml +4 -4
- data/app/views/elabs/licenses/_filters.html.haml +3 -2
- data/app/views/elabs/licenses/index.html.haml +14 -12
- data/app/views/elabs/licenses/show.html.haml +40 -34
- data/app/views/elabs/member/albums/_form.html.haml +1 -43
- data/app/views/elabs/member/articles/_form.html.haml +1 -39
- data/app/views/elabs/member/layouts/_form_commons.html.haml +55 -0
- data/app/views/elabs/member/notes/_form.html.haml +1 -39
- data/app/views/elabs/member/preferences/edit.html.haml +1 -2
- data/app/views/elabs/member/projects/_form.html.haml +3 -38
- data/app/views/elabs/member/uploads/_form.html.haml +1 -42
- data/app/views/elabs/member/uploads/_upload.json.jbuilder +3 -3
- data/app/views/elabs/member/users/edit.html.haml +3 -4
- data/app/views/elabs/notes/_filters.html.haml +5 -3
- data/app/views/elabs/notes/index.html.haml +1 -1
- data/app/views/elabs/notes/show.html.haml +33 -25
- data/app/views/elabs/projects/_filters.html.haml +5 -3
- data/app/views/elabs/projects/index.html.haml +1 -1
- data/app/views/elabs/projects/show.html.haml +68 -62
- data/app/views/elabs/reports/_form.html.haml +2 -0
- data/app/views/elabs/tags/_filters.html.haml +3 -2
- data/app/views/elabs/tags/index.html.haml +11 -11
- data/app/views/elabs/tags/show.html.haml +31 -28
- data/app/views/elabs/uploads/_filters.html.haml +5 -3
- data/app/views/elabs/uploads/_preview.html.haml +5 -4
- data/app/views/elabs/uploads/_thumbnail.html.haml +9 -0
- data/app/views/elabs/uploads/_upload.json.jbuilder +3 -3
- data/app/views/elabs/uploads/index.html.haml +1 -1
- data/app/views/elabs/uploads/show.html.haml +45 -39
- data/app/views/elabs/users/_filters.html.haml +3 -2
- data/app/views/elabs/users/_user.html.haml +3 -3
- data/app/views/elabs/users/show.html.haml +48 -43
- data/config/routes.rb +13 -8
- data/db/migrate/20181025084232_add_archived_field_to_comments.rb +5 -0
- data/db/migrate/20181026071743_delete_comment_notifications.rb +5 -0
- data/db/migrate/20181030063505_create_announcements.rb +14 -0
- data/docs/CODEOWNERS +10 -0
- data/docs/migrating.md +16 -1
- data/docs/shortcodes_guide.md +51 -0
- data/lib/assets/javascripts/README-highlight.js.md +5 -5
- data/lib/assets/javascripts/highlight.js-9.13.1/highlight.pack.js +2 -0
- data/lib/assets/stylesheets/{highlight.js-9.12.0 → highlight.js-9.13.1}/styles/atelier-sulphurpool-light.css +0 -0
- data/lib/elabs.rb +8 -0
- data/lib/elabs/version.rb +1 -1
- data/lib/generators/elabs/{devise_views_generator.rb → devise_mailer_views_generator.rb} +2 -2
- data/lib/generators/elabs/images_generator.rb +24 -0
- data/lib/generators/elabs/required_assets_generator.rb +0 -2
- data/lib/generators/templates/elabs.rb +3 -0
- data/locale/app.pot +132 -19
- data/locale/en/app.edit.po +130 -17
- data/locale/en/app.po +130 -17
- data/locale/fr/app.edit.po +145 -28
- data/locale/fr/app.po +141 -27
- data/package.json +10 -12
- data/yarn.lock +885 -668
- metadata +136 -97
- data/app/assets/stylesheets/elabs/_icons.scss +0 -17
- data/app/assets/stylesheets/elabs/app/_acts.scss +0 -69
- data/app/assets/stylesheets/elabs/app/_alerts.scss +0 -3
- data/app/assets/stylesheets/elabs/app/_badges.scss +0 -11
- data/app/assets/stylesheets/elabs/app/_buttons.scss +0 -29
- data/app/assets/stylesheets/elabs/app/_content.scss +0 -25
- data/app/assets/stylesheets/elabs/app/_content_statuses.scss +0 -32
- data/app/assets/stylesheets/elabs/app/_content_uploads.scss +0 -39
- data/app/assets/stylesheets/elabs/app/_empty.scss +0 -19
- data/app/assets/stylesheets/elabs/app/_errors.scss +0 -9
- data/app/assets/stylesheets/elabs/app/_filter_links.scss +0 -27
- data/app/assets/stylesheets/elabs/app/_forms.scss +0 -74
- data/app/assets/stylesheets/elabs/app/_languages.scss +0 -6
- data/app/assets/stylesheets/elabs/app/_layout.scss +0 -206
- data/app/assets/stylesheets/elabs/app/_licenses.scss +0 -6
- data/app/assets/stylesheets/elabs/app/_link-to-top.scss +0 -8
- data/app/assets/stylesheets/elabs/app/_tabs.scss +0 -54
- data/app/assets/stylesheets/elabs/app/_tags.scss +0 -6
- data/app/assets/stylesheets/elabs/app/_toolbars.scss +0 -3
- data/app/assets/stylesheets/elabs/app/_users.scss +0 -21
- data/app/assets/stylesheets/elabs/app/admin-members/_forms.scss +0 -13
- data/app/assets/stylesheets/elabs/app/admin-members/_indexes.scss +0 -46
- data/app/assets/stylesheets/elabs/app/admin-members/_layout.scss +0 -17
- data/app/assets/stylesheets/elabs/app/areas/_devise.scss +0 -31
- data/app/assets/stylesheets/elabs/app/components/_cards.scss +0 -16
- data/app/assets/stylesheets/elabs/app/components/_container.scss +0 -4
- data/app/assets/stylesheets/elabs/app/mixins/_classifier-card.scss +0 -16
- data/app/assets/stylesheets/elabs/app/mixins/_content-card.scss +0 -72
- data/app/assets/stylesheets/elabs/app/mixins/_content-full.scss +0 -77
- data/app/assets/stylesheets/elabs/app/widgets/_git-cards.scss +0 -88
- data/app/assets/stylesheets/elabs/lib/fontawesome/_icons.scss +0 -1118
- data/app/assets/stylesheets/elabs/lib/knacss/_knacss-variables.scss +0 -239
- data/app/views/elabs/albums/_album.html.haml +0 -38
- data/app/views/elabs/articles/_article.html.haml +0 -30
- data/app/views/elabs/languages/_associations.html.haml +0 -61
- data/app/views/elabs/layouts/_shortcode_open_to_see.html.haml +0 -2
- data/app/views/elabs/layouts/admin_application.html.haml +0 -21
- data/app/views/elabs/layouts/member_application.html.haml +0 -24
- data/app/views/elabs/layouts/widgets/vue/_all_widgets.html.haml +0 -5
- data/app/views/elabs/licenses/_associations.html.haml +0 -61
- data/app/views/elabs/notes/_note.html.haml +0 -31
- data/app/views/elabs/projects/_associations.html.haml +0 -54
- data/app/views/elabs/projects/_project.html.haml +0 -29
- data/app/views/elabs/tags/_associations.html.haml +0 -61
- data/app/views/elabs/uploads/_upload.html.haml +0 -41
- data/app/views/elabs/users/_associations.html.haml +0 -61
- data/db/seeds.rb +0 -10
- data/db/seeds_development.rb +0 -21
- data/db/seeds_production.rb +0 -0
- data/lib/assets/javascripts/codemirror-5.39.2/addon/mode/overlay.js +0 -90
- data/lib/assets/javascripts/codemirror-5.39.2/lib/codemirror.js +0 -9684
- data/lib/assets/javascripts/codemirror-5.39.2/mode/clike/clike.js +0 -834
- data/lib/assets/javascripts/codemirror-5.39.2/mode/css/css.js +0 -832
- data/lib/assets/javascripts/codemirror-5.39.2/mode/gfm/gfm.js +0 -129
- data/lib/assets/javascripts/codemirror-5.39.2/mode/htmlmixed/htmlmixed.js +0 -152
- data/lib/assets/javascripts/codemirror-5.39.2/mode/javascript/javascript.js +0 -896
- data/lib/assets/javascripts/codemirror-5.39.2/mode/markdown/markdown.js +0 -882
- data/lib/assets/javascripts/codemirror-5.39.2/mode/meta.js +0 -217
- data/lib/assets/javascripts/codemirror-5.39.2/mode/xml/xml.js +0 -402
- data/lib/assets/javascripts/highlight.js-9.12.0/highlight.pack.js +0 -2
- data/lib/assets/stylesheets/codemirror-5.39.2/lib/codemirror.css +0 -346
- data/lib/assets/stylesheets/codemirror-5.39.2/theme/base16-dark.css +0 -38
- data/lib/assets/stylesheets/codemirror-5.39.2/theme/base16-light.css +0 -38
@@ -1,832 +0,0 @@
|
|
1
|
-
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
-
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
3
|
-
|
4
|
-
(function(mod) {
|
5
|
-
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
6
|
-
mod(require("../../lib/codemirror"));
|
7
|
-
else if (typeof define == "function" && define.amd) // AMD
|
8
|
-
define(["../../lib/codemirror"], mod);
|
9
|
-
else // Plain browser env
|
10
|
-
mod(CodeMirror);
|
11
|
-
})(function(CodeMirror) {
|
12
|
-
"use strict";
|
13
|
-
|
14
|
-
CodeMirror.defineMode("css", function(config, parserConfig) {
|
15
|
-
var inline = parserConfig.inline
|
16
|
-
if (!parserConfig.propertyKeywords) parserConfig = CodeMirror.resolveMode("text/css");
|
17
|
-
|
18
|
-
var indentUnit = config.indentUnit,
|
19
|
-
tokenHooks = parserConfig.tokenHooks,
|
20
|
-
documentTypes = parserConfig.documentTypes || {},
|
21
|
-
mediaTypes = parserConfig.mediaTypes || {},
|
22
|
-
mediaFeatures = parserConfig.mediaFeatures || {},
|
23
|
-
mediaValueKeywords = parserConfig.mediaValueKeywords || {},
|
24
|
-
propertyKeywords = parserConfig.propertyKeywords || {},
|
25
|
-
nonStandardPropertyKeywords = parserConfig.nonStandardPropertyKeywords || {},
|
26
|
-
fontProperties = parserConfig.fontProperties || {},
|
27
|
-
counterDescriptors = parserConfig.counterDescriptors || {},
|
28
|
-
colorKeywords = parserConfig.colorKeywords || {},
|
29
|
-
valueKeywords = parserConfig.valueKeywords || {},
|
30
|
-
allowNested = parserConfig.allowNested,
|
31
|
-
lineComment = parserConfig.lineComment,
|
32
|
-
supportsAtComponent = parserConfig.supportsAtComponent === true;
|
33
|
-
|
34
|
-
var type, override;
|
35
|
-
function ret(style, tp) { type = tp; return style; }
|
36
|
-
|
37
|
-
// Tokenizers
|
38
|
-
|
39
|
-
function tokenBase(stream, state) {
|
40
|
-
var ch = stream.next();
|
41
|
-
if (tokenHooks[ch]) {
|
42
|
-
var result = tokenHooks[ch](stream, state);
|
43
|
-
if (result !== false) return result;
|
44
|
-
}
|
45
|
-
if (ch == "@") {
|
46
|
-
stream.eatWhile(/[\w\\\-]/);
|
47
|
-
return ret("def", stream.current());
|
48
|
-
} else if (ch == "=" || (ch == "~" || ch == "|") && stream.eat("=")) {
|
49
|
-
return ret(null, "compare");
|
50
|
-
} else if (ch == "\"" || ch == "'") {
|
51
|
-
state.tokenize = tokenString(ch);
|
52
|
-
return state.tokenize(stream, state);
|
53
|
-
} else if (ch == "#") {
|
54
|
-
stream.eatWhile(/[\w\\\-]/);
|
55
|
-
return ret("atom", "hash");
|
56
|
-
} else if (ch == "!") {
|
57
|
-
stream.match(/^\s*\w*/);
|
58
|
-
return ret("keyword", "important");
|
59
|
-
} else if (/\d/.test(ch) || ch == "." && stream.eat(/\d/)) {
|
60
|
-
stream.eatWhile(/[\w.%]/);
|
61
|
-
return ret("number", "unit");
|
62
|
-
} else if (ch === "-") {
|
63
|
-
if (/[\d.]/.test(stream.peek())) {
|
64
|
-
stream.eatWhile(/[\w.%]/);
|
65
|
-
return ret("number", "unit");
|
66
|
-
} else if (stream.match(/^-[\w\\\-]+/)) {
|
67
|
-
stream.eatWhile(/[\w\\\-]/);
|
68
|
-
if (stream.match(/^\s*:/, false))
|
69
|
-
return ret("variable-2", "variable-definition");
|
70
|
-
return ret("variable-2", "variable");
|
71
|
-
} else if (stream.match(/^\w+-/)) {
|
72
|
-
return ret("meta", "meta");
|
73
|
-
}
|
74
|
-
} else if (/[,+>*\/]/.test(ch)) {
|
75
|
-
return ret(null, "select-op");
|
76
|
-
} else if (ch == "." && stream.match(/^-?[_a-z][_a-z0-9-]*/i)) {
|
77
|
-
return ret("qualifier", "qualifier");
|
78
|
-
} else if (/[:;{}\[\]\(\)]/.test(ch)) {
|
79
|
-
return ret(null, ch);
|
80
|
-
} else if (((ch == "u" || ch == "U") && stream.match(/rl(-prefix)?\(/i)) ||
|
81
|
-
((ch == "d" || ch == "D") && stream.match("omain(", true, true)) ||
|
82
|
-
((ch == "r" || ch == "R") && stream.match("egexp(", true, true))) {
|
83
|
-
stream.backUp(1);
|
84
|
-
state.tokenize = tokenParenthesized;
|
85
|
-
return ret("property", "word");
|
86
|
-
} else if (/[\w\\\-]/.test(ch)) {
|
87
|
-
stream.eatWhile(/[\w\\\-]/);
|
88
|
-
return ret("property", "word");
|
89
|
-
} else {
|
90
|
-
return ret(null, null);
|
91
|
-
}
|
92
|
-
}
|
93
|
-
|
94
|
-
function tokenString(quote) {
|
95
|
-
return function(stream, state) {
|
96
|
-
var escaped = false, ch;
|
97
|
-
while ((ch = stream.next()) != null) {
|
98
|
-
if (ch == quote && !escaped) {
|
99
|
-
if (quote == ")") stream.backUp(1);
|
100
|
-
break;
|
101
|
-
}
|
102
|
-
escaped = !escaped && ch == "\\";
|
103
|
-
}
|
104
|
-
if (ch == quote || !escaped && quote != ")") state.tokenize = null;
|
105
|
-
return ret("string", "string");
|
106
|
-
};
|
107
|
-
}
|
108
|
-
|
109
|
-
function tokenParenthesized(stream, state) {
|
110
|
-
stream.next(); // Must be '('
|
111
|
-
if (!stream.match(/\s*[\"\')]/, false))
|
112
|
-
state.tokenize = tokenString(")");
|
113
|
-
else
|
114
|
-
state.tokenize = null;
|
115
|
-
return ret(null, "(");
|
116
|
-
}
|
117
|
-
|
118
|
-
// Context management
|
119
|
-
|
120
|
-
function Context(type, indent, prev) {
|
121
|
-
this.type = type;
|
122
|
-
this.indent = indent;
|
123
|
-
this.prev = prev;
|
124
|
-
}
|
125
|
-
|
126
|
-
function pushContext(state, stream, type, indent) {
|
127
|
-
state.context = new Context(type, stream.indentation() + (indent === false ? 0 : indentUnit), state.context);
|
128
|
-
return type;
|
129
|
-
}
|
130
|
-
|
131
|
-
function popContext(state) {
|
132
|
-
if (state.context.prev)
|
133
|
-
state.context = state.context.prev;
|
134
|
-
return state.context.type;
|
135
|
-
}
|
136
|
-
|
137
|
-
function pass(type, stream, state) {
|
138
|
-
return states[state.context.type](type, stream, state);
|
139
|
-
}
|
140
|
-
function popAndPass(type, stream, state, n) {
|
141
|
-
for (var i = n || 1; i > 0; i--)
|
142
|
-
state.context = state.context.prev;
|
143
|
-
return pass(type, stream, state);
|
144
|
-
}
|
145
|
-
|
146
|
-
// Parser
|
147
|
-
|
148
|
-
function wordAsValue(stream) {
|
149
|
-
var word = stream.current().toLowerCase();
|
150
|
-
if (valueKeywords.hasOwnProperty(word))
|
151
|
-
override = "atom";
|
152
|
-
else if (colorKeywords.hasOwnProperty(word))
|
153
|
-
override = "keyword";
|
154
|
-
else
|
155
|
-
override = "variable";
|
156
|
-
}
|
157
|
-
|
158
|
-
var states = {};
|
159
|
-
|
160
|
-
states.top = function(type, stream, state) {
|
161
|
-
if (type == "{") {
|
162
|
-
return pushContext(state, stream, "block");
|
163
|
-
} else if (type == "}" && state.context.prev) {
|
164
|
-
return popContext(state);
|
165
|
-
} else if (supportsAtComponent && /@component/i.test(type)) {
|
166
|
-
return pushContext(state, stream, "atComponentBlock");
|
167
|
-
} else if (/^@(-moz-)?document$/i.test(type)) {
|
168
|
-
return pushContext(state, stream, "documentTypes");
|
169
|
-
} else if (/^@(media|supports|(-moz-)?document|import)$/i.test(type)) {
|
170
|
-
return pushContext(state, stream, "atBlock");
|
171
|
-
} else if (/^@(font-face|counter-style)/i.test(type)) {
|
172
|
-
state.stateArg = type;
|
173
|
-
return "restricted_atBlock_before";
|
174
|
-
} else if (/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(type)) {
|
175
|
-
return "keyframes";
|
176
|
-
} else if (type && type.charAt(0) == "@") {
|
177
|
-
return pushContext(state, stream, "at");
|
178
|
-
} else if (type == "hash") {
|
179
|
-
override = "builtin";
|
180
|
-
} else if (type == "word") {
|
181
|
-
override = "tag";
|
182
|
-
} else if (type == "variable-definition") {
|
183
|
-
return "maybeprop";
|
184
|
-
} else if (type == "interpolation") {
|
185
|
-
return pushContext(state, stream, "interpolation");
|
186
|
-
} else if (type == ":") {
|
187
|
-
return "pseudo";
|
188
|
-
} else if (allowNested && type == "(") {
|
189
|
-
return pushContext(state, stream, "parens");
|
190
|
-
}
|
191
|
-
return state.context.type;
|
192
|
-
};
|
193
|
-
|
194
|
-
states.block = function(type, stream, state) {
|
195
|
-
if (type == "word") {
|
196
|
-
var word = stream.current().toLowerCase();
|
197
|
-
if (propertyKeywords.hasOwnProperty(word)) {
|
198
|
-
override = "property";
|
199
|
-
return "maybeprop";
|
200
|
-
} else if (nonStandardPropertyKeywords.hasOwnProperty(word)) {
|
201
|
-
override = "string-2";
|
202
|
-
return "maybeprop";
|
203
|
-
} else if (allowNested) {
|
204
|
-
override = stream.match(/^\s*:(?:\s|$)/, false) ? "property" : "tag";
|
205
|
-
return "block";
|
206
|
-
} else {
|
207
|
-
override += " error";
|
208
|
-
return "maybeprop";
|
209
|
-
}
|
210
|
-
} else if (type == "meta") {
|
211
|
-
return "block";
|
212
|
-
} else if (!allowNested && (type == "hash" || type == "qualifier")) {
|
213
|
-
override = "error";
|
214
|
-
return "block";
|
215
|
-
} else {
|
216
|
-
return states.top(type, stream, state);
|
217
|
-
}
|
218
|
-
};
|
219
|
-
|
220
|
-
states.maybeprop = function(type, stream, state) {
|
221
|
-
if (type == ":") return pushContext(state, stream, "prop");
|
222
|
-
return pass(type, stream, state);
|
223
|
-
};
|
224
|
-
|
225
|
-
states.prop = function(type, stream, state) {
|
226
|
-
if (type == ";") return popContext(state);
|
227
|
-
if (type == "{" && allowNested) return pushContext(state, stream, "propBlock");
|
228
|
-
if (type == "}" || type == "{") return popAndPass(type, stream, state);
|
229
|
-
if (type == "(") return pushContext(state, stream, "parens");
|
230
|
-
|
231
|
-
if (type == "hash" && !/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(stream.current())) {
|
232
|
-
override += " error";
|
233
|
-
} else if (type == "word") {
|
234
|
-
wordAsValue(stream);
|
235
|
-
} else if (type == "interpolation") {
|
236
|
-
return pushContext(state, stream, "interpolation");
|
237
|
-
}
|
238
|
-
return "prop";
|
239
|
-
};
|
240
|
-
|
241
|
-
states.propBlock = function(type, _stream, state) {
|
242
|
-
if (type == "}") return popContext(state);
|
243
|
-
if (type == "word") { override = "property"; return "maybeprop"; }
|
244
|
-
return state.context.type;
|
245
|
-
};
|
246
|
-
|
247
|
-
states.parens = function(type, stream, state) {
|
248
|
-
if (type == "{" || type == "}") return popAndPass(type, stream, state);
|
249
|
-
if (type == ")") return popContext(state);
|
250
|
-
if (type == "(") return pushContext(state, stream, "parens");
|
251
|
-
if (type == "interpolation") return pushContext(state, stream, "interpolation");
|
252
|
-
if (type == "word") wordAsValue(stream);
|
253
|
-
return "parens";
|
254
|
-
};
|
255
|
-
|
256
|
-
states.pseudo = function(type, stream, state) {
|
257
|
-
if (type == "meta") return "pseudo";
|
258
|
-
|
259
|
-
if (type == "word") {
|
260
|
-
override = "variable-3";
|
261
|
-
return state.context.type;
|
262
|
-
}
|
263
|
-
return pass(type, stream, state);
|
264
|
-
};
|
265
|
-
|
266
|
-
states.documentTypes = function(type, stream, state) {
|
267
|
-
if (type == "word" && documentTypes.hasOwnProperty(stream.current())) {
|
268
|
-
override = "tag";
|
269
|
-
return state.context.type;
|
270
|
-
} else {
|
271
|
-
return states.atBlock(type, stream, state);
|
272
|
-
}
|
273
|
-
};
|
274
|
-
|
275
|
-
states.atBlock = function(type, stream, state) {
|
276
|
-
if (type == "(") return pushContext(state, stream, "atBlock_parens");
|
277
|
-
if (type == "}" || type == ";") return popAndPass(type, stream, state);
|
278
|
-
if (type == "{") return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top");
|
279
|
-
|
280
|
-
if (type == "interpolation") return pushContext(state, stream, "interpolation");
|
281
|
-
|
282
|
-
if (type == "word") {
|
283
|
-
var word = stream.current().toLowerCase();
|
284
|
-
if (word == "only" || word == "not" || word == "and" || word == "or")
|
285
|
-
override = "keyword";
|
286
|
-
else if (mediaTypes.hasOwnProperty(word))
|
287
|
-
override = "attribute";
|
288
|
-
else if (mediaFeatures.hasOwnProperty(word))
|
289
|
-
override = "property";
|
290
|
-
else if (mediaValueKeywords.hasOwnProperty(word))
|
291
|
-
override = "keyword";
|
292
|
-
else if (propertyKeywords.hasOwnProperty(word))
|
293
|
-
override = "property";
|
294
|
-
else if (nonStandardPropertyKeywords.hasOwnProperty(word))
|
295
|
-
override = "string-2";
|
296
|
-
else if (valueKeywords.hasOwnProperty(word))
|
297
|
-
override = "atom";
|
298
|
-
else if (colorKeywords.hasOwnProperty(word))
|
299
|
-
override = "keyword";
|
300
|
-
else
|
301
|
-
override = "error";
|
302
|
-
}
|
303
|
-
return state.context.type;
|
304
|
-
};
|
305
|
-
|
306
|
-
states.atComponentBlock = function(type, stream, state) {
|
307
|
-
if (type == "}")
|
308
|
-
return popAndPass(type, stream, state);
|
309
|
-
if (type == "{")
|
310
|
-
return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top", false);
|
311
|
-
if (type == "word")
|
312
|
-
override = "error";
|
313
|
-
return state.context.type;
|
314
|
-
};
|
315
|
-
|
316
|
-
states.atBlock_parens = function(type, stream, state) {
|
317
|
-
if (type == ")") return popContext(state);
|
318
|
-
if (type == "{" || type == "}") return popAndPass(type, stream, state, 2);
|
319
|
-
return states.atBlock(type, stream, state);
|
320
|
-
};
|
321
|
-
|
322
|
-
states.restricted_atBlock_before = function(type, stream, state) {
|
323
|
-
if (type == "{")
|
324
|
-
return pushContext(state, stream, "restricted_atBlock");
|
325
|
-
if (type == "word" && state.stateArg == "@counter-style") {
|
326
|
-
override = "variable";
|
327
|
-
return "restricted_atBlock_before";
|
328
|
-
}
|
329
|
-
return pass(type, stream, state);
|
330
|
-
};
|
331
|
-
|
332
|
-
states.restricted_atBlock = function(type, stream, state) {
|
333
|
-
if (type == "}") {
|
334
|
-
state.stateArg = null;
|
335
|
-
return popContext(state);
|
336
|
-
}
|
337
|
-
if (type == "word") {
|
338
|
-
if ((state.stateArg == "@font-face" && !fontProperties.hasOwnProperty(stream.current().toLowerCase())) ||
|
339
|
-
(state.stateArg == "@counter-style" && !counterDescriptors.hasOwnProperty(stream.current().toLowerCase())))
|
340
|
-
override = "error";
|
341
|
-
else
|
342
|
-
override = "property";
|
343
|
-
return "maybeprop";
|
344
|
-
}
|
345
|
-
return "restricted_atBlock";
|
346
|
-
};
|
347
|
-
|
348
|
-
states.keyframes = function(type, stream, state) {
|
349
|
-
if (type == "word") { override = "variable"; return "keyframes"; }
|
350
|
-
if (type == "{") return pushContext(state, stream, "top");
|
351
|
-
return pass(type, stream, state);
|
352
|
-
};
|
353
|
-
|
354
|
-
states.at = function(type, stream, state) {
|
355
|
-
if (type == ";") return popContext(state);
|
356
|
-
if (type == "{" || type == "}") return popAndPass(type, stream, state);
|
357
|
-
if (type == "word") override = "tag";
|
358
|
-
else if (type == "hash") override = "builtin";
|
359
|
-
return "at";
|
360
|
-
};
|
361
|
-
|
362
|
-
states.interpolation = function(type, stream, state) {
|
363
|
-
if (type == "}") return popContext(state);
|
364
|
-
if (type == "{" || type == ";") return popAndPass(type, stream, state);
|
365
|
-
if (type == "word") override = "variable";
|
366
|
-
else if (type != "variable" && type != "(" && type != ")") override = "error";
|
367
|
-
return "interpolation";
|
368
|
-
};
|
369
|
-
|
370
|
-
return {
|
371
|
-
startState: function(base) {
|
372
|
-
return {tokenize: null,
|
373
|
-
state: inline ? "block" : "top",
|
374
|
-
stateArg: null,
|
375
|
-
context: new Context(inline ? "block" : "top", base || 0, null)};
|
376
|
-
},
|
377
|
-
|
378
|
-
token: function(stream, state) {
|
379
|
-
if (!state.tokenize && stream.eatSpace()) return null;
|
380
|
-
var style = (state.tokenize || tokenBase)(stream, state);
|
381
|
-
if (style && typeof style == "object") {
|
382
|
-
type = style[1];
|
383
|
-
style = style[0];
|
384
|
-
}
|
385
|
-
override = style;
|
386
|
-
if (type != "comment")
|
387
|
-
state.state = states[state.state](type, stream, state);
|
388
|
-
return override;
|
389
|
-
},
|
390
|
-
|
391
|
-
indent: function(state, textAfter) {
|
392
|
-
var cx = state.context, ch = textAfter && textAfter.charAt(0);
|
393
|
-
var indent = cx.indent;
|
394
|
-
if (cx.type == "prop" && (ch == "}" || ch == ")")) cx = cx.prev;
|
395
|
-
if (cx.prev) {
|
396
|
-
if (ch == "}" && (cx.type == "block" || cx.type == "top" ||
|
397
|
-
cx.type == "interpolation" || cx.type == "restricted_atBlock")) {
|
398
|
-
// Resume indentation from parent context.
|
399
|
-
cx = cx.prev;
|
400
|
-
indent = cx.indent;
|
401
|
-
} else if (ch == ")" && (cx.type == "parens" || cx.type == "atBlock_parens") ||
|
402
|
-
ch == "{" && (cx.type == "at" || cx.type == "atBlock")) {
|
403
|
-
// Dedent relative to current context.
|
404
|
-
indent = Math.max(0, cx.indent - indentUnit);
|
405
|
-
}
|
406
|
-
}
|
407
|
-
return indent;
|
408
|
-
},
|
409
|
-
|
410
|
-
electricChars: "}",
|
411
|
-
blockCommentStart: "/*",
|
412
|
-
blockCommentEnd: "*/",
|
413
|
-
blockCommentContinue: " * ",
|
414
|
-
lineComment: lineComment,
|
415
|
-
fold: "brace"
|
416
|
-
};
|
417
|
-
});
|
418
|
-
|
419
|
-
function keySet(array) {
|
420
|
-
var keys = {};
|
421
|
-
for (var i = 0; i < array.length; ++i) {
|
422
|
-
keys[array[i].toLowerCase()] = true;
|
423
|
-
}
|
424
|
-
return keys;
|
425
|
-
}
|
426
|
-
|
427
|
-
var documentTypes_ = [
|
428
|
-
"domain", "regexp", "url", "url-prefix"
|
429
|
-
], documentTypes = keySet(documentTypes_);
|
430
|
-
|
431
|
-
var mediaTypes_ = [
|
432
|
-
"all", "aural", "braille", "handheld", "print", "projection", "screen",
|
433
|
-
"tty", "tv", "embossed"
|
434
|
-
], mediaTypes = keySet(mediaTypes_);
|
435
|
-
|
436
|
-
var mediaFeatures_ = [
|
437
|
-
"width", "min-width", "max-width", "height", "min-height", "max-height",
|
438
|
-
"device-width", "min-device-width", "max-device-width", "device-height",
|
439
|
-
"min-device-height", "max-device-height", "aspect-ratio",
|
440
|
-
"min-aspect-ratio", "max-aspect-ratio", "device-aspect-ratio",
|
441
|
-
"min-device-aspect-ratio", "max-device-aspect-ratio", "color", "min-color",
|
442
|
-
"max-color", "color-index", "min-color-index", "max-color-index",
|
443
|
-
"monochrome", "min-monochrome", "max-monochrome", "resolution",
|
444
|
-
"min-resolution", "max-resolution", "scan", "grid", "orientation",
|
445
|
-
"device-pixel-ratio", "min-device-pixel-ratio", "max-device-pixel-ratio",
|
446
|
-
"pointer", "any-pointer", "hover", "any-hover"
|
447
|
-
], mediaFeatures = keySet(mediaFeatures_);
|
448
|
-
|
449
|
-
var mediaValueKeywords_ = [
|
450
|
-
"landscape", "portrait", "none", "coarse", "fine", "on-demand", "hover",
|
451
|
-
"interlace", "progressive"
|
452
|
-
], mediaValueKeywords = keySet(mediaValueKeywords_);
|
453
|
-
|
454
|
-
var propertyKeywords_ = [
|
455
|
-
"align-content", "align-items", "align-self", "alignment-adjust",
|
456
|
-
"alignment-baseline", "anchor-point", "animation", "animation-delay",
|
457
|
-
"animation-direction", "animation-duration", "animation-fill-mode",
|
458
|
-
"animation-iteration-count", "animation-name", "animation-play-state",
|
459
|
-
"animation-timing-function", "appearance", "azimuth", "backface-visibility",
|
460
|
-
"background", "background-attachment", "background-blend-mode", "background-clip",
|
461
|
-
"background-color", "background-image", "background-origin", "background-position",
|
462
|
-
"background-repeat", "background-size", "baseline-shift", "binding",
|
463
|
-
"bleed", "bookmark-label", "bookmark-level", "bookmark-state",
|
464
|
-
"bookmark-target", "border", "border-bottom", "border-bottom-color",
|
465
|
-
"border-bottom-left-radius", "border-bottom-right-radius",
|
466
|
-
"border-bottom-style", "border-bottom-width", "border-collapse",
|
467
|
-
"border-color", "border-image", "border-image-outset",
|
468
|
-
"border-image-repeat", "border-image-slice", "border-image-source",
|
469
|
-
"border-image-width", "border-left", "border-left-color",
|
470
|
-
"border-left-style", "border-left-width", "border-radius", "border-right",
|
471
|
-
"border-right-color", "border-right-style", "border-right-width",
|
472
|
-
"border-spacing", "border-style", "border-top", "border-top-color",
|
473
|
-
"border-top-left-radius", "border-top-right-radius", "border-top-style",
|
474
|
-
"border-top-width", "border-width", "bottom", "box-decoration-break",
|
475
|
-
"box-shadow", "box-sizing", "break-after", "break-before", "break-inside",
|
476
|
-
"caption-side", "caret-color", "clear", "clip", "color", "color-profile", "column-count",
|
477
|
-
"column-fill", "column-gap", "column-rule", "column-rule-color",
|
478
|
-
"column-rule-style", "column-rule-width", "column-span", "column-width",
|
479
|
-
"columns", "content", "counter-increment", "counter-reset", "crop", "cue",
|
480
|
-
"cue-after", "cue-before", "cursor", "direction", "display",
|
481
|
-
"dominant-baseline", "drop-initial-after-adjust",
|
482
|
-
"drop-initial-after-align", "drop-initial-before-adjust",
|
483
|
-
"drop-initial-before-align", "drop-initial-size", "drop-initial-value",
|
484
|
-
"elevation", "empty-cells", "fit", "fit-position", "flex", "flex-basis",
|
485
|
-
"flex-direction", "flex-flow", "flex-grow", "flex-shrink", "flex-wrap",
|
486
|
-
"float", "float-offset", "flow-from", "flow-into", "font", "font-feature-settings",
|
487
|
-
"font-family", "font-kerning", "font-language-override", "font-size", "font-size-adjust",
|
488
|
-
"font-stretch", "font-style", "font-synthesis", "font-variant",
|
489
|
-
"font-variant-alternates", "font-variant-caps", "font-variant-east-asian",
|
490
|
-
"font-variant-ligatures", "font-variant-numeric", "font-variant-position",
|
491
|
-
"font-weight", "grid", "grid-area", "grid-auto-columns", "grid-auto-flow",
|
492
|
-
"grid-auto-rows", "grid-column", "grid-column-end", "grid-column-gap",
|
493
|
-
"grid-column-start", "grid-gap", "grid-row", "grid-row-end", "grid-row-gap",
|
494
|
-
"grid-row-start", "grid-template", "grid-template-areas", "grid-template-columns",
|
495
|
-
"grid-template-rows", "hanging-punctuation", "height", "hyphens",
|
496
|
-
"icon", "image-orientation", "image-rendering", "image-resolution",
|
497
|
-
"inline-box-align", "justify-content", "justify-items", "justify-self", "left", "letter-spacing",
|
498
|
-
"line-break", "line-height", "line-stacking", "line-stacking-ruby",
|
499
|
-
"line-stacking-shift", "line-stacking-strategy", "list-style",
|
500
|
-
"list-style-image", "list-style-position", "list-style-type", "margin",
|
501
|
-
"margin-bottom", "margin-left", "margin-right", "margin-top",
|
502
|
-
"marks", "marquee-direction", "marquee-loop",
|
503
|
-
"marquee-play-count", "marquee-speed", "marquee-style", "max-height",
|
504
|
-
"max-width", "min-height", "min-width", "move-to", "nav-down", "nav-index",
|
505
|
-
"nav-left", "nav-right", "nav-up", "object-fit", "object-position",
|
506
|
-
"opacity", "order", "orphans", "outline",
|
507
|
-
"outline-color", "outline-offset", "outline-style", "outline-width",
|
508
|
-
"overflow", "overflow-style", "overflow-wrap", "overflow-x", "overflow-y",
|
509
|
-
"padding", "padding-bottom", "padding-left", "padding-right", "padding-top",
|
510
|
-
"page", "page-break-after", "page-break-before", "page-break-inside",
|
511
|
-
"page-policy", "pause", "pause-after", "pause-before", "perspective",
|
512
|
-
"perspective-origin", "pitch", "pitch-range", "place-content", "place-items", "place-self", "play-during", "position",
|
513
|
-
"presentation-level", "punctuation-trim", "quotes", "region-break-after",
|
514
|
-
"region-break-before", "region-break-inside", "region-fragment",
|
515
|
-
"rendering-intent", "resize", "rest", "rest-after", "rest-before", "richness",
|
516
|
-
"right", "rotation", "rotation-point", "ruby-align", "ruby-overhang",
|
517
|
-
"ruby-position", "ruby-span", "shape-image-threshold", "shape-inside", "shape-margin",
|
518
|
-
"shape-outside", "size", "speak", "speak-as", "speak-header",
|
519
|
-
"speak-numeral", "speak-punctuation", "speech-rate", "stress", "string-set",
|
520
|
-
"tab-size", "table-layout", "target", "target-name", "target-new",
|
521
|
-
"target-position", "text-align", "text-align-last", "text-decoration",
|
522
|
-
"text-decoration-color", "text-decoration-line", "text-decoration-skip",
|
523
|
-
"text-decoration-style", "text-emphasis", "text-emphasis-color",
|
524
|
-
"text-emphasis-position", "text-emphasis-style", "text-height",
|
525
|
-
"text-indent", "text-justify", "text-outline", "text-overflow", "text-shadow",
|
526
|
-
"text-size-adjust", "text-space-collapse", "text-transform", "text-underline-position",
|
527
|
-
"text-wrap", "top", "transform", "transform-origin", "transform-style",
|
528
|
-
"transition", "transition-delay", "transition-duration",
|
529
|
-
"transition-property", "transition-timing-function", "unicode-bidi",
|
530
|
-
"user-select", "vertical-align", "visibility", "voice-balance", "voice-duration",
|
531
|
-
"voice-family", "voice-pitch", "voice-range", "voice-rate", "voice-stress",
|
532
|
-
"voice-volume", "volume", "white-space", "widows", "width", "will-change", "word-break",
|
533
|
-
"word-spacing", "word-wrap", "z-index",
|
534
|
-
// SVG-specific
|
535
|
-
"clip-path", "clip-rule", "mask", "enable-background", "filter", "flood-color",
|
536
|
-
"flood-opacity", "lighting-color", "stop-color", "stop-opacity", "pointer-events",
|
537
|
-
"color-interpolation", "color-interpolation-filters",
|
538
|
-
"color-rendering", "fill", "fill-opacity", "fill-rule", "image-rendering",
|
539
|
-
"marker", "marker-end", "marker-mid", "marker-start", "shape-rendering", "stroke",
|
540
|
-
"stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin",
|
541
|
-
"stroke-miterlimit", "stroke-opacity", "stroke-width", "text-rendering",
|
542
|
-
"baseline-shift", "dominant-baseline", "glyph-orientation-horizontal",
|
543
|
-
"glyph-orientation-vertical", "text-anchor", "writing-mode"
|
544
|
-
], propertyKeywords = keySet(propertyKeywords_);
|
545
|
-
|
546
|
-
var nonStandardPropertyKeywords_ = [
|
547
|
-
"scrollbar-arrow-color", "scrollbar-base-color", "scrollbar-dark-shadow-color",
|
548
|
-
"scrollbar-face-color", "scrollbar-highlight-color", "scrollbar-shadow-color",
|
549
|
-
"scrollbar-3d-light-color", "scrollbar-track-color", "shape-inside",
|
550
|
-
"searchfield-cancel-button", "searchfield-decoration", "searchfield-results-button",
|
551
|
-
"searchfield-results-decoration", "zoom"
|
552
|
-
], nonStandardPropertyKeywords = keySet(nonStandardPropertyKeywords_);
|
553
|
-
|
554
|
-
var fontProperties_ = [
|
555
|
-
"font-family", "src", "unicode-range", "font-variant", "font-feature-settings",
|
556
|
-
"font-stretch", "font-weight", "font-style"
|
557
|
-
], fontProperties = keySet(fontProperties_);
|
558
|
-
|
559
|
-
var counterDescriptors_ = [
|
560
|
-
"additive-symbols", "fallback", "negative", "pad", "prefix", "range",
|
561
|
-
"speak-as", "suffix", "symbols", "system"
|
562
|
-
], counterDescriptors = keySet(counterDescriptors_);
|
563
|
-
|
564
|
-
var colorKeywords_ = [
|
565
|
-
"aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige",
|
566
|
-
"bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown",
|
567
|
-
"burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue",
|
568
|
-
"cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod",
|
569
|
-
"darkgray", "darkgreen", "darkkhaki", "darkmagenta", "darkolivegreen",
|
570
|
-
"darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen",
|
571
|
-
"darkslateblue", "darkslategray", "darkturquoise", "darkviolet",
|
572
|
-
"deeppink", "deepskyblue", "dimgray", "dodgerblue", "firebrick",
|
573
|
-
"floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite",
|
574
|
-
"gold", "goldenrod", "gray", "grey", "green", "greenyellow", "honeydew",
|
575
|
-
"hotpink", "indianred", "indigo", "ivory", "khaki", "lavender",
|
576
|
-
"lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral",
|
577
|
-
"lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightpink",
|
578
|
-
"lightsalmon", "lightseagreen", "lightskyblue", "lightslategray",
|
579
|
-
"lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta",
|
580
|
-
"maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple",
|
581
|
-
"mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise",
|
582
|
-
"mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin",
|
583
|
-
"navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered",
|
584
|
-
"orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred",
|
585
|
-
"papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue",
|
586
|
-
"purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown",
|
587
|
-
"salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue",
|
588
|
-
"slateblue", "slategray", "snow", "springgreen", "steelblue", "tan",
|
589
|
-
"teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white",
|
590
|
-
"whitesmoke", "yellow", "yellowgreen"
|
591
|
-
], colorKeywords = keySet(colorKeywords_);
|
592
|
-
|
593
|
-
var valueKeywords_ = [
|
594
|
-
"above", "absolute", "activeborder", "additive", "activecaption", "afar",
|
595
|
-
"after-white-space", "ahead", "alias", "all", "all-scroll", "alphabetic", "alternate",
|
596
|
-
"always", "amharic", "amharic-abegede", "antialiased", "appworkspace",
|
597
|
-
"arabic-indic", "armenian", "asterisks", "attr", "auto", "auto-flow", "avoid", "avoid-column", "avoid-page",
|
598
|
-
"avoid-region", "background", "backwards", "baseline", "below", "bidi-override", "binary",
|
599
|
-
"bengali", "blink", "block", "block-axis", "bold", "bolder", "border", "border-box",
|
600
|
-
"both", "bottom", "break", "break-all", "break-word", "bullets", "button", "button-bevel",
|
601
|
-
"buttonface", "buttonhighlight", "buttonshadow", "buttontext", "calc", "cambodian",
|
602
|
-
"capitalize", "caps-lock-indicator", "caption", "captiontext", "caret",
|
603
|
-
"cell", "center", "checkbox", "circle", "cjk-decimal", "cjk-earthly-branch",
|
604
|
-
"cjk-heavenly-stem", "cjk-ideographic", "clear", "clip", "close-quote",
|
605
|
-
"col-resize", "collapse", "color", "color-burn", "color-dodge", "column", "column-reverse",
|
606
|
-
"compact", "condensed", "contain", "content", "contents",
|
607
|
-
"content-box", "context-menu", "continuous", "copy", "counter", "counters", "cover", "crop",
|
608
|
-
"cross", "crosshair", "currentcolor", "cursive", "cyclic", "darken", "dashed", "decimal",
|
609
|
-
"decimal-leading-zero", "default", "default-button", "dense", "destination-atop",
|
610
|
-
"destination-in", "destination-out", "destination-over", "devanagari", "difference",
|
611
|
-
"disc", "discard", "disclosure-closed", "disclosure-open", "document",
|
612
|
-
"dot-dash", "dot-dot-dash",
|
613
|
-
"dotted", "double", "down", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out",
|
614
|
-
"element", "ellipse", "ellipsis", "embed", "end", "ethiopic", "ethiopic-abegede",
|
615
|
-
"ethiopic-abegede-am-et", "ethiopic-abegede-gez", "ethiopic-abegede-ti-er",
|
616
|
-
"ethiopic-abegede-ti-et", "ethiopic-halehame-aa-er",
|
617
|
-
"ethiopic-halehame-aa-et", "ethiopic-halehame-am-et",
|
618
|
-
"ethiopic-halehame-gez", "ethiopic-halehame-om-et",
|
619
|
-
"ethiopic-halehame-sid-et", "ethiopic-halehame-so-et",
|
620
|
-
"ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig",
|
621
|
-
"ethiopic-numeric", "ew-resize", "exclusion", "expanded", "extends", "extra-condensed",
|
622
|
-
"extra-expanded", "fantasy", "fast", "fill", "fixed", "flat", "flex", "flex-end", "flex-start", "footnotes",
|
623
|
-
"forwards", "from", "geometricPrecision", "georgian", "graytext", "grid", "groove",
|
624
|
-
"gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hard-light", "hebrew",
|
625
|
-
"help", "hidden", "hide", "higher", "highlight", "highlighttext",
|
626
|
-
"hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "hue", "icon", "ignore",
|
627
|
-
"inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite",
|
628
|
-
"infobackground", "infotext", "inherit", "initial", "inline", "inline-axis",
|
629
|
-
"inline-block", "inline-flex", "inline-grid", "inline-table", "inset", "inside", "intrinsic", "invert",
|
630
|
-
"italic", "japanese-formal", "japanese-informal", "justify", "kannada",
|
631
|
-
"katakana", "katakana-iroha", "keep-all", "khmer",
|
632
|
-
"korean-hangul-formal", "korean-hanja-formal", "korean-hanja-informal",
|
633
|
-
"landscape", "lao", "large", "larger", "left", "level", "lighter", "lighten",
|
634
|
-
"line-through", "linear", "linear-gradient", "lines", "list-item", "listbox", "listitem",
|
635
|
-
"local", "logical", "loud", "lower", "lower-alpha", "lower-armenian",
|
636
|
-
"lower-greek", "lower-hexadecimal", "lower-latin", "lower-norwegian",
|
637
|
-
"lower-roman", "lowercase", "ltr", "luminosity", "malayalam", "match", "matrix", "matrix3d",
|
638
|
-
"media-controls-background", "media-current-time-display",
|
639
|
-
"media-fullscreen-button", "media-mute-button", "media-play-button",
|
640
|
-
"media-return-to-realtime-button", "media-rewind-button",
|
641
|
-
"media-seek-back-button", "media-seek-forward-button", "media-slider",
|
642
|
-
"media-sliderthumb", "media-time-remaining-display", "media-volume-slider",
|
643
|
-
"media-volume-slider-container", "media-volume-sliderthumb", "medium",
|
644
|
-
"menu", "menulist", "menulist-button", "menulist-text",
|
645
|
-
"menulist-textfield", "menutext", "message-box", "middle", "min-intrinsic",
|
646
|
-
"mix", "mongolian", "monospace", "move", "multiple", "multiply", "myanmar", "n-resize",
|
647
|
-
"narrower", "ne-resize", "nesw-resize", "no-close-quote", "no-drop",
|
648
|
-
"no-open-quote", "no-repeat", "none", "normal", "not-allowed", "nowrap",
|
649
|
-
"ns-resize", "numbers", "numeric", "nw-resize", "nwse-resize", "oblique", "octal", "opacity", "open-quote",
|
650
|
-
"optimizeLegibility", "optimizeSpeed", "oriya", "oromo", "outset",
|
651
|
-
"outside", "outside-shape", "overlay", "overline", "padding", "padding-box",
|
652
|
-
"painted", "page", "paused", "persian", "perspective", "plus-darker", "plus-lighter",
|
653
|
-
"pointer", "polygon", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d",
|
654
|
-
"progress", "push-button", "radial-gradient", "radio", "read-only",
|
655
|
-
"read-write", "read-write-plaintext-only", "rectangle", "region",
|
656
|
-
"relative", "repeat", "repeating-linear-gradient",
|
657
|
-
"repeating-radial-gradient", "repeat-x", "repeat-y", "reset", "reverse",
|
658
|
-
"rgb", "rgba", "ridge", "right", "rotate", "rotate3d", "rotateX", "rotateY",
|
659
|
-
"rotateZ", "round", "row", "row-resize", "row-reverse", "rtl", "run-in", "running",
|
660
|
-
"s-resize", "sans-serif", "saturation", "scale", "scale3d", "scaleX", "scaleY", "scaleZ", "screen",
|
661
|
-
"scroll", "scrollbar", "scroll-position", "se-resize", "searchfield",
|
662
|
-
"searchfield-cancel-button", "searchfield-decoration",
|
663
|
-
"searchfield-results-button", "searchfield-results-decoration", "self-start", "self-end",
|
664
|
-
"semi-condensed", "semi-expanded", "separate", "serif", "show", "sidama",
|
665
|
-
"simp-chinese-formal", "simp-chinese-informal", "single",
|
666
|
-
"skew", "skewX", "skewY", "skip-white-space", "slide", "slider-horizontal",
|
667
|
-
"slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow",
|
668
|
-
"small", "small-caps", "small-caption", "smaller", "soft-light", "solid", "somali",
|
669
|
-
"source-atop", "source-in", "source-out", "source-over", "space", "space-around", "space-between", "space-evenly", "spell-out", "square",
|
670
|
-
"square-button", "start", "static", "status-bar", "stretch", "stroke", "sub",
|
671
|
-
"subpixel-antialiased", "super", "sw-resize", "symbolic", "symbols", "system-ui", "table",
|
672
|
-
"table-caption", "table-cell", "table-column", "table-column-group",
|
673
|
-
"table-footer-group", "table-header-group", "table-row", "table-row-group",
|
674
|
-
"tamil",
|
675
|
-
"telugu", "text", "text-bottom", "text-top", "textarea", "textfield", "thai",
|
676
|
-
"thick", "thin", "threeddarkshadow", "threedface", "threedhighlight",
|
677
|
-
"threedlightshadow", "threedshadow", "tibetan", "tigre", "tigrinya-er",
|
678
|
-
"tigrinya-er-abegede", "tigrinya-et", "tigrinya-et-abegede", "to", "top",
|
679
|
-
"trad-chinese-formal", "trad-chinese-informal", "transform",
|
680
|
-
"translate", "translate3d", "translateX", "translateY", "translateZ",
|
681
|
-
"transparent", "ultra-condensed", "ultra-expanded", "underline", "unset", "up",
|
682
|
-
"upper-alpha", "upper-armenian", "upper-greek", "upper-hexadecimal",
|
683
|
-
"upper-latin", "upper-norwegian", "upper-roman", "uppercase", "urdu", "url",
|
684
|
-
"var", "vertical", "vertical-text", "visible", "visibleFill", "visiblePainted",
|
685
|
-
"visibleStroke", "visual", "w-resize", "wait", "wave", "wider",
|
686
|
-
"window", "windowframe", "windowtext", "words", "wrap", "wrap-reverse", "x-large", "x-small", "xor",
|
687
|
-
"xx-large", "xx-small"
|
688
|
-
], valueKeywords = keySet(valueKeywords_);
|
689
|
-
|
690
|
-
var allWords = documentTypes_.concat(mediaTypes_).concat(mediaFeatures_).concat(mediaValueKeywords_)
|
691
|
-
.concat(propertyKeywords_).concat(nonStandardPropertyKeywords_).concat(colorKeywords_)
|
692
|
-
.concat(valueKeywords_);
|
693
|
-
CodeMirror.registerHelper("hintWords", "css", allWords);
|
694
|
-
|
695
|
-
function tokenCComment(stream, state) {
|
696
|
-
var maybeEnd = false, ch;
|
697
|
-
while ((ch = stream.next()) != null) {
|
698
|
-
if (maybeEnd && ch == "/") {
|
699
|
-
state.tokenize = null;
|
700
|
-
break;
|
701
|
-
}
|
702
|
-
maybeEnd = (ch == "*");
|
703
|
-
}
|
704
|
-
return ["comment", "comment"];
|
705
|
-
}
|
706
|
-
|
707
|
-
CodeMirror.defineMIME("text/css", {
|
708
|
-
documentTypes: documentTypes,
|
709
|
-
mediaTypes: mediaTypes,
|
710
|
-
mediaFeatures: mediaFeatures,
|
711
|
-
mediaValueKeywords: mediaValueKeywords,
|
712
|
-
propertyKeywords: propertyKeywords,
|
713
|
-
nonStandardPropertyKeywords: nonStandardPropertyKeywords,
|
714
|
-
fontProperties: fontProperties,
|
715
|
-
counterDescriptors: counterDescriptors,
|
716
|
-
colorKeywords: colorKeywords,
|
717
|
-
valueKeywords: valueKeywords,
|
718
|
-
tokenHooks: {
|
719
|
-
"/": function(stream, state) {
|
720
|
-
if (!stream.eat("*")) return false;
|
721
|
-
state.tokenize = tokenCComment;
|
722
|
-
return tokenCComment(stream, state);
|
723
|
-
}
|
724
|
-
},
|
725
|
-
name: "css"
|
726
|
-
});
|
727
|
-
|
728
|
-
CodeMirror.defineMIME("text/x-scss", {
|
729
|
-
mediaTypes: mediaTypes,
|
730
|
-
mediaFeatures: mediaFeatures,
|
731
|
-
mediaValueKeywords: mediaValueKeywords,
|
732
|
-
propertyKeywords: propertyKeywords,
|
733
|
-
nonStandardPropertyKeywords: nonStandardPropertyKeywords,
|
734
|
-
colorKeywords: colorKeywords,
|
735
|
-
valueKeywords: valueKeywords,
|
736
|
-
fontProperties: fontProperties,
|
737
|
-
allowNested: true,
|
738
|
-
lineComment: "//",
|
739
|
-
tokenHooks: {
|
740
|
-
"/": function(stream, state) {
|
741
|
-
if (stream.eat("/")) {
|
742
|
-
stream.skipToEnd();
|
743
|
-
return ["comment", "comment"];
|
744
|
-
} else if (stream.eat("*")) {
|
745
|
-
state.tokenize = tokenCComment;
|
746
|
-
return tokenCComment(stream, state);
|
747
|
-
} else {
|
748
|
-
return ["operator", "operator"];
|
749
|
-
}
|
750
|
-
},
|
751
|
-
":": function(stream) {
|
752
|
-
if (stream.match(/\s*\{/, false))
|
753
|
-
return [null, null]
|
754
|
-
return false;
|
755
|
-
},
|
756
|
-
"$": function(stream) {
|
757
|
-
stream.match(/^[\w-]+/);
|
758
|
-
if (stream.match(/^\s*:/, false))
|
759
|
-
return ["variable-2", "variable-definition"];
|
760
|
-
return ["variable-2", "variable"];
|
761
|
-
},
|
762
|
-
"#": function(stream) {
|
763
|
-
if (!stream.eat("{")) return false;
|
764
|
-
return [null, "interpolation"];
|
765
|
-
}
|
766
|
-
},
|
767
|
-
name: "css",
|
768
|
-
helperType: "scss"
|
769
|
-
});
|
770
|
-
|
771
|
-
CodeMirror.defineMIME("text/x-less", {
|
772
|
-
mediaTypes: mediaTypes,
|
773
|
-
mediaFeatures: mediaFeatures,
|
774
|
-
mediaValueKeywords: mediaValueKeywords,
|
775
|
-
propertyKeywords: propertyKeywords,
|
776
|
-
nonStandardPropertyKeywords: nonStandardPropertyKeywords,
|
777
|
-
colorKeywords: colorKeywords,
|
778
|
-
valueKeywords: valueKeywords,
|
779
|
-
fontProperties: fontProperties,
|
780
|
-
allowNested: true,
|
781
|
-
lineComment: "//",
|
782
|
-
tokenHooks: {
|
783
|
-
"/": function(stream, state) {
|
784
|
-
if (stream.eat("/")) {
|
785
|
-
stream.skipToEnd();
|
786
|
-
return ["comment", "comment"];
|
787
|
-
} else if (stream.eat("*")) {
|
788
|
-
state.tokenize = tokenCComment;
|
789
|
-
return tokenCComment(stream, state);
|
790
|
-
} else {
|
791
|
-
return ["operator", "operator"];
|
792
|
-
}
|
793
|
-
},
|
794
|
-
"@": function(stream) {
|
795
|
-
if (stream.eat("{")) return [null, "interpolation"];
|
796
|
-
if (stream.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i, false)) return false;
|
797
|
-
stream.eatWhile(/[\w\\\-]/);
|
798
|
-
if (stream.match(/^\s*:/, false))
|
799
|
-
return ["variable-2", "variable-definition"];
|
800
|
-
return ["variable-2", "variable"];
|
801
|
-
},
|
802
|
-
"&": function() {
|
803
|
-
return ["atom", "atom"];
|
804
|
-
}
|
805
|
-
},
|
806
|
-
name: "css",
|
807
|
-
helperType: "less"
|
808
|
-
});
|
809
|
-
|
810
|
-
CodeMirror.defineMIME("text/x-gss", {
|
811
|
-
documentTypes: documentTypes,
|
812
|
-
mediaTypes: mediaTypes,
|
813
|
-
mediaFeatures: mediaFeatures,
|
814
|
-
propertyKeywords: propertyKeywords,
|
815
|
-
nonStandardPropertyKeywords: nonStandardPropertyKeywords,
|
816
|
-
fontProperties: fontProperties,
|
817
|
-
counterDescriptors: counterDescriptors,
|
818
|
-
colorKeywords: colorKeywords,
|
819
|
-
valueKeywords: valueKeywords,
|
820
|
-
supportsAtComponent: true,
|
821
|
-
tokenHooks: {
|
822
|
-
"/": function(stream, state) {
|
823
|
-
if (!stream.eat("*")) return false;
|
824
|
-
state.tokenize = tokenCComment;
|
825
|
-
return tokenCComment(stream, state);
|
826
|
-
}
|
827
|
-
},
|
828
|
-
name: "css",
|
829
|
-
helperType: "gss"
|
830
|
-
});
|
831
|
-
|
832
|
-
});
|