Skip to content

Visibility issues for some icons #51

Description

@bobbingwide

Problems with Columns variations icons

In earlier versions of Gutenberg certain icons appear differently in the editor than in the front end.
eg Columns variations.
image
In the block editor the icons are not filled with black
image

Problem with Comment Author Name icon

With Gutenberg 11.9.0 the icon for the new Comment Author Name block is visible in the block icon block in the editor but not in other blocks nor on the front end.

The SVG for the Comment Author Name block is

<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="#FFFFFF" role="img" aria-hidden="true" focusable="false"><path d="M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z" fill-rule="evenodd" clip-rule="evenodd"></path><path d="M15 15V15C15 13.8954 14.1046 13 13 13L11 13C9.89543 13 9 13.8954 9 15V15" fill-rule="evenodd" clip-rule="evenodd"></path><circle cx="12" cy="9" r="2" fill-rule="evenodd" clip-rule="evenodd"></circle></svg>

Here we see the fill='#FFFFFF' attribute on the SVG tag. For the block info block the icon is invisible.

Using the inspector and changing this value to #CCCCCC, for example, allows us to see the icon in the block editor.
Alternatively we can set a background colour.
image

This problem was originally mentioned in #50 (comment)

Requirement

  • Icons should look the same in the editor and the front end

Proposed solution

  • Discover what's needed to style icons that have the following attributes that need a little more care and attention: fill, fill-rule, cllp-rule etc
  • Implement appropriate CSS

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinghelp wantedExtra attention is needed

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions