You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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: gaiaclass: invert--># Invert color---<!-- _class: lead --># Invert color?---# Invert color
The 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 --> adds lead class into the inherited class.
<!-- _class: -invert --> removes invert class 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.
The text was updated successfully, but these errors were encountered:
More control over classnames (as described here: marp-team#233).
```js
var class = "invert pink embed"; // => "invert pink embed"
var class = "invert -pink embed"; // => "invert embed"
var class = "invert -pink embed +pink"; // => "invert embed pink"
```
More control over classnames (as described here: marp-team#233).
```js
var class = "invert pink embed"; // => "invert pink embed"
var class = "invert -pink embed"; // => "invert embed"
var class = "invert -pink embed +pink"; // => "invert embed pink"
```
jr-k
added a commit
to jr-k/marpit
that referenced
this issue
Oct 27, 2023
More control over classnames (as described here: marp-team#233).
```js
var class = "invert pink embed"; // => "invert pink embed"
var class = "invert -pink embed"; // => "invert embed"
var class = "invert -pink embed +pink"; // => "invert embed pink"
```
For now,
class
directive is just meaningsetAttribute('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 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 -->
addslead
class into the inherited class.<!-- _class: -invert -->
removesinvert
class 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.The text was updated successfully, but these errors were encountered: