Just one detail. Instead of using classes like @class="icon-newest", I believe we should use classes like @class="icon newest". Reason?Arty wrote: Currently <img> tags are used in code for last post and newest post icons, like this:If imageset wouldn't exist anymore, that code could be changed to something like this:Code: Select all
<!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF -->
and would require adding something like this to css:Code: Select all
<!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}" class="icon-newest">{L_NEWEST_POST}</a> <!-- ENDIF -->
That would get rid of <img> tag and put meaningful text instead of it. After applying that css it would look the same as it used to.Code: Select all
.icon-newest { display: inline-block; background: url(newest.png) 0 50% no-repeat; width: 0; /* padding is used for width */ height: 10px; /* image height */ padding-left: 11px; /* offset text to hide it, equal to image width */ overflow: hidden; /* hide text */ }
We, for any reason, may want to apply some specific style to all icons no matter which they are. Instead of repeating the styling for each style or use a huge list of ',,,,,' for each icon, we can just use the selector ".icon".
I don't know if this applies but imagine that you want all icons to be inline-blocks with overflow hidden. You may do something like this:
Code: Select all
.icon {
display: inline-block;
overflow: hidden; /* hide text */
}
Code: Select all
.icon {
display: inline-block;
overflow: hidden; /* hide text */
}
.icon.newest {
display: block;
}
Extra: With this we may be able to save some chunks of CSS code and bandwith
Here I'm talking about icons but this applies to anything we create with this way of thinking but that is away from the purpose of this RFC.