Skip to main content
Topic: Feature removal! Yay! (Read 7555 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Feature removal! Yay!

I was looking at the way alternating quote classes are coded in Subs.php. At the moment there is code for alternating blockquote classes, but no code for alternating the quoteheader classes. This is a bit self-defeating, IMHO. Take the current quote styling here.

Quote from: Samuel L IpsumDo you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it?
That has background and border styling for the header, as well as for the quote body. If you try to use alternating quote backgrounds/borders/whatever, you'll probably have to use a style that doesn't have any background/border/whatever on .quoteheader, otherwise it will look like rubbish.

So, there are two possible fixes. First is to add additonal code to allow alternating styling of .quoteheader. That complicates something that is already, arguably, more complex than it needs to be. Second option is to remove the Subs.php code for alternating quote styling, and just call them all .bbc_quote, which has the benefit of simplfying the CSS and the markup.

You could trim this:
Code: [Select]
/* A quote, perhaps from another post. */
.bbc_standard_quote, .bbc_alternate_quote {
overflow: auto;
margin: 0 0 1em 0;
padding: 6px 10px;
border: 1px solid #ccc;
border-top: none;
background: #fff;
font-size: 0.9em;
box-shadow: 2px 2px 2px #bbb;
}

/* Stop em compounding when elements are nested. */
.bbc_standard_quote .bbc_alternate_quote, .bbc_alternate_quote .bbc_standard_quote,
.bbc_standard_quote .bbc_code, .bbc_alternate_quote .bbc_code, .bbc_standard_quote .codeheader,
.bbc_alternate_quote .codeheader, .bbc_standard_quote .quoteheader, .bbc_alternate_quote .quoteheader,
/* And for quote inside small text areas, like the topic summary. */
#topic_summary .bbc_standard_quote, #topic_summary .bbc_alternate_quote ,
#topic_summary .bbc_code, #topic_summary .codeheader, #topic_summary .quoteheader {
font-size: 1em;
}

....down to this:
Code: [Select]
/* A quote, perhaps from another post. */
.bbc_quote {
overflow: auto;
margin: 0 0 1em 0;
padding: 6px 10px;
border: 1px solid #ccc;
border-top: none;
background: #fff;
font-size: 0.9em;
box-shadow: 2px 2px 2px #bbb;
}

/* Stop em compounding when elements are nested. */
.bbc_quote .bbc_quote .bbc_quote .quoteheader,
 .bbc_quote .bbc_code, .bbc_quote .codeheader,
/* And for quote inside small text areas, like the topic summary. */
#topic_summary .bbc_quote, #topic_summary .quoteheader,
#topic_summary .bbc_code, #topic_summary .codeheader {
font-size: 1em;
}

...which IMO looks a lot less 'orrible. :D

I like this idea. I think the whole alternating backgrounds thing is a bit 1990's and not really necessary or desirable, at least for quotes. Also, if someone really wants to do it, they can always use CSS3 nth-child() to do their own alternating styles, without us having to clutter Subs.php or the default CSS.

Removing the code from Subs.php and index.css is easy. The only catch is backwards compat, as always. It would require a query to go through the messages and pm's tables and change the classes of quotes in stored messages. I don't see that as a real problem though. The query itself should be easy to write, and any current Elk installations shouldn't be hard to run it on. Conversions from other forum apps will need all sorts of queries run anyway, so again I can't see it being a problem (as long as someone remembers).

I think doing this would be better than the current half-baked system, and better than complicating the current system further in an attempt to provide functionality that nobody is likely to need or want.

So there ya go. We can haz less bloatz. :)
Master of Expletives: Now with improved family f@&king friendliness! :D

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

Re: Feature removal! Yay!

Reply #1

Here's my opinion on the whole thing.... Your absolutely right!

I'd rather nth-child it I need it, rather than have a bunch of unnecessary bloat in those files. The default theme should be more minimal anyway.

Re: Feature removal! Yay!

Reply #2

Quote from: Antechinus – The only catch is backwards compat, as always. It would require a query to go through the messages and pm's tables and change the classes of quotes in stored messages. I don't see that as a real problem though. The query itself should be easy to write, and any current Elk installations shouldn't be hard to run it on. Conversions from other forum apps will need all sorts of queries run anyway, so again I can't see it being a problem (as long as someone remembers).
Elk release is 1.0, so there's no backwards compability needed at all (except for this forum).
SMF migration will most likely need a full converter / importer, 'cause we have IMHO changed far too much for a simple upgrade process. The messages & PMs body needs some tweaking anyway, so we could do that all at once... (UTF-8 fixes. other incompabilities...)
Thorsten "TE" Eurich
------------------------