Skip to content

Remove dollar prefix alias for global directive #182

@yhatt

Description

@yhatt

Recently I saw some media that introduces Marp ecosystem with the wrong how to use $ prefix.

Some media are explaining that <!-- $backgroundColor: #ff8800 --> can change background color in the whole of slides, but it's not true. $ prefix is just an alias into the unprefixed directive and only for global directives: theme, style, and headingDivider. In fact, $ prefix for local directives is invalid. $backgroundColor would never affect the view of slide.

The dollar prefix in Marpit's global directive is for keeping compatibility with the old Marp app and reducing some troubles while migration. (We recognize there are some people still cannot move to brand-new Marp from the old app like marp-team/marp-cli#85)

However, it brings Marp user misunderstanding for the new syntax as a fact. We had better discard the old syntax once in a while.

It may give bigger impact than we think, so we should allow to provide escape hatch by defining dollar-prefixed custom directives.

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