0
Welcome Guest! Login
0 items Join Now

If I use too many SCSS imports Firefox can't work out which file

    • Eoin's Avatar
    • Eoin
    • Hero Rocketeer
    • Posts: 413
    • Thanks: 17

    If I use too many SCSS imports Firefox can't work out which file

    Posted 3 years 10 months ago
    • I know this may not be Gantry's fault, but just in case it could be I'm asking here. And also because my Googling is not working, so perhaps someone may suggest the right Google search for me.

      I use a lot of files for my SCSS. There's no real reason not to and it means my files are super organised which is great.

      But after a while when trying to find an error via inspect element Firefox gives me a totally different file. It's not usually a close guess either, it's just a random choice of file. When I go there it does not contain the CSS rule.

      Can anyone think of a way to solve this issue?

      I haven't got an example to hand as I've just fixed a problem on a live site. Fortunately, because of my naming conventions it makes issues easyish to find. But it would still be nice if it was precise.
    • Last Edit: 3 years 10 months ago by Eoin.
    • Just a lonely web designer trying to make his way
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: If I use too many SCSS imports Firefox can't work out which file

    Posted 3 years 10 months ago
    • An inspector won't show the originating scss files (unless you've got sourcemaps enabled). It will instead show the css files produced by the scss compiler. If you use a compressor (e.g. rokbooster or jch_optimize) they will take those files and combine them into other files. Caching and CDN's will make it even worse. In other words, it will get very confusing and hard to see where the originating statement came from. So... when developing your site, make sure you do the following:

      1. Make sure any compressors are turned off.
      2. Make such any caching is turned off (global config, system page cache plugin, cdn like cloudflare).
      3. Make sure sourcemaps are turned OFF in your browser inspector tool settings.
      4. Make sure you are in "development" mode in Gantry 5 (not production mode).
      5. Make sure gzip compression (global config) is turned off.
      6. Clear server and CDN cache.

      If you still think that you have an issue then I would like to see an example of what you mean.

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.

Time to create page: 0.048 seconds