Generate list instead of div items in sidebar by GuillaumeGomez · Pull Request #93780 · rust-lang/rust (original) (raw)
It's usually best to avoid the :not()
selector.
But also, I'm surprised you needed to add this. The existing .block { margin-bottom: 2em }
rule should have been enough.
Looking at the HTML, it looks like the whole first part of the sidebar (items on this page) is contained in a single .block
. But down below, for items in this module, there's a separate block for each heading. So the structure is like:
<div class="block <foo>">
<h3>...</h3>
<ul>...</ul>
</div>
We should make the structure up above the same, so there is a separate block for each heading plus the <ul>
underneath it. Then you won't need the extra CSS rule here, and the format of the HTML will be more consistent.