Skip to content

Add additional block supports to enhance functionality #276

@kymberlyhaugen

Description

@kymberlyhaugen

Currently, the FontAwesome block allows a user to set a color for the icon in the popup that appears after clicking the Icon Styling button in the toolbar. The user is also able to set a background color using the WordPress default block support for Color -> Background.

Image

It would be more consistent with the WordPress editing experience for the user to set the text and background color in the same place.

If the Color -> Background support is enabled, this also allows WordPress to warn the user if the colors they have chosen would violate accessibility regulations.

Image

May I suggest to also enable these supports as well?

  • Typography -> Font Size
    This would allow users to pick the icon size in a manner consistent with the other blocks (paragraph, headings, etc).

  • Shadow
    Would me most useful if the user had also chosen a background color, but would be nice to have.

  • Border -> Color/Style/Width/Radius
    Allow users to add borders around the icons in a manner consistent with the other blocks that allow borders.

This these options enabled, users can further style their icons without additional wrappers and blocks.

Image

I tested these options by using a filter to update the block supports and did not encounter any issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions