-
AuthorPosts
-
bobptz Friend
bobptz
- Join date:
- November 2016
- Posts:
- 178
- Downloads:
- 8
- Uploads:
- 19
- Thanks:
- 1
- Thanked:
- 1 times in 1 posts
March 9, 2017 at 6:45 am #1016633Hi
I am using gtmetrix to optimize the website. One of the issues reported is this:
+++++
Avoid CSS @importThe 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 ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
March 10, 2017 at 7:04 am #1017002Hi,
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 Friendbobptz
- Join date:
- November 2016
- Posts:
- 178
- Downloads:
- 8
- Uploads:
- 19
- Thanks:
- 1
- Thanked:
- 1 times in 1 posts
March 10, 2017 at 8:39 am #1017050Hi
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 ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
March 13, 2017 at 4:28 am #1017606Thank you for your report. I will pass to the team for further checking.
bobptz Friendbobptz
- Join date:
- November 2016
- Posts:
- 178
- Downloads:
- 8
- Uploads:
- 19
- Thanks:
- 1
- Thanked:
- 1 times in 1 posts
March 17, 2017 at 9:13 pm #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 ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
March 20, 2017 at 4:19 pm #1020195I replied in that topic, kindly follow it.
bobptz Friendbobptz
- Join date:
- November 2016
- Posts:
- 178
- Downloads:
- 8
- Uploads:
- 19
- Thanks:
- 1
- Thanked:
- 1 times in 1 posts
March 20, 2017 at 4:29 pm #1020203I 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.cssThis is not a less file, it does not have any variables to import.
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
March 22, 2017 at 10:32 am #1020874May I know which file has that @import command for this css file?
bobptz Friendbobptz
- Join date:
- November 2016
- Posts:
- 178
- Downloads:
- 8
- Uploads:
- 19
- Thanks:
- 1
- Thanked:
- 1 times in 1 posts
March 22, 2017 at 10:56 am #1020891error…
bobptz Friendbobptz
- Join date:
- November 2016
- Posts:
- 178
- Downloads:
- 8
- Uploads:
- 19
- Thanks:
- 1
- Thanked:
- 1 times in 1 posts
March 22, 2017 at 11:05 am #1020898The @import statement is here:
/templates/system/css/system.cssThis 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. -
AuthorPosts
This topic contains 11 replies, has 2 voices, and was last updated by bobptz 7 years, 8 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum