Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-38856 META: Issues around Bootstrapbase and Clean theme
  3. MDL-40321

Bootstrap print styles add urls to all links, even Moodle internal ones

    Details

    • Testing Instructions:
      Hide
      1. Select Clean theme
      2. In any browser use 'Print Preview' of the front page and observe that the link URL's are appended to the text.
      3. Apply the patch.
      4. In any browser use 'Print Preview' of the front page and observe that the link URL's are no longer appended to the text.
      Show
      Select Clean theme In any browser use 'Print Preview' of the front page and observe that the link URL's are appended to the text. Apply the patch. In any browser use 'Print Preview' of the front page and observe that the link URL's are no longer appended to the text.
    • Workaround:
      Hide

      Use the following CSS in the 'Clean' theme's custom CSS setting:

      @media print {
        a[href]:after {
          content: "";
        }
      }
      

      Show
      Use the following CSS in the 'Clean' theme's custom CSS setting: @media print { a[href]:after { content: ""; } }
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      wip-MDL-40321_master

      Description

      The Bootstrap CSS pulls in some print styles that append the destination URL to links in the printout. This is helpful for printed content, but needs some kind of exception to stop it doing it for Moodle internal links.

      I added an exception for our institution by using this rule:

      a[href^="http://startofyourmoodle.url.com"]:after

      { content:""}

      But that doesn't generalise to any Moodle. Perhaps completely negating the print rule (which is in theme/bootstrapbase/less/reset.less) might be a good idea. The rule could then be re-instated but targetting only Moodle content in some way?

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  7 Vote for this issue
                  Watchers:
                  8 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    8/Jul/13