summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Pott2015-06-19 10:51:52 (GMT)
committerAlex Pott2015-06-19 10:51:52 (GMT)
commitb1ffbb006886cd4371c90265b5437fd5ac4705e5 (patch)
tree44f82e69c99307c6d1343270ae7bcfbadddf08a5
parentd579f513623cf3ccd7fd1df1336f77667c3c4581 (diff)
Issue #2349711 by lauriii, mortendk, sqndr, akalata, yannickoo, Manjit.Singh, Jolidog, b0unty, aliyakhan, LewisNyman: Remove all visual from stark
-rw-r--r--core/modules/system/src/Tests/Menu/MenuRouterTest.php12
-rw-r--r--core/modules/system/src/Tests/Theme/ThemeInfoTest.php4
-rw-r--r--core/modules/system/tests/modules/menu_test/src/Theme/TestThemeNegotiator.php4
-rw-r--r--core/modules/system/tests/themes/test_theme/test_theme.info.yml2
-rw-r--r--core/modules/system/tests/themes/test_theme/test_theme.libraries.yml5
-rw-r--r--core/themes/stark/README.txt4
-rw-r--r--core/themes/stark/css/layout.css123
-rw-r--r--core/themes/stark/stark.info.yml6
8 files changed, 19 insertions, 141 deletions
diff --git a/core/modules/system/src/Tests/Menu/MenuRouterTest.php b/core/modules/system/src/Tests/Menu/MenuRouterTest.php
index 4089931..d75bd6c 100644
--- a/core/modules/system/src/Tests/Menu/MenuRouterTest.php
+++ b/core/modules/system/src/Tests/Menu/MenuRouterTest.php
@@ -296,19 +296,19 @@ class MenuRouterTest extends WebTestBase {
*/
protected function doTestThemeCallbackOptionalTheme() {
// Request a theme that is not installed.
- $this->drupalGet('menu-test/theme-callback/use-stark-theme');
+ $this->drupalGet('menu-test/theme-callback/use-test-theme');
$this->assertText('Active theme: bartik. Actual theme: bartik.', 'The theme negotiation system falls back on the default theme when a theme that is not installed is requested.');
$this->assertRaw('bartik/css/base/elements.css', "The default theme's CSS appears on the page.");
// Now install the theme and request it again.
$theme_handler = $this->container->get('theme_handler');
- $theme_handler->install(array('stark'));
+ $theme_handler->install(array('test_theme'));
- $this->drupalGet('menu-test/theme-callback/use-stark-theme');
- $this->assertText('Active theme: stark. Actual theme: stark.', 'The theme negotiation system uses an optional theme once it has been installed.');
- $this->assertRaw('stark/css/layout.css', "The optional theme's CSS appears on the page.");
+ $this->drupalGet('menu-test/theme-callback/use-test-theme');
+ $this->assertText('Active theme: test_theme. Actual theme: test_theme.', 'The theme negotiation system uses an optional theme once it has been installed.');
+ $this->assertRaw('test_theme/kitten.css', "The optional theme's CSS appears on the page.");
- $theme_handler->uninstall(array('stark'));
+ $theme_handler->uninstall(array('test_theme'));
}
/**
diff --git a/core/modules/system/src/Tests/Theme/ThemeInfoTest.php b/core/modules/system/src/Tests/Theme/ThemeInfoTest.php
index 3d376ed..55c71e6 100644
--- a/core/modules/system/src/Tests/Theme/ThemeInfoTest.php
+++ b/core/modules/system/src/Tests/Theme/ThemeInfoTest.php
@@ -94,13 +94,13 @@ class ThemeInfoTest extends WebTestBase {
$active_theme = $this->themeManager->getActiveTheme();
// Make sure we are not testing the wrong theme.
$this->assertEqual('test_theme', $active_theme->getName());
- $this->assertEqual(['classy/base'], $active_theme->getLibraries());
+ $this->assertEqual(['classy/base', 'test_theme/global-styling'], $active_theme->getLibraries());
// @see theme_test_system_info_alter()
$this->state->set('theme_test.modify_info_files', TRUE);
drupal_flush_all_caches();
$active_theme = $this->themeManager->getActiveTheme();
- $this->assertEqual(['classy/base', 'core/backbone'], $active_theme->getLibraries());
+ $this->assertEqual(['classy/base', 'test_theme/global-styling', 'core/backbone'], $active_theme->getLibraries());
}
}
diff --git a/core/modules/system/tests/modules/menu_test/src/Theme/TestThemeNegotiator.php b/core/modules/system/tests/modules/menu_test/src/Theme/TestThemeNegotiator.php
index b4cdd0a..2d8c5f3 100644
--- a/core/modules/system/tests/modules/menu_test/src/Theme/TestThemeNegotiator.php
+++ b/core/modules/system/tests/modules/menu_test/src/Theme/TestThemeNegotiator.php
@@ -35,8 +35,8 @@ class TestThemeNegotiator implements ThemeNegotiatorInterface {
return \Drupal::config('system.theme')->get('admin');
}
// Test using a theme that exists, but may or may not be installed.
- elseif ($argument == 'use-stark-theme') {
- return 'stark';
+ elseif ($argument == 'use-test-theme') {
+ return 'test_theme';
}
// Test using a theme that does not exist.
elseif ($argument == 'use-fake-theme') {
diff --git a/core/modules/system/tests/themes/test_theme/test_theme.info.yml b/core/modules/system/tests/themes/test_theme/test_theme.info.yml
index 7ddcb2d..e9d6602 100644
--- a/core/modules/system/tests/themes/test_theme/test_theme.info.yml
+++ b/core/modules/system/tests/themes/test_theme/test_theme.info.yml
@@ -16,6 +16,8 @@ base theme: classy
core: 8.x
stylesheets-remove:
- '@system/css/system.module.css'
+libraries:
+ - test_theme/global-styling
regions:
content: Content
left: Left
diff --git a/core/modules/system/tests/themes/test_theme/test_theme.libraries.yml b/core/modules/system/tests/themes/test_theme/test_theme.libraries.yml
new file mode 100644
index 0000000..c1fe4a5
--- /dev/null
+++ b/core/modules/system/tests/themes/test_theme/test_theme.libraries.yml
@@ -0,0 +1,5 @@
+global-styling:
+ version: VERSION
+ css:
+ base:
+ kitten.css: {}
diff --git a/core/themes/stark/README.txt b/core/themes/stark/README.txt
index 141a3d0..552261a 100644
--- a/core/themes/stark/README.txt
+++ b/core/themes/stark/README.txt
@@ -10,9 +10,7 @@ default markup without the interference of changes commonly made by more
complex themes.
To avoid obscuring CSS added to the page by Drupal or a contrib module, the
-Stark theme itself has no styling, except just enough CSS to arrange the page
-in a traditional "Header, sidebars, content, and footer" layout. See the
-layout.css file for more information.
+Stark theme itself has no styling.
ABOUT DRUPAL THEMING
diff --git a/core/themes/stark/css/layout.css b/core/themes/stark/css/layout.css
index 486014b..e69de29 100644
--- a/core/themes/stark/css/layout.css
+++ b/core/themes/stark/css/layout.css
@@ -1,123 +0,0 @@
-/**
- * @file
- * Stark layout method
- *
- * To avoid obscuring CSS added to the page by Drupal or a contrib module, the
- * Stark theme itself has no styling, except just enough CSS to arrange the page
- * in a traditional "Header, sidebars, content, and footer" layout.
- *
- * This layout method works reasonably well, but shouldn't be used on a
- * production site because it can break. For example, if an over-large image
- * (one that is wider than 20% of the viewport) is in the left sidebar, the
- * image will overlap with the .layout-content to the right.
- */
-img {
- height: auto;
- max-width: 100%;
-}
-main:after {
- content: "";
- display: table;
- clear: both;
-}
-
-.layout-content,
-.layout-sidebar-first,
-.layout-sidebar-second {
- display: inline;
- position: relative;
-}
-
-details,
-summary {
- display: block;
-}
-
-@media all and (min-width: 480px) and (max-width: 959px) {
- .layout-content {
- width: 67%;
- float: right; /* LTR */
- }
- [dir="rtl"] .layout-content {
- float: left;
- }
-
- .layout-sidebar-first {
- width: 33%;
- float: left; /* LTR */
- }
- [dir="rtl"] .layout-sidebar-first {
- float: right;
- }
-
- .layout-sidebar-second {
- float: right; /* LTR */
- clear: both;
- width: 100%;
- }
- [dir="rtl"] .layout-sidebar-second {
- float: right;
- clear: right;
- }
-
- .layout-sidebar-second .block {
- float: left; /* LTR */
- width: 33%;
- }
- [dir="rtl"] .layout-sidebar-second .block {
- float: right;
- }
- .layout-sidebar-second .block:nth-child(3n+1) {
- clear: both;
- }
-}
-
-@media all and (min-width: 960px) {
- .layout-content {
- width: 60%;
- float: left; /* LTR */
- left: 20%; /* LTR */
- }
- [dir="rtl"] .layout-content {
- float: right;
- left: 0;
- right: 20%;
- }
-
- .layout-sidebar-first {
- width: 20%;
- float: left; /* LTR */
- left: -60%; /* LTR */
- }
- [dir="rtl"] .layout-sidebar-first {
- float: right;
- left: 0;
- right: -60%;
- }
-
- .layout-sidebar-second {
- float: right; /* LTR */
- width: 20%;
- }
- [dir="rtl"] .layout-sidebar-second {
- float: left;
- }
-}
-
-/**
- * Responsive tables.
- */
-@media screen and (max-width:28.125em) { /* 450px */
- th.priority-low,
- td.priority-low,
- th.priority-medium,
- td.priority-medium {
- display: none;
- }
-}
-@media screen and (max-width:45em) { /* 720px */
- th.priority-low,
- td.priority-low {
- display: none;
- }
-}
diff --git a/core/themes/stark/stark.info.yml b/core/themes/stark/stark.info.yml
index 69337d5..70609c1 100644
--- a/core/themes/stark/stark.info.yml
+++ b/core/themes/stark/stark.info.yml
@@ -1,10 +1,6 @@
name: Stark
type: theme
-description: 'An intentionally plain theme with almost no styling to demonstrate default Drupal’s HTML and CSS. Learn how to build a custom theme from Stark in the <a href="https://www.drupal.org/theme-guide">Theming Guide</a>.'
+description: 'An intentionally plain theme with no styling to demonstrate default Drupal’s HTML and CSS. Learn how to build a custom theme from Stark in the <a href="https://www.drupal.org/theme-guide">Theming Guide</a>.'
package: Core
version: VERSION
core: 8.x
-libraries:
- - stark/global-styling
-stylesheets-remove:
- - core/assets/vendor/normalize-css/normalize.css