There are duplicate items in css files, leftovers from IE 5/6 support that are no longer needed, leftovers from imageset -> css conversion. All of that makes code a bit messy.
Proposal
I propose to clean up prosilver files. Stuff to be cleaned up:
- Duplicate color values
- Duplicate entries for former imageset items that are not used by prosilver
- Merge of former imageset specific items that are wrapped into link (see example #1)
- Reuse class names for former imageset items that have same dimensions, like "icon newest" "icon latest"
- Completely remove css tweaks
- Add "phpbb" selector to root phpBB element (<body> by default), making integration of forum into custom layouts easier
- Change to proper css reset instead of current
* { margin: 0; padding: 0; }
Example #1:
From viewforum_body.html:
Code: Select all
<a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a>
Code: Select all
<a href="{topicrow.U_MCP_QUEUE}"><span class="imageset imageset-unapproved">{L_UNAPPROVED_TOPIC}</span></a>
That should be changed to
Code: Select all
<a href="{topicrow.U_MCP_QUEUE}" class="imageset imageset-unapproved">{L_UNAPPROVED_TOPIC}</a>
CSS Tweaks. They aren't really needed. The only browsers that require them are IE 7 and IE 8. Current tweaks.css has tweaks for IE 5.5 and IE 6 that are no longer needed. All CSS tweaks become obsolete by replacing this line in overall_header.html
Code: Select all
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
Code: Select all
<!--[if lt IE 8]><html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" class="ie oldie ie7"><![endif]-->
<!--[if IE 8]><html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" class="ie oldie"><![endif]-->
<!--[if gt IE 8]><html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" class="ie"><![endif]-->
<!--[if !(IE)]><!--><html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}"><!--<![endif]-->
Code: Select all
.whatever { stuff for all browsers }
.ie .whatever { stuff for all IE 9 and older }
.oldie .whatever { stuff for IE 8 and older }
.ie7 .whatever { stuff for IE 7 }
Pros
Code will be much cleaner.
Cons
It breaks compatibility with 3.0. I think its not a problem, with number of changes applied to prosilver, it will be easier to redo style from 3.1's prosilver than to apply code changes from 3.0. to 3.1, making compatibility point moot.
Notes
I suggest to submit several patches for different parts of code clean up: color values in one patch, imageset leftovers in other patch, outdated css tweaks in third patch, etc.
Tickets and patches
- CSS Reset: ticket, pull request - merged
- Removing duplicate colors: ticket, pull request - merged
- Updating CSS tweaks: ticket, pull request - merged