-
-
Notifications
You must be signed in to change notification settings - Fork 65
Description
For now, class directive is just meaning setAttribute('class', 'xxxxxx') so assign the specified value into the slide as is. The problem is removing inherited class unless re-assign the class manually.
When setting the whole of color scheme by class, it may lose the color if changed the layout in a part of slide via _class spot directive.
<!-- The example based on Marp Core -->
<!--
theme: gaia
class: invert
-->
# Invert color
---
<!-- _class: lead -->
# Invert color?
---
# Invert colorThe second page has lost invert color.
Proposal
Marpit recognizes + and - prefix in each of class names, and manipulate inherited class based on the operator. Don't require to know the inherited class.
<!-- _class: +lead -->addsleadclass into the inherited class.<!-- _class: -invert -->removesinvertclass from the inherited class.
It works on local directives and spot directives.
By this change, the class name beginning from specific operators cannot use in Marpit. Beginning + and - are valid as HTML class but not common because + requires to escape character in CSS definition.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status