Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimizer drops some pseudo-element selectors. #31

Open
cspiel opened this issue Jul 17, 2020 · 0 comments
Open

Optimizer drops some pseudo-element selectors. #31

cspiel opened this issue Jul 17, 2020 · 0 comments

Comments

@cspiel
Copy link
Contributor

cspiel commented Jul 17, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant