0
Welcome Guest! Login
0 items Join Now

SOLVED How can we import folders with scss?

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

    SOLVED How can we import folders with scss?

    Posted 3 years 5 months ago
    • We have a folder structure like

      /config
      /components
      /etc etc etc

      How can we get the SCSS importer to work to bring those files in?
    • Just a lonely web designer trying to make his way
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: SOLVED How can we import folders with scss?

    Posted 3 years 5 months ago
    • You can't - you import scss on a file by file basis - even our templates do that.

      e.g. in your custom.scss if you have a file called /templates/TEMPLATENAME/custom/scss/_yourfile.scss the you put @import "yourfile";

      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.
    • Eoin's Avatar
    • Eoin
    • Hero Rocketeer
    • Posts: 413
    • Thanks: 17

    Re: SOLVED How can we import folders with scss?

    Posted 3 years 5 months ago
    • So if a file is within a folder will this work


      @import "foldername/_filename";
      


      ?
    • Just a lonely web designer trying to make his way
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: SOLVED How can we import folders with scss?

    Posted 3 years 5 months ago
    • No, on two counts.

      1. You must drop the "_" when you do the import.

      2. for it to work. the "foldername" must be a child folder of the folder in which the file you are doing the import is.

      So in a custom.scss file @import "foldername/fred"; will work if the file is in /foldername/_fred.scss within the /custom/scss folder (because that is where the custom.scss file resides).

      Regards, Mark.
    • The following users have thanked you: Eoin

    • 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.
    • Eoin's Avatar
    • Eoin
    • Hero Rocketeer
    • Posts: 413
    • Thanks: 17

    Re: SOLVED How can we import folders with scss?

    Posted 3 years 5 months ago
    • Thanks Mr T, you the man
    • Just a lonely web designer trying to make his way

Time to create page: 0.044 seconds