Skip to content

Styles: audit utility classes generated on the frontend #41993

@ramonjd

Description

@ramonjd

For auditing and to kick off a discussion, here is a (probably incomplete) list of styles Gutenberg generates for frontend code:

Classname Variations Description Status
is-${ orientation } vertical, horizontal layout current
is-content-justification-${ justification } center, left, right layout current
is-nowrap - layout current
is-layout-${ layout } flex, flow constrained layout current updated
has-background - block supports current
has-${ preset }-background-color Any color preset slug block supports current
has-${ preset }-gradient-background Any gradient preset slug block supports current
has-border-color - block supports current
has-${ preset }-border-color Any color preset slug block supports current
has-${ preset }-font-size Any font size preset slug block supports current
has-${ preset }-font-family Any font family preset slug block supports current
has-text-color - block supports current
has-${ preset }-color Any color preset slug block supports current
has-text-align-${ alignment } center, left, right text blocks current
has-inline-color text blocks
has-${ spacing }-spacing-size Any spacing preset slug block supports current
has-icon - icon current
wp-elements-${ unique_id } ${ element_tag } Unique id + element tag name selector, e.g., .wp-elements-123 a block supports current
wp-container-${ unique_id } Unique id layout current
wp-duotone-${ filter_id } img The id is a reference to the duotone filter id block supports current
wp-block-${ block_name } The block name without core/ prefix blocks current
wp-site-blocks - template wrapper current
wp-element-caption - elements current
wp-element-button - elements current

cc @apeatling @mtias

Metadata

Metadata

Assignees

No one assigned

    Labels

    CSS StylingRelated to editor and front end styles, CSS-specific issues.[Type] OverviewComprehensive, high level view of an area of focus often with multiple tracking issues[Type] Tracking IssueTactical breakdown of efforts across the codebase and/or tied to Overview issues.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions