Skip to main content
Topic: Releasable state (Read 17614 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Releasable state

Reply #1

Speaking of releasable states and other such terrifying prospects, I have been taking a quick look at the state of the CSS in the latest Elk and SMF builds. Bugger all difference since I last worked on them. :P

Anywayz, the size of index.css is getting is bit silly. I reckon it would be possible to come close to halving it if people were prepared to get ruthless/sensible.

The theme I did recently (1.1.x + TP) has CSS3 eye candy and looks quite swish. It needs comprehensive CSS to run all its templates, since there's hardly any 1.1.x markup left in it. It also needs CSS for the portal bits (hardly any TP markup left in that either) and it also also also haz the obligatory FarceBook/Twitter/YouTube/RSS icons and (but wait, there's more) a custom three column footer with nifty lynx n stuff. Oh four background options and drop menus for Africa (haz the user info droppies in posts too) and probably some other stuff I forgot.*

So with all of that crud infesting it, the thing still only needs one CSS file to run the lot (including admin, but not counting the alternative layouts) and it's only 52 kb, without minifying and without any attempt at trimming it. Could probably knock it down a bit without much trouble.

So I'm looking at the Elk and SMF 2.1 files and thinking WTF? :o

*ETA: Just looking through it quickly, other stuff I forgot includes custom CSS for my memberlist mod (around 170 lines of) plus 30 lines of CSS to provide no-javascript fallback for the click menus.
Last Edit: June 08, 2013, 02:58:27 am by Antechinus
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Releasable state

Reply #2

The CSS files are still considered WIP, I'll clean them ASAP..
Thorsten "TE" Eurich
------------------------

Re: Releasable state

Reply #3

Yeah I made them bigger, but didn't get to the stage of reassessing it all to rationalise them. Plus a lot of it was trying to do something without changing 2.0.x markup much. If you don't mind trimming markup to something more sensible, and don't have as much differentiation between content areas, you could save quite a bit.

I used the same basic markup for board index, info centre and message index lists, and styled them so they all look much the same, so that saves on CSS too. I actually like that look better too. I'm kinda over the old idea of every area having to look like it belongs to a different site. It's all just content, really.

*ETA: Oh and Display.template.php markup could be simplified too. That was one of the things I intended to do. Way too many divs for what it does (inherited from 2.0.x).
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Releasable state

Reply #4

Speaking of Display.template.php I ended up doing it like this (for the actual posts):

Code: [Select]
// Time to display all the posts (shortened version for clarity)
    // Get all the messages...
    while ($message = $context['get_message']())
    {
        echo '
            <li class="', $message['alternate'] == 0 ? 'windowbg' : 'windowbg2', '">
                <ul class="poster tabs_list" role="menu">
                    <li> li stuff to suit, including extra ul for droppies, etc </li>
                </ul>
                <div class="post_wrapper">
                    <span class="post_subject">', $message['subject'], '</span>
                    <h5 id="subject_', $message['id'], '"> lotsa stuff </h5>
                    <div class="post">', $message['body'], '</div>
                    <div class="attachments"> stuff </div>
                    <ul class="quickbuttons tabs_list" role="menu"> buttony stuff </ul>
                    <div class="signature"> stuff </div>
                </div><!--End post_wrapper-->
            </li>';

So that skips as many superfluous wrappers and whatever as possible, and just uses the essential block level elements. Works well. :)

The old 2.0.x crud puts extra divs all over the place, just to wrap block level elements that don't need wrapping. Can't remember why it was done like that, but it's sure not optimal.
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P