[Phpmyadmin-devel] Duplicate code in CSS themes

Michal Čihař michal at cihar.com
Mon May 14 14:42:57 CEST 2012


Hi

Dne Mon, 14 May 2012 13:11:16 +0100
Rouslan Placella <rouslan at placella.com> napsal(a):

> I mentioned a few days ago that I'm already working on this, thought I 
> didn't get into details, so here's my plan.

Well I had some mail backlog so I managed to read your mail just after
sending mine :-).

> I will merge theme_left with theme_right first (we'll only have one 
> frame in 4.0). Then split the resulting file into smaller files, e.g.: 
> common.css, pmd.css, gis.css, rte.css, etc...
> The idea here is to make the css files more managable, right now it 
> looks to me like everyone just appends new stuff at the bottom of our 
> huge files creating an ever bigger mess out of them.
> 
> Then all of the resulting files will be reassembled back into a single 
> file by the Theme class at run time and sent to the browser along with a 
> cache header.
> 
> As far as the code duplication goes, the idea is to make all of the new, 
> smaller, css files overridable. So only the default theme will include 
> all the css files and if another theme is selected and it, for example, 
> only has a common.css file, all the other files will be included from 
> the default theme.
> 
> I think that this approach will both minimise code duplication and 
> improve the maintainability of CSS files.

I think this is really good approach.

-- 
	Michal Čihař | http://cihar.com | http://blog.cihar.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20120514/ba7eeeb2/attachment.sig>


More information about the Developers mailing list