-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Since we’re creating a new value for element
in #2, i was wondering how all
could be used without once
-
all
: generate an element with all the elements with theposition
property with the right value for the variable. -
once
: only draw the element once and then forget about it.
This would let an author reuse a whole set of content for all the book. So, for instance, we could have book tabs using the following code:
h2 {
string-set: sideTitles contents;
}
@page {
@right-center {
content: element(sideTitles, all);
}
}
This would also allow for all
(without once
) that would repeat all the elements on all the pages (or all the named paged). A good use case for that would be printed tabs for scholar books or dictionary without any custom specifc or complex elements.
note String-set only keeps the content of an element and retains no tags of it (no italic, bold, etc. — at least in paged.js) We may want to change that at some point to get the
innerHTML
instead of thetextContent
.
note i used string-set by oviously running would be better, or some other way to clone a content.
we could do the same with once, to use the value of an element only once
, but i haven’t found a use case for that yet outside of experimental graphic design experiment / practice.