diff --git a/core/modules/block_place/block_place.libraries.yml b/core/modules/block_place/block_place.libraries.yml index 38a32c7..0671252 100644 --- a/core/modules/block_place/block_place.libraries.yml +++ b/core/modules/block_place/block_place.libraries.yml @@ -3,3 +3,9 @@ drupal.block_place: css: theme: css/block-place.css: {} + +drupal.block_place.icons: + version: VERSION + css: + theme: + css/block-place.icons.theme.css: {} diff --git a/core/modules/block_place/block_place.module b/core/modules/block_place/block_place.module index 65474f8..e3151fd 100644 --- a/core/modules/block_place/block_place.module +++ b/core/modules/block_place/block_place.module @@ -76,7 +76,7 @@ function block_place_toolbar() { '#weight' => 100, '#attached' => [ 'library' => [ - 'block_place/drupal.block_place', + 'block_place/drupal.block_place.icons', ], ], ]; diff --git a/core/modules/block_place/css/block-place.css b/core/modules/block_place/css/block-place.css index b7db3c3..f74143d 100644 --- a/core/modules/block_place/css/block-place.css +++ b/core/modules/block_place/css/block-place.css @@ -1,20 +1,12 @@ -.block-region { - background-color: #ff6; - padding: .75em 1em; - text-align: center; -} -.block-region a { - white-space: nowrap; +.block-place-region { + background: #ffff66; + border: 1px dotted #9f9e00; + color: #000; + font: 90% "Lucida Grande", "Lucida Sans Unicode", sans-serif; + margin: 5px; + padding: 5px; + text-align: center; + text-shadow: none; } - -/* - * Styling for toolbar icon. - */ -.toolbar-bar .toolbar-icon-place-block-active:before { - background-image: url(../../images/core/icons/ffffff/place-block.svg); -} -.toolbar-bar .toolbar-icon-place-block-inactive:before { - background-image: url(../../images/core/icons/bebebe/place-block.svg); -} diff --git a/core/modules/block_place/css/block-place.icons.theme.css b/core/modules/block_place/css/block-place.icons.theme.css new file mode 100644 index 0000000..0983b76 --- /dev/null +++ b/core/modules/block_place/css/block-place.icons.theme.css @@ -0,0 +1,10 @@ +/** + * @file + * Styling for block_place module toolbar icons. + */ +.toolbar-bar .toolbar-icon-place-block-active:before { + background-image: url(../../images/core/icons/ffffff/place-block.svg); +} +.toolbar-bar .toolbar-icon-place-block-inactive:before { + background-image: url(../../images/core/icons/bebebe/place-block.svg); +} diff --git a/core/modules/block_place/src/Plugin/DisplayVariant/PlaceBlockPageVariant.php b/core/modules/block_place/src/Plugin/DisplayVariant/PlaceBlockPageVariant.php index 91d6832..0afc3ee 100644 --- a/core/modules/block_place/src/Plugin/DisplayVariant/PlaceBlockPageVariant.php +++ b/core/modules/block_place/src/Plugin/DisplayVariant/PlaceBlockPageVariant.php @@ -103,7 +103,7 @@ public function build() { $title = $this->t('Place block in the %region region', ['%region' => $region_name]); $operations['block_description'] = [ '#type' => 'inline_template', - '#template' => '
{{ link }}
', + '#template' => '
{{ link }}
', '#context' => [ 'link' => Link::createFromRoute($title, 'block.admin_library', ['theme' => $theme_name], [ 'query' => $query, diff --git a/core/modules/block_place/src/Tests/BlockPlaceTest.php b/core/modules/block_place/src/Tests/BlockPlaceTest.php index 55acc02..b4d5a9a 100644 --- a/core/modules/block_place/src/Tests/BlockPlaceTest.php +++ b/core/modules/block_place/src/Tests/BlockPlaceTest.php @@ -46,7 +46,7 @@ function testPlacingBlocks() { parse_str($query_string, $query_parts); $this->assertFalse(empty($query_parts['destination']), 'Destination query string is set in href'); /* Get the text inside the div->a->span->em */ - $demo_block = $this->xpath('//div[@class="block-region demo-block"]/a[text()="Place block"]//em[text()="' . $name . '"]'); + $demo_block = $this->xpath('//div[@class="block-place-region"]/a[text()="Place block"]//em[text()="' . $name . '"]'); $this->assertEqual('1', count($demo_block), 'Found one matching DIV including the region name: ' . $name); } diff --git a/core/themes/stable/css/block_place/block-place.css b/core/themes/stable/css/block_place/block-place.css index b4b8ae9..85cd8c9 100644 --- a/core/themes/stable/css/block_place/block-place.css +++ b/core/themes/stable/css/block_place/block-place.css @@ -1,29 +1,26 @@ -.block-region { - background-color: #ff6; - padding: .75em 1em; +.block-place-region { + background: #ffff66; + border: 1px dotted #9f9e00; + font: 90% "Lucida Grande", "Lucida Sans Unicode", sans-serif; + margin: 5px; + padding: 5px; text-align: center; + text-shadow: none; } -.block-region a { +.block-place-region a.button { white-space: nowrap; + color: #3a3a3a; } -/* - * Styling for toolbar icon. - */ -.toolbar .block-place-toolbar-tab.is-active { - background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.25) 20%, transparent 200%); - background-image: linear-gradient(rgba(255, 255, 255, 0.25) 20%, transparent 200%); +.featured-top .block-place-region { + font-size: 0.55em; } -.toolbar .toolbar-bar .block-place-toolbar-tab { - float: right; +.header .block-place-region { + width: 500px; } -[dir="rtl"] .toolbar .toolbar-bar .block-place-toolbar-tab { - float: left; -} -.toolbar-bar .toolbar-icon-place-block-active:before { - background-image: url(../../images/core/icons/ffffff/place-block.svg); -} -.toolbar-bar .toolbar-icon-place-block-inactive:before { - background-image: url(../../images/core/icons/bebebe/place-block.svg); + +.region:hover { + outline: 1px dashed #9f9e00; + } diff --git a/core/themes/stable/css/block_place/block-place.css b/core/themes/stable/css/block_place/block-place.icons.theme.css similarity index 83% copy from core/themes/stable/css/block_place/block-place.css copy to core/themes/stable/css/block_place/block-place.icons.theme.css index b4b8ae9..5eaf23c 100644 --- a/core/themes/stable/css/block_place/block-place.css +++ b/core/themes/stable/css/block_place/block-place.icons.theme.css @@ -1,13 +1,3 @@ -.block-region { - background-color: #ff6; - padding: .75em 1em; - text-align: center; -} - -.block-region a { - white-space: nowrap; -} - /* * Styling for toolbar icon. */ diff --git a/core/themes/stable/stable.info.yml b/core/themes/stable/stable.info.yml index 118cf78..9fbe2fe 100644 --- a/core/themes/stable/stable.info.yml +++ b/core/themes/stable/stable.info.yml @@ -12,10 +12,15 @@ libraries-override: css: theme: css/block.admin.css: css/block/block.admin.css + block_place/drupal.block_place: css: theme: css/block-place.css: css/block_place/block-place.css + block_place/drupal.block_place.icons: + css: + theme: + css/block-place.icons.theme.css: css/block_place/block-place.icons.theme.css ckeditor/drupal.ckeditor: css: