Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-33584

Remove !important from modchooser CSS

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a bug
    • Icon: Minor Minor
    • None
    • 2.3
    • Themes
    • MOODLE_23_STABLE

      Follow on from MDL-33482

      Some !important rules have come into play. The solution is probably similar to that in MDL-33218.

      Sam H is the guru here, and so I quote from another issue on why its important (geddit!):
      "Umm !important is really bad (well to the world of theme development at least)

      There has to be a better solution than introducing more !important rules in the base theme.
      We've used them presently only in situations where there has been no other viable solution (of the 4 users in base presently 1 is for ie6 and 2 are for RTL YUI bugs). It would be a shame to start introducing more now.
      They represent a theme nightmare, in order for people to customise things they must recognise that !important rules are being applied and also apply them, in the long run can lead to serious confusion and uncontrollable CSS (because !important is everywhere and there is no way to force things anymore).
      !important is designed to give priority to a CSS selector against its natural order of inheritance, it doesn't mean we should use it to force things, in fact really its better we don't use them at all so that themers if they feel the need can to introduce rules that would not otherwise have priority but still have them applied because through use of !important.
      Certainly my +1 goes to removing all of these new !important rules and correcting the CSS. This will help keep our theme's maintainable in the long run, and help keep things easier for theme developers... unless there is a good reason to keep them I havn't studied it, just noticed the !important properties creeping in."

            lazydaisy Mary Evans
            poltawski Dan Poltawski
            Sam Hemelryk Sam Hemelryk
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.