Hevea optimizes (option: -O) out some CSS classes that use
pseudo-element selectors; without optimization the generated
HTML code is fine.
Here comes an example:
\documentclass{article}
\usepackage{hevea}
\newstyle{:root}{--initialcapwidth: 60\%}% not optimized away
\newstyle{.initialcap}{margin: auto; width: var(--initialcapwidth)}
%% Bug: next two newstyles are evicted by the optimizer (`-O').
\newstyle{.initialcap::first-letter}{font-size: 250\%}
\newstyle{.initialcap::first-line}{line-height: 120\%}
\newenvironment{initialcap}{\begin{divstyle}{initialcap}}{\end{divstyle}}
\begin{document}
\begin{initialcap}
Well, you know or don't you kennet or haven't I told you every
telling has a taling and that's the he and the she of it. Look,
look, the dusk is growing! My branches lofty are taking root. And
my cold cher's gone ashley. Fieluhr? Filou! What age is at? It
saon is late.
\end{initialcap}
\end{document}
Classes :root and .initialcap survive the optimization phase,
whareas .initialcap::first-letter and .initialcap::first-line are lost.
Hevea optimizes (option:
-O) out some CSS classes that usepseudo-element selectors; without optimization the generated
HTML code is fine.
Here comes an example:
Classes
:rootand.initialcapsurvive the optimization phase,whareas
.initialcap::first-letterand.initialcap::first-lineare lost.