Version 1
[yaffs-website] / web / core / modules / system / tests / themes / test_theme / test_theme.info.yml
diff --git a/web/core/modules/system/tests/themes/test_theme/test_theme.info.yml b/web/core/modules/system/tests/themes/test_theme/test_theme.info.yml
new file mode 100644 (file)
index 0000000..1c9745f
--- /dev/null
@@ -0,0 +1,67 @@
+# Normally, themes may list CSS files like this, and if they exist in the theme
+# folder, then they get added to the page. If they have the same file name as a
+# module CSS file, then the theme's version overrides the module's version, so
+# that the module's version is not added to the page. Additionally, a theme may
+# have an entry like this one, without having the corresponding CSS file in the
+# theme's folder, and in this case, it just stops the module's version from
+# being loaded, and does not replace it with an alternate version. We have this
+# here in order for a test to ensure that this correctly prevents the module
+# version from being loaded, and that errors aren't caused by the lack of this
+# file within the theme folder.
+name: '<strong>Test theme</strong>'
+type: theme
+description: 'Theme for testing the theme system'
+version: VERSION
+base theme: classy
+core: 8.x
+stylesheets-remove:
+  - '@system/css/js.module.css'
+libraries:
+  - test_theme/global-styling
+libraries-override:
+  # Replace an entire library.
+  core/drupal.collapse: test_theme/collapse
+  # Remove an entire library.
+  core/drupal.progress: false
+  # Replace particular library assets.
+  classy/base:
+    css:
+      component:
+        css/components/button.css: css/my-button.css
+        css/components/collapse-processed.css: css/my-collapse-processed.css
+        css/components/container-inline.css: /themes/my_theme/css/my-container-inline.css
+        css/components/details.css: /themes/my_theme/css/my-details.css
+  # Remove particular library assets.
+  classy/dialog:
+    css:
+      component:
+        css/components/dialog.css: false
+  # It works for JS as well.
+  core/jquery:
+    js:
+      assets/vendor/jquery/jquery.min.js: js/collapse.js
+  # Use Drupal-relative paths.
+  core/drupal.dropbutton:
+    css:
+      component:
+        /core/themes/stable/css/core/dropbutton/dropbutton.css: /themes/my_theme/css/dropbutton.css
+  # Use stream wrappers.
+  core/drupal.vertical-tabs:
+    css:
+      component:
+        /core/themes/stable/css/core/vertical-tabs.css: public://my_css/vertical-tabs.css
+  # Use a protocol-relative URI.
+  core/jquery.ui:
+    css:
+      component:
+        assets/vendor/jquery.ui/themes/base/core.css: //my-server/my_theme/css/jquery_ui.css
+  # Use an absolute URI.
+  core/jquery.farbtastic:
+    css:
+      component:
+        assets/vendor/farbtastic/farbtastic.css: http://example.com/my_theme/css/farbtastic.css
+
+regions:
+  content: Content
+  left: Left
+  right: Right