I have some CSS that looks like:
This works. Our title is carried over to where we want it, as a string. Horray!
But now we have a case where we want to carry over the style too. Example title would look like "My <em>fancy</em> title" and we want to preserve the <em> tags.
I looked at a CSS spec that says running elements can do it?
http://www.w3.org/TR/css3-gcpm/#running-elements
I tried replacing:
( and string-set: section-title content() ... )
Clearly a dumb brute force attempt that didn't do anything. But, I'm sort of stuck.
Any ideas?
@page {
size:6in 9in;
margin: 2cm;
font-size: 9pt;
orphans:3;
widows:3;
}
@page chapter:right
{
@top-right
{
content: string(section-title, last) "\A0\A0\002D\A0\A0" counter(page);
font-family: Helvetica, Arial, sans-serif;
vertical-align: right;
}
}
.front-matter-title-wrap > h1:first-of-type,
div.chapter > h2:first-of-type,
div.back-matter > h1:first-of-type {
string-set: section-title content();
/* ... */
}
This works. Our title is carried over to where we want it, as a string. Horray!
But now we have a case where we want to carry over the style too. Example title would look like "My <em>fancy</em> title" and we want to preserve the <em> tags.
I looked at a CSS spec that says running elements can do it?
http://www.w3.org/TR/css3-gcpm/#running-elements
I tried replacing:
content: string(section-title, last) "\A0\A0\002D\A0\A0" counter(page);
to: content: element(section-title, last) "\A0\A0\002D\A0\A0" counter(page);
( and string-set: section-title content() ... )
Clearly a dumb brute force attempt that didn't do anything. But, I'm sort of stuck.
Any ideas?