Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-10279

External CSS imports that are not on the top of the final CSS file should not be ignored

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • 4.9.0
    • 4.2.11
    • None

      How to reproduce it :

      • declare a google font with this code into a css file :
        @import url(//fonts.googleapis.com/css?family=Advent+Pro:400,700,600,500,300,100,200);

        > font is not imported

      • declare the same font but prefixing it with http://
        > it works

          [CMS-10279] External CSS imports that are not on the top of the final CSS file should not be ignored

          The external imports are not resolved by the minimifier.
          If the final @import instruction is not at the top, it will be ignore be the browser.
          We can do the following :

          • move external imports at the top
          • warn it, since it can break the layout (even if it will be less broken that not importing at all)

          Raphaël Franchet added a comment - The external imports are not resolved by the minimifier. If the final @import instruction is not at the top, it will be ignore be the browser. We can do the following : move external imports at the top warn it, since it can break the layout (even if it will be less broken that not importing at all)

          to retest carefully (together?) because the code already do this

           

          maybe we were disturbed by the issue of imports not at first line

          Raphaël Franchet added a comment - to retest carefully (together?) because the code already do this   maybe we were disturbed by the issue of imports not at first line

            Unassigned Unassigned
            llopez Laure Lopez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: