DEV Community

Mohammed Ali
Mohammed Ali

Posted on

Ultimate Sass-Scss Cheatsheet [Live Doc]

clear                       // clear the screen
ls                          // list file contents
cd ..                       // Switch to parent directory
mkdir <folder-name>         // Make directory
cd <folder-name>            // Change directory
touch <file.extension>      // Create a file with the extension provided
cp index.js ..              // Copy file into parent directory
mv script.js ..             // Move file into parent directory
rm index.js                 // Permanently delete the file
rm -r <directory-name>      // Delete the directory
rm script.js index.js       // Permanently delte multiple files
open hero.jpg               // Will open the pic in default pic viewer
Enter fullscreen mode Exit fullscreen mode
  • Always inside a folder on a Linux based system

  • Mixin = A piece of code stored under a common name which can be used repeatedly at different places.
    An argument is passed to a mixin, which can be used by it.

  • Function = Inbuilt as well as used defined fns can be created.

  • BOTH mixin, functions can have arguments. And don't produce any CSS code. They only help us to write code.

  • Extend = If its a mixin, code is brought from its definition to the place of invocation. If its an extend, code is taken from the calling place to its definition.

  • Although mixin & extend look similar, but work very differently behind the scenes.

  • Use mixins generally for all cases.

  • Use extend whenever the elements are pretty related like it happened here.

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs