Sass / SCSS COMPLETE Tutorial (+ Node.js & NPM) with Real-World Example

Поделиться
HTML-код
  • Опубликовано: 27 июл 2024
  • 👉 NEW React & Next.js Course: bytegrad.com/courses/professi...
    Hi, I'm Wesley. I'm a brand ambassador for Kinde (paid sponsorship). I'll help you master the latest tech here:
    👉 Professional JavaScript Course: bytegrad.com/courses/professi...
    👉 Professional CSS Course: bytegrad.com/courses/professi...
    👉 Email newsletter (React + Next.js course out soon!): email.bytegrad.com
    💻 Premium Courses:
    Professional JavaScript: bytegrad.com/courses/professi...
    Professional CSS: bytegrad.com/courses/professi...
    All courses: bytegrad.com/courses
    🔔 Email newsletter (get notified of new courses): email.bytegrad.com
    ⏱️ Timestamps:
    0:00 - Intro: learn Sass because you will see it often as a developer
    0:40 - Create a Sass file (SCSS syntax)
    1:33 - Copy everything from CSS-file to Sass-file
    2:38 - Benefits of using Sass today
    3:04 - Benefit 1 of Sass: nesting (with &)
    8:31 - Benefit 2 of Sass: variables (with $) - better syntax than custom properties in plain CSS
    14:57 - Benefit 3 of Sass: comments in Sass
    15:50 - Compile Sass / SCSS to CSS
    16:14 - Use Node.js and NPM to compile Sass to CSS
    18:20 - Using the terminal in VS Code
    19:05 - node -v (command) to see current Node.js version installed
    19:54 - Initialize project for NPM (everything is a package in NPM)
    20:25 - package.json file
    20:48 - Using NPM-package to compile Sass into CSS
    21:34 - npm install sass
    24:29 - Write a script in package.json to use the NPM-package we just installed
    25:37 - Running an NPM-script
    27:55 - We don't want the sourcemap file (use --no-source-map)
    29:17 - Automatic compiling with --watch
    31:35 - Summary
    #css #sass #scss #sassscss #csssass #webdevelopment #coding #programming
  • НаукаНаука

Комментарии • 44

  • @a.alrawi9725
    @a.alrawi9725 Месяц назад +2

    one of the most useful explanations, it is amazing.

  • @neatunet
    @neatunet 2 года назад +5

    Thank you! I'm so glad I found your channel. Not only did you explain how to use SASS, but also told about npm and what the node_modules are. I subscribed to your channel 😊
    Please, continue doing these tutorials, I'm sure that you'll be popular one day!

  • @smnahin345
    @smnahin345 Год назад +2

    Wow..!!! What an excellent tutorial.
    Thank you so much. I was suffering for a long time using sass.
    But you made it easy for me. Thanks

  • @monambike
    @monambike 2 года назад +1

    amazing video, u explain pretty well, thank u so much for sharing your acknowledgement, work and dedication!

  • @bibakomk
    @bibakomk Год назад +1

    thanks for sharing it was so easy to follow along really appreciate it!

  • @emarekica
    @emarekica Год назад +1

    Lovely, thank you for detailed explanations!

  • @user-kl8pl7zg7w
    @user-kl8pl7zg7w 2 года назад +1

    AMAZING!!!!!!!! thanks a lot!!

  • @king94596511
    @king94596511 Год назад +1

    the one im looking for! thx

  • @LuxKal1122
    @LuxKal1122 2 года назад +1

    very good lesson i love it , thanks

  • @orcunaicovers17
    @orcunaicovers17 Год назад +1

    Thanks for your clean explanations

  • @user-rq4jz3or4t
    @user-rq4jz3or4t Год назад +1

    Great explanation, keep on ✌🏻

  • @user-zp2si9zr3y
    @user-zp2si9zr3y 5 месяцев назад

    this was great. i appriciate the lovely dead pan joke of "you should read this ofcourse" at 16.50
    which is maybe not a joke, but also pretty much a joke.

  • @alfaroleonsebas97
    @alfaroleonsebas97 Год назад +1

    Excellent tutorial, thanks. I would like to know if there is a way to compile all the scss files in a folder at once with one script.

  • @venomoussteel8933
    @venomoussteel8933 2 месяца назад +1

    thanks a lot

  • @khorajia
    @khorajia 2 года назад +3

    Of all the tutorials available on SASS, this one is by far the best one here on RUclips. Great explanation.
    Appreciate your efforts in creating this tutorial.
    Thank you.
    PS. Keep the style of your teaching same across all tutorials. Subscribed to your channel.

    • @Yoshiic
      @Yoshiic Год назад +1

      i'm agree , this was very helpful

  • @ibrahimbek2804
    @ibrahimbek2804 2 года назад +1

    thank you

  • @BSITVinluanEner
    @BSITVinluanEner 2 года назад +3

    I love how relax yu explain information and btw is it okay to go with scss for 2022?

    • @ByteGrad
      @ByteGrad  2 года назад +1

      Thanks! Absolutely, I use it in many projects

  • @parkerAmv
    @parkerAmv 2 года назад +1

    Thanks a lot this is really help me, because im not really good at english but i can understand what your are saying

    • @ByteGrad
      @ByteGrad  2 года назад +1

      Great to hear, Parker!

  • @master_shifuuu
    @master_shifuuu Год назад

    It would be great if you installed css autoprefixer with sass and teach us how to add autoprefixer to the project.

  • @muhammaddwisusanto5925
    @muhammaddwisusanto5925 Год назад +1

    good

  • @elric7371
    @elric7371 2 года назад +1

    Good tutorial. I do have questions this line "compile":"sass --watch --no-source-map main.scss main.css" is it possible that i can select the main.scss from a specific folder in the project as well as have the main.css compile to a specific folder? Thanks

    • @ByteGrad
      @ByteGrad  2 года назад +3

      EDIT:
      Thanks. Yes, absolutely. These are just file paths. Example:
      "compile": "sass --watch --no-source-map ./another/main.scss ./dist/main.css"
      This would look for a folder named ‘another’ in the same folder (./) as the package.json file, then select the main.scss in there. For the output, it would look for a folder called ‘dist’ in the same folder (./) as the package.json file and put the compiled css file in there.
      ‘main.scss' and 'main.css' are technically also paths, they could also be written as ‘./main.scss’ and ‘./main.css’.

  • @user-rq4jz3or4t
    @user-rq4jz3or4t Год назад +1

    Hello , Can’t we just use live dass compiler instead of using node.Js and downloading npm packages ? Thanks

    • @ByteGrad
      @ByteGrad  Год назад +1

      Yes, that would work too

  • @jairorodrigues4815
    @jairorodrigues4815 Год назад +1

    Great tutorial, what vs code font you are using?

    • @ByteGrad
      @ByteGrad  Год назад +1

      It’s the Monokai theme

  • @rickokodr--
    @rickokodr-- Год назад

    Thank you for this useful lesson. but how i can put all files under the watch command

    • @ByteGrad
      @ByteGrad  Год назад

      Try using live-server as normal

  • @ByteGrad
    @ByteGrad  Год назад

    Hi, mastering CSS is critical as a front-end developer: www.udemy.com/course/professional-css/?referralCode=4C3C08E82629E6B15752
    Also, mastering JavaScript is critical if you want to be a modern, professional developer: www.udemy.com/course/professional-javascript-course/?referralCode=0C1D5752923168BC87C2

  • @DoveDev
    @DoveDev Год назад

    I hope you make somthing together with js files and like how to use "type": ""module", with live server and stuff like

    • @ByteGrad
      @ByteGrad  Год назад +1

      It’s probably too niche for RUclips, but that is 100% part of my JavaScript course

  • @MMIStudios
    @MMIStudios Год назад

    Great tutorial. Is there a way to compile all files in a directory? I tried using wildcards like "compile": "sass --watch --no-source-map src/style/*.scss src/style/*.css" but that failed.

    • @ByteGrad
      @ByteGrad  Год назад +1

      Good question. It doesn’t seem possible. But you can import all the other Sass files into a main.scss file and compile that 1

    • @MMIStudios
      @MMIStudios Год назад +1

      @@ByteGrad what I ended up doing was creating a script for each scss file and then joining them all in the dev script using the “concurrently” package. I am actually now using this method to not just compile my css but for starting both the client and server of my entire MERN app.

    • @ByteGrad
      @ByteGrad  Год назад

      Interesting

  • @adhdmed
    @adhdmed 2 года назад +1

    Great Tutorial, really appreciate it. Can you please provide a link to the source code?

    • @ByteGrad
      @ByteGrad  2 года назад +1

      Here you can find the final code: github.com/ByteGrad/Professional-CSS-Course/tree/master/BetterPhotos/video-20

    • @adhdmed
      @adhdmed 2 года назад +1

      @@ByteGrad thanks buddy

  • @leandramps
    @leandramps Год назад

    npm should be run outside of the Node.js REPL, in your normal shell.
    (Press Ctrl+D to exit.)
    Nope, not working

    • @ByteGrad
      @ByteGrad  Год назад

      Hi, what specifically isn’t working?

  • @abdonasr342
    @abdonasr342 Год назад +1

    AMAZING!!!!!!!! thanks a lot!!