Hi all, I'm trying to get some strategy nailed down so that I can more
effectively fix bugs where I work.  A lot of what we do needs to be
backwards compatible.  I've got access to the html and sometimes I've
updated (changed) classes or removed classes from existing markup in order
to fix bugs.
Perhaps a simple example might suffice

Existing HTML

div id = events class = module

New HTML

div id = eventsModule

Lets say in the example the class "module" was wrongly applied to the div
originally, and let's say that the "module" class carries with it a bottom
margin of 12px.  The bug says that there's too much space below the div it
should be 5px.

So, I determine that even though this is a module (the events module) it
doesn't share the common bottom margin of 12px that all modules share (and
for the sake of simplicity here let's say that's all .module has attributed
to it).

As a practice we don't string classes/id's together in the css as to avoid
IE6 bugs, eg #events.module

So let's say I take the route as noted above and I fix the bug by using this
html:

div id = eventsModule

and the css

#eventsModule - margin bottom 5px

This change has broken backwards compatibility right?

To maintain backwards compatibility would the only solution be to do the
following?

div id = events class = module

#events - margin bottom 5px

In which #events would trump .module in specificity

Sorry if this seems a bit stupid but I'm having a hard time grasping making
sure my code is backwards compatible.

TIA

_c

-- 
iron sharpens iron
______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to