Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Gulp sass question

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #242605
    Juc1
    Participant

    Hi all,

    Previously I have imported partials in my styles.scss – something like this https://i.imgur.com/CQoOHLU.jpg

    But in https://css-tricks.com/gulp-for-beginners gulpfile.js has the line:

    return gulp.src(‘app/sass/**/*.scss’) // Gets all files ending with .scss in app/scss and children dirs

    Does this mean that there is no need to import sass partials in styles.scss?

    Thanks…

    #242658
    MattDiMu
    Participant

    No, you still need to import the partials or at least that’s what you probably want.

    The Gulp-Task will transform all *.scss-files, but ignore files starting with “_”. The reason behind this is, that you don’t want all your scss-files to be transformed alone (and therefore create the same amount of css-files), but one (or maybe two) css-file, which contain everything.

    Furthermore you’ve probably structured your scss over different files (mixins, variables being used in different files, etc.) and without your @importstatements they won’t know anything of each other.

    tldr: no, you still need to import your partials.

    #242667
    Juc1
    Participant

    @ MattDiMu ok got it thanks. One more thing please – if my styles.scss specifies a file such as @import “variables/colors”; it will import ok but if I try to use wildcards such as @import “variables/**/*.scss”; I get a “File to import not found or unreadable” error – details here http://pastebin.com/GrWP7z4J – any ideas please where the problem is?

    Thanks…

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.