Skip to content

Support utility classes in the "metastring" of code examples #735

@simurai

Description

@simurai

Is your feature request related to a problem? Please describe.

Some of the docs examples need a certain "setup". Like adding extra padding because the component has absolutely positioned parts that would otherwise get cut off.

Describe the solution you'd like

It would be great if Primer utilities could be added to the fenced code blocks and then be used when rendering the code example. For example

```html p={4} 

would add extra padding to the example.

Describe alternatives you've considered

An alternative would be to add a wrapper element with some padding, but that clutters up the example and might not wanted when copy & pasting.

Additional context

See #725 (comment) for more infos.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions