• Welcome to Simple Machines Community Forum. Please login or sign up.
October 21, 2021, 08:45:13 PM

News:

SMF 2.1 RC4 has been released! Try it out and help us test! :) Read more.


br.clear after .topic_pages span.

Started by Antechinus, August 23, 2021, 11:18:56 PM

Previous topic - Next topic

Antechinus

August 23, 2021, 11:18:56 PM Last Edit: September 15, 2021, 01:08:33 PM by Diego Andrés
Yup. No idea why anyone thought that was a good idea. Note that this br.clear is not present if .topic_pages is not present.

If it's to clear floats or something, there are saner ways of doing it. However, the default presentation seems to be fine without it. It causes problems with some custom coding, so themers are going to hate it.*

<div class="info info_block">
<div>
<div class="icons floatright"></div>
<div class="message_index_title">
<span class="preview" title=""></span>
</div>
<p class="floatleft">
Started by spiros
</p>
<span id="pages4059703" class="topic_pages">
<span class="pages">Pages</span>
<a class="nav_page" href="https://www.simplemachines.org/community/index.php?topic=573662.0">1</a>
<a class="nav_page" href="https://www.simplemachines.org/community/index.php?topic=573662.20">2</a>
<a class="nav_page" href="https://www.simplemachines.org/community/index.php?topic=573662.40">3</a>
<a class="nav_page" href="https://www.simplemachines.org/community/index.php?topic=573662.60">4</a>
</span>
<br class="clear">
</div><!-- #topic_[first_post][id] -->
</div><!-- .info -->

* Even though they can use a CSS workaround to kill it. But if it isn't needed in the markup anyway, why make people use unnecesasry workarounds? If anyone wants to know, you can kill it like this:

/* Death to rampant muppetry! */
.topic_pages + br.clear {
    display: none;
}

Antechinus

Just got around to checking the unread functions markup on Recent.template.php, which is basically the same thing doing the same job. No unnecessary br in either of those functions, so the one in MessageIndex.template.php is just leftover crud.

It's inconsistent, and it's a PITA, so it needs to die a gruesome death.

Advertisement: