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

Superscript rendering in moodle 2.0

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.3
    • Component/s: Themes
    • Labels:
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      The superscript is not aligned properly. I overrode the default settings with

      sup

      {font-size: .83em;line-height: 0.5em;vertical-align: baseline;position: relative;top: -0.4em;}

      sub

      {font-size: .83em;line-height:0.5em;vertical-align: baseline;position: relative;top: 0.4em;}

      in the general.php of the theme. The difference is clearly seen in the figures. sup1.gif is rendering in moodle.org forum and sup.gif is after adding sup directive.

        Gliffy Diagrams

        1. sup.gif
          3 kB
        2. sup1.gif
          3 kB

          Issue Links

            Activity

            Hide
            korpelainen Mauno Korpelainen added a comment -

            This looks like a terrible bug in yui reset.min.js that sets

            sup

            {vertical-align:text-top;}

            sub

            {vertical-align:text-bottom;}

            I think the best fix would be to use in base theme css

            sup

            {vertical-align:super;}

            sub

            {vertical-align:sub;}

            to oevrride yui reset code for sub and sup.

            This is supported by all browsers and it is the default behaviour of browsers for superscript and subscript.

            Current yui reset code fails miserably if you try to use tags like 2<sup>3<sup>4</sup></sup> which should render two to the power of 3 to the power of 4 but yui reset code renders it as 2 to the power of 34

            Show
            korpelainen Mauno Korpelainen added a comment - This looks like a terrible bug in yui reset.min.js that sets sup {vertical-align:text-top;} sub {vertical-align:text-bottom;} I think the best fix would be to use in base theme css sup {vertical-align:super;} sub {vertical-align:sub;} to oevrride yui reset code for sub and sup. This is supported by all browsers and it is the default behaviour of browsers for superscript and subscript. Current yui reset code fails miserably if you try to use tags like 2<sup>3<sup>4</sup></sup> which should render two to the power of 3 to the power of 4 but yui reset code renders it as 2 to the power of 34
            Hide
            korpelainen Mauno Korpelainen added a comment -

            I mean reset-min.css (not reset.min.js)

            Show
            korpelainen Mauno Korpelainen added a comment - I mean reset-min.css (not reset.min.js)
            Hide
            korpelainen Mauno Korpelainen added a comment -
            Show
            korpelainen Mauno Korpelainen added a comment - See http://moodle.org/mod/forum/discuss.php?d=163685 for more details
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Bumping this up to major.

            Show
            samhemelryk Sam Hemelryk added a comment - Bumping this up to major.
            Hide
            lazydaisy Mary Evans added a comment -

            Well it looks like this might be my next PULL request Sam!

            Show
            lazydaisy Mary Evans added a comment - Well it looks like this might be my next PULL request Sam!
            Hide
            tsala Helen Foster added a comment -

            It would be great if you could fix this Mary!

            Show
            tsala Helen Foster added a comment - It would be great if you could fix this Mary!
            Hide
            lazydaisy Mary Evans added a comment -

            Hi Helen, There is another ticket MDL-25434 about the same issue. Is there a way to merge these two tickets? That way I can clear both then at the same time. Thanks!

            Show
            lazydaisy Mary Evans added a comment - Hi Helen, There is another ticket MDL-25434 about the same issue. Is there a way to merge these two tickets? That way I can clear both then at the same time. Thanks!
            Hide
            tsala Helen Foster added a comment -

            Hi Mary,

            You can merge two issues by linking them. Select 'Link' from the More Actions dropdown menu above then choose "Duplicated", "Will be resolved by" etc. as necessary.

            Show
            tsala Helen Foster added a comment - Hi Mary, You can merge two issues by linking them. Select 'Link' from the More Actions dropdown menu above then choose "Duplicated", "Will be resolved by" etc. as necessary.
            Hide
            lazydaisy Mary Evans added a comment - - edited

            MDL-25434 is now linked to MDL-25565 since both have one and the same problem.

            Show
            lazydaisy Mary Evans added a comment - - edited MDL-25434 is now linked to MDL-25565 since both have one and the same problem.
            Hide
            lazydaisy Mary Evans added a comment -

            I've added a PULL request for this issue, so hopefully it should be fixed in the next weekly update. I think it was committed too late for this weeks!

            Show
            lazydaisy Mary Evans added a comment - I've added a PULL request for this issue, so hopefully it should be fixed in the next weekly update. I think it was committed too late for this weeks!
            Hide
            tsala Helen Foster added a comment -

            Mary, thanks for fixing this issue. The fix is available in this week's 2.0.2+.

            Show
            tsala Helen Foster added a comment - Mary, thanks for fixing this issue. The fix is available in this week's 2.0.2+.
            Hide
            lazydaisy Mary Evans added a comment -

            Thank you Helen!

            Show
            lazydaisy Mary Evans added a comment - Thank you Helen!

              People

              • Votes:
                3 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  5/May/11