Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • bobptz Friend
    #1016633

    Hi

    I am using gtmetrix to optimize the website. One of the issues reported is this:
    +++++
    Avoid CSS @import

    The following external stylesheets were included in https://example.com/t3-assets/css/css-39c54-80107.css using @import.

    https://example.com/media/system/css/system.css
    +++++

    Is there a recommended way to do fix this?

    I mean, I do know how to fix it manually. I am just not sure if I will fix it in the right place, if the file I will fix is the original source or a cached one etc. Therefore I am asking you.

    Saguaros Moderator
    #1017002

    Hi,

    That css file in ‘t3-assets’ folder is temporary folder which holds the compressed css / js files, it’s hard to find that @import query. You can try with a 3rd party extension such as JCH Optimize to optimize site.

    Regards

    bobptz Friend
    #1017050

    Hi

    JCH optimize adds some overhead and sometimes it is significant. I did it by hand and will keep track of it, in case of update.

    Maybe you can tell the developers to consider changing the @import with a more friendly statement like this:
    <link rel="/media/system/css/system.css" href="/media/system/css/system.css" type="text/css">
    (taken from https://varvy.com/pagespeed/avoid-css-import.html )

    Saguaros Moderator
    #1017606

    Thank you for your report. I will pass to the team for further checking.

    bobptz Friend
    #1019586

    ++++++++++++++

    Hi,

    The problem here is that Purity III is built with Bootstrap framework and when developing with LESS, you must use @import statement to import necessary variables which are declared in different LESS files.

    Hope you understand.

    Regards
    +++++++++++++++++++

    Maybe in your reply above (from this thread : https://www.joomlart.com/forums/topic/css-validator-too-many-errors-and-warnings/ ) you wanted to reply on this thread instead?

    I can tell you that even after my change, I do not see a problem that could be caused from it.

    Saguaros Moderator
    #1020195

    I replied in that topic, kindly follow it.

    bobptz Friend
    #1020203

    I am sorry, are you talking about the @import problem?

    The problem with the @import command that imports the following file:
    https://example.com/media/system/css/system.css

    This is not a less file, it does not have any variables to import.

    Saguaros Moderator
    #1020874

    May I know which file has that @import command for this css file?

    bobptz Friend
    #1020891

    error…

    bobptz Friend
    #1020898

    The @import statement is here:
    /templates/system/css/system.css

    This how I deal with the problem: This needs to be done when I am still in Development mode, BEFORE I compile the LESS into CSS files.

    1) Download the following files:
    A) /media/system/css/system.css
    B) /templates/system/css/system.css
    2) The B file has an @import statement to include the A file. Remove this and just paste the entire A file inside the B file.
    3) Upload the B file.

    Saguaros Moderator
    #1021886

    These are core files of Joomla, did you try to raise the same topic to Joomla forum?

    bobptz Friend
    #1021888

    /templates/system/css/system.css is core joomla? I am sorry, I did not realize this.

    I may do this.

Viewing 12 posts - 1 through 12 (of 12 total)

This topic contains 11 replies, has 2 voices, and was last updated by  bobptz 7 years, 7 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum