Skip to content

Feature Request: Inject CSS classes into generated HTML tags via CLI annotations #2

@wroyca

Description

@wroyca

CLI supports inline HTML generation using markup like:

\h1#intro|Introduction|

Which produces:

<h1 id="intro">Introduction</h1>

It would be helpful to extend this syntax to allow specifying one or more CSS classes. For example:

\h1#intro.foo.bar|Introduction|

Would generate:

<h1 id="intro" class="foo bar">Introduction</h1>

An alternate format using brackets could also work:

\h2#overview[.section-heading wide]|Overview|

Output:

<h2 id="overview" class="section-heading wide">Overview</h2>

CLI already assigns custom classes in some cases (e.g., preface), so it’s clear that there’s already value in providing class-level control; let me know your thoughts!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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