We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 50272
    • 89 Posts
    Hi Folks

    Although it seems so easy to set up this extra, I'm having all sorts of problems with cssSweet.
    Beyond the default 'csss.custom_css.scss' file, I cannot get it to compile any other chunks I assign to the 'scss_chunks' plugin setting field.
    I have created a chunk for each css module (header, footer etc) and pointed each chunk at their corresponding static resource. I have created a new property set and set the two system events to use that property set.
    I have tried combinations of specifying paths, leaving as defaults etc etc.
    The default chunk is processed without a problem, but any other additional chunks results
    in the console hanging on
    Applying scssphp formatter class: Leafo\ScssPhp\Formatter\Crunched


    I have found the author's various threads on the plugin, not very clear at all (to me anyway).
    Can anyone possibly shed any light on my woes?
    This really seems to be the business if I can get it working.

    Many thanks in advance.
    Chris


    My setup:
    MODX latest (2.6.1)
    MAMP (4.3)
    PHP (7)
    MySQL (5.6.38)
    Chrome: Std and Canary (latest versions)
    MacOS Sierra 10.12.6
      • 36549
      • 572 Posts
      I too am having issues getting this extra to work. I had to manually enter the system settings which can't be right can it?
      Can anybody put up a step-by-step tutorial please?
        www.9thwave.co.uk
           WEB | DESIGN | PRINT
      • I use this plugin a fair bit and there are a few things you need to do when you set it up.

        Go the saveCustomCss plugin and firstly create your own Property Set and then set the following:

        css_filename = this is the name of the css file that is output
        css_path = this is the location where the css_filename will be created. If it is under your assets folder you can start the path with [[++assets_path]]/folderName/
        scss_chunks = name of chuck you are using to write your css (recommend creating your own to prevent overwrite when extra is updated)

        At the bottom of the Properties tab there is a check box for Pre-process tags in Property Values - make sure this is checked otherwise your property set will not run.

        Save the property set.

        NOTE: when the extra is updated you will need to double check that this check box is still checked...

        Lastly go to System Events and change the propertyset for OnChunkFormSave and OnChunkFormSave to your own property set.

        And don't forget to save everything...

        Next Clear Cache - this might need to be done a couple of times after you've change the properties.

        If the clear cache hangs at the csssweet processing it will be due to the fact that there is a typo or incorrectly formatted css. This is very frustrating and can take a bit of digging to find... but in my experience it can be caused by missing closing } or using ] or text appearing outside /* */ marks.

        Attached are a couple of screenshots to hopefully clarify the above.



          Helen Warner
          Number one pixel!
          Proud to be linked with MODX at Crimson Pixel
          • 38783
          • 571 Posts
          As Helen mentions the problem can be caused by incorrect syntax in your sass document. I see you (geordiechris) are using a Mac. You could possibly check for errors using CodeKit which is a Mac app that process sass files (amongst other things). https://codekitapp.com/
            If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

            email: [email protected] | website: https://andytough.com
            • 50272
            • 89 Posts
            Apologies for the tardiness but many thanks guys.

            My problem was not with the sass files or hardware, but with my paths.

            There seems to be some discrepancy with reference to a trailing slash after the System Setting
            i.e.
            [[++assets_path]]/pathway/to/folder/or/file

            Vs
            [[++assets_path]]pathway/to/folder/or/file


            It seems the System Setting includes the trailing slash and therefore
            the latter worked for me.
            It now remains consistent and robust.

            Thanks once again
            Chris