Display plus sign once on inline block create button with Stable9 theme

Created on 25 April 2023, about 1 year ago
Updated 3 July 2023, 12 months ago

Problem/Motivation

If a site is using the Stable 9 theme in Drupal 10 as a base theme, in Layout builder, the "Create custom block" link in the off-campus panel shows the "plus" sign twice.

The "plus" sign SVG is referenced in two core css files:

Line 137 of layout-builder.css applies to anchor tag:

#drupal-off-canvas .inline-block-create-button {
  display: block;
  padding: 24px;
    padding-left: 24px;
  padding-left: 44px;
  color: #eee;
  border-bottom: 1px solid #333;
  background: url(/core/misc/icons/bebebe/plus.svg) transparent 16px no-repeat;
    background-color: transparent;
  font-size: 16px;
  

And line 77 of off-canvas.css applies the same SVG to the :before pseudo-class of the anchor:

#drupal-off-canvas-wrapper .inline-block-create-button::before {
  position: absolute;
  top: 50%;
  left: var(--off-canvas-padding);
  width: var(--icon-size);
  height: var(--icon-size);
  content: "";
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16px' height='16px'%3e%3cpath fill='%23bebebe' d='M0.656,9.023c0,0.274,0.224,0.5,0.499,0.5l4.853,0.001c0.274-0.001,0.501,0.226,0.5,0.5l0.001,4.853 c-0.001,0.273,0.227,0.5,0.501,0.5l1.995-0.009c0.273-0.003,0.497-0.229,0.5-0.503l0.002-4.806c0-0.272,0.228-0.5,0.499-0.502 l4.831-0.021c0.271-0.005,0.497-0.23,0.501-0.502l0.008-1.998c0-0.276-0.225-0.5-0.499-0.5l-4.852,0c-0.275,0-0.502-0.228-0.501-0.5 L9.493,1.184c0-0.275-0.225-0.499-0.5-0.499L6.997,0.693C6.722,0.694,6.496,0.92,6.495,1.195L6.476,6.026 c-0.001,0.274-0.227,0.5-0.501,0.5L1.167,6.525C0.892,6.526,0.665,6.752,0.665,7.026L0.656,9.023z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-size: contain;
}

Steps to reproduce

Add a block in the layout builder. See duplicate "plus" sign in admin panel.

Proposed resolution

Remove the background from one of the css files.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Fixed

Version

10.1

Component

Stable 9 theme

Created by

🇺🇸United States daddison

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024