Hi all
I'm in the process of updating old style sheets on an enormous site with
lots of legacy bad code. The goal of this css update is to make the shift
seamless, yet offer new features for programmers to begin coding the content
section with semantic markup. As we move towards css-based layout the code
will be in better condition for transferring.
Here are a few lessons I've learned.
When the body tag is filled with link definitions, avoid placing colors in
the style sheet. The first draft of the style sheet copied these colors (a
{color:#069;}-just and example). However, we began noticing conflicts with
various elements that had spans and font colors assigned. Once again, the
goal was to keep the shift seamless for now.
Don't assign text decoration, bold, color, etc to the a tag. This was
causing issues with elements that were wrapped in <a name=""> tags.
Therefore, I needed to minimize my link styles and apply them to a:link,
a:visited, etc.
When dealing with pages that do not have id's associated with chunks, look
for commonly repeated nested classes.
For instance, I was able to target a section that was commonly marked up
with <a class="fontsize"><span class="textdecoration">blah....
It would have been easier to say #headline but instead it was a.fontsize
.textdecoration {blah}
When introducing new, properly marked up data tables, we're giving them a
class and all new table styles are only applied to that class of tables.
There are more lessons that we've learned from this and I will post them to
my blog www.tdrake.net within the month. I just had the itch to send out a
few tips while I had a breather.
Ted
www.tdrake.net
******************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************