Page 1 of 1

[rant] Please use existing CSS classes in your MOD blocks !

Posted: Sat Nov 05, 2011 5:55 pm
by Ishimaru Chiaki
Hello,

As a Style author, I come here for a little rant : For the sake of style authors and phpBB users, please use existing CSS classes in your blocks that are added by your MODs.

Why, you'd ask me ? Because when these classes (.panel, .bg1, .bg2, .bg3, …) aren't used in your Mods, the blocks colors cannot adapt themselves to the style changes and thus, cause colour bugs that might make some texts unreadable, especially for styles that use a dark background with light-coloured blocks like my pro_ubuntu_lucid does !

Examples of MODs with the problems :
- Social Network
- MChat
- board3portal

Because of this, especially in the case of Social Network, a LOT of adaptation is needed to make this MOD compatible with the styles such as pro_ubuntu_lucid, because this MOD only uses custom classes for its blocks ! If this continues like this, I'll have to create GitHub repos just for adaptations because not all phpBB users are HTML/CSS cracks !

So please, use custom classes for CSS properties that aren't related to colours, and existing CSS properties (.panel, .bg1, .bg2, .bg3, .forumbg, .forabg) for colour scheme ! By doing this, your MOD will be more flexible towards style change !

And for MOD validators, I suggest this to be added as a good practice advice.

That was my two cents.

Ishimaru

Re: [rant] Please use existing CSS classes in your MOD block

Posted: Sat Nov 05, 2011 9:08 pm
by tbackoff
I don't speak for the MOD team, but I know that MODs are validated with the default prosilver (and subsilver if instructions are included?). It's not required to work with other styles. That being said, I do see some benefit to using the classes already shipped with phpBB (and I wonder why some MOD Authors don't use them - it's just more work for them). I just thought I'd pop in and mention that. ;)

Re: [rant] Please use existing CSS classes in your MOD block

Posted: Sun Nov 06, 2011 10:55 am
by !karolis
Very good rant.

Re: [rant] Please use existing CSS classes in your MOD block

Posted: Sun Nov 06, 2011 11:58 am
by doktornotor
Thanks to the OP for the post. I am using a custom style for everyone on my board; so, I am modifying every single mod install to include edits for that style. This is extremely annoying thing indeed.

Re: [rant] Please use existing CSS classes in your MOD block

Posted: Sun Nov 06, 2011 8:12 pm
by javiexin
I think one of the major reasons for this is, probably, the lack of proper documentation and tutorials/guides to help new mod writers to do it with the most appropriate guidelines in mind to facilitate this cross-style development.

Good tutorials would probably help... As on a lot of other phpbb modding aspects.

-javiexin

Re: [rant] Please use existing CSS classes in your MOD block

Posted: Mon Nov 07, 2011 4:41 am
by Ishimaru Chiaki
javiexin wrote:I think one of the major reasons for this is, probably, the lack of proper documentation and tutorials/guides to help new mod writers to do it with the most appropriate guidelines in mind to facilitate this cross-style development.

Good tutorials would probably help... As on a lot of other phpbb modding aspects.

-javiexin
After I read your post, I started working on a doc about cross-style compatibility. Here's a draft of it : http://ishimaru-design.servhome.org/tes ... 0&p=51#p51
Don't hesitate to report me spelling/grammar/whatever error, for English isn't my mother tongue.

Re: [rant] Please use existing CSS classes in your MOD block

Posted: Mon Nov 07, 2011 7:03 pm
by javiexin
Great tutorial on colour cross-compatibility. I think this should be well publicized.

One more thing: I would recommend to give specific examples of "correct" reuse of the default classes in certain MODs, and corresponding incorrect examples. But anyhow, even as it is, should be recommended reading :)

Thanks!
-javiexin

Re: [rant] Please use existing CSS classes in your MOD block

Posted: Mon Nov 07, 2011 7:27 pm
by Ishimaru Chiaki
javiexin wrote:Great tutorial on colour cross-compatibility. I think this should be well publicized.

One more thing: I would recommend to give specific examples of "correct" reuse of the default classes in certain MODs, and corresponding incorrect examples. But anyhow, even as it is, should be recommended reading :)

Thanks!
-javiexin
I can use my "introduce yourself" MOD (not yet published - still under evaluation for phpBB-fr.com's latest MOD contest) for the example. In this MOD, I used the .rules class for the warning message to users who haven't introduced themselves.

EDIT : Done !

Re: [rant] Please use existing CSS classes in your MOD block

Posted: Mon Nov 07, 2011 11:44 pm
by Sajaki
webdesigners <> php coders (speaking for myself actually). So thanks for the hints. a prosilver css guide would be most welcome actually.