설치

아래의 extension을 vscode에서 설치 해주세요

Sass Guidelines

live sass compiler 사용

  1. index.html 준비

    <!DOCTYPE html>
    <html lang="en">
      <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
      </head>
      <body>
    		<div class="container1">
          <h1>Hello</h1>
        </div>
    		<div class="container2">
          <h1>World</h1>
        </div>
      </body>
    </html>
    
  2. sass 파일 생성

    style.scss

    body {
      background : pink
    }
    
  3. live sass 실행

    https://s3-us-west-2.amazonaws.com/secure.notion-static.com/f8d9f21d-45f7-4371-b38f-5c93133ba4eb/Untitled.png

    아래와 같이 output 결과가 나오면서 scsscss로 컴파일 됩니다.

    https://s3-us-west-2.amazonaws.com/secure.notion-static.com/d7a27b81-4fdd-49b5-a065-9e63f340e86e/Untitled.png

    아래와 같이 style.css와 style.css.map을 생성하게 됩니다.

    https://s3-us-west-2.amazonaws.com/secure.notion-static.com/33eea298-f104-491a-ab4e-6df24da57baf/Untitled.png

  4. style.css 연결

    이제 컴파일된 css 파일을 index.html에 연결하면 됩니다. 아래의 코드를 <header> 안에 넣어 주세요

    <link rel="stylesheet" href="style.css" />
    
  5. live server 실행

    https://s3-us-west-2.amazonaws.com/secure.notion-static.com/de42f36e-4614-4dae-8f0d-712f99f3dcdc/Untitled.png

그러면 다음과 같은 화면을 볼 수 있습니다.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/80eeef64-36e1-408e-9cb7-0471359725b1/Untitled.png

SASS 기능

크게 4개의 메인과 2개의 사이드 기능이 있습니다.