I'm learning jQuery and using it with Joomla, which has huge style
sheets. Things that worked in my simple HTML training page didn't in
Joomla, due to CSS conflicts. I realized that although its use is
discouraged in a style sheet, !important makes things a lot easier if
I use it in my small jQuery CSS classes. After all, they're being
created and destroyed on the fly, so you're not littering your static
CSS with !important or with truly conflicting CSS, and the jQuery
rules only get activated when they're called. And sometimes, changing
the static CSS to not conflict is very involved, or even means
changing a simple jQuery to something more complicated. So I threw the
standards out the window. For dynamic CSS classes, !important comes in
whenever I have an involved CSS conflict I don't bother trying to
redesign a deep-buried rule in a huge style sheet.

Reply via email to