Topic: CSS selectors

Hi !
I checked to see if the topic is not discussed elsewhere, so i hope it didn't. smile

'think Paul will be the one to anwser...

I wonder why you did separate selectors in multiple categories (border, margin, etc.) instead of making one selector with all the rules in them.
I mean, i think it's a bit messy for newbies (and for people who don't code this way, i guess) who have to check all the document for each kind of selector's property.

Wouldn't it be more efficient (readable for people who don't crawl in PunBB code all day long) to group each id / class / element properties in one selector instead ?
This is just my vision, don't take it personnaly, ok ? smile
I really like the separated colors and structure CSS, though.

Is it your way of coding CSS, or is there any reason for coding like this ?

Anyway, thanks for all this great work on PunBB to all of you folks...

2

Re: CSS selectors

The reason it was done that way was because it enables people to change such things as padding and borders globally with just one setting. If say the padding setting was assigned to individual elements then you might have a dozen different elements to edit. Also it avoids duplication and keeps the file size down.

Where it gets messy is if you don't want to change all the borders or all the padding but want to make individual elements different. People don't realise they have to break up the multiple selectors and create new individual selectors to do it. It seems most people think they can style PunBB just by changing the existing stylesheets rather than by creating their own which is what I intended. I am probably going to change to the more traditional approach for version 1.3 even if it is less efficient and more time consuming to change settings globally.

Re: CSS selectors

OK.
Thanks for the answer to which i agree. smile
But my opinion stays the same. I think it's faster to edit when you already know the html code, but in other cases... arg.

Anyway, adding extra selectors at the end for general properties will do the same and increase redeability without having to change selector by selector, even if it's a bit bigger (though i'm not sure repeating each time selectors is better than cleanly code properties for each selector, i'm gonna make a study about this, so... wink ).

Nice work, indeed.
Do you guys need some help one day, in any way (if ones can) ?