Subsubsections still take up space in TOC layout after applying: display none
Posted: Thu Jul 04, 2019 4:24 pm
Hi,
I'm trying to make subsubsections dissapear from the TOC, since the TOC would get too large otherwise.
The general structure of the TOC in the generated html file looks like this:
And in my CSS file I have added the rule:
In the output PDF file the subsubsections are actually omitted like expected. However, there is still about 1 line of whitespace left in all places where the subsubsections were.
I get the feeling that 'display: none' does not work as I expect it to work, since the whitespace does not appear when I manually remove the <div></div> of all subsubsections from the generated html file.
Thanks in advance,
Niels
I'm trying to make subsubsections dissapear from the TOC, since the TOC would get too large otherwise.
The general structure of the TOC in the generated html file looks like this:
Code: Select all
<div is-chapter="true" href="#unique_16" keys="chapter" type="topic" class="- map/topicref bookmap/chapter topicref chapter">
<div data-topic-id="chapter" class="- map/topicmeta topicmeta">
<div href="#unique_16" class="- topic/navtitle navtitle">Chapter</div>
...
...
...
</div>
<div href="#unique_21" keys="housing" type="topic" class="- map/topicref topicref">
<div data-topic-id="housing" class="- map/topicmeta topicmeta">
<div href="#unique_21" class="- topic/navtitle navtitle">Housing</div>
...
...
...
</div>
<div href="#unique_22" keys="thermo" type="topic" class="- map/topicref topicref">
<div data-topic-id="thermo" class="- map/topicmeta topicmeta">
<div href="#unique_21" class="- topic/navtitle navtitle">Thermo</div>
...
...
...
</div>
</div>
</div>
</div>
Code: Select all
*[class ~= "map/topicref"] > *[class ~= "map/topicref"] > *[class ~= "map/topicref"] {
display: none !important;
}
I get the feeling that 'display: none' does not work as I expect it to work, since the whitespace does not appear when I manually remove the <div></div> of all subsubsections from the generated html file.
Thanks in advance,
Niels