In reveal.js, is it possible to make the first fragment automatically visible?
I'm hooking into the text colour highlight capability to apply a slightly brighter colour to the most recent fragment made visible, in order to focus attention on that fragment. The text reverts to normal colour when the next fragment is made visible.
If I make the first line of text a non-fragment, it appears straight away, but in the regular text colour. If I make it a fragment, I've got to advance once to make the first line appear (which is a reasonable fallback, just not my preference). The highlight colour does work when it's a fragment though.
This is some example markup:
<section>
<h2>Highlight First Line Test</h2>
<p class="fragment highlight-current">Want this line visible <i>and</i> colour highlighted on slide entry</p>
<p class="fragment highlight-current">Appears 2nd with colour highlight</p>
</section>
And the CSS override I've used to hook into the reveal.js highlight function:
.reveal .slides section .fragment.highlight-current.current-fragment {
color: #f00;
}
(I've looked at autoslide as well but can't make it do what I want).