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

    XMLWordPrintable

Details

    • MOODLE_25_STABLE
    • MOODLE_25_STABLE, MOODLE_26_STABLE
    • wip-MDL-40321_master
    • 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: ""; } }
    • 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.

    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?

      Attachments

        1. mdl_40321_clean_1.png
          mdl_40321_clean_1.png
          104 kB
        2. mdl_40321_clean_2.png
          mdl_40321_clean_2.png
          85 kB
        3. mdl_40321_standard_1.png
          mdl_40321_standard_1.png
          117 kB
        4. mdl_40321_standard_2.png
          mdl_40321_standard_2.png
          126 kB
        5. mdl_40321_standard_3.png
          mdl_40321_standard_3.png
          97 kB

        Issue Links

          Activity

            People

              gb2048 Gareth J Barnard
              bawjaws David Scotson
              Mary Evans Mary Evans
              Damyon Wiese Damyon Wiese
              Jérôme Mouneyrac Jérôme Mouneyrac
              Votes:
              7 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                8/Jul/13