Notice
Recent Posts
Recent Comments
Link
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
Archives
Today
Total
관리 메뉴

web sprit

[SASS] SASS 컴파일 style 종류 본문

Front End Developer/SASS

[SASS] SASS 컴파일 style 종류

커드만 2018. 1. 11. 15:20

scss 를 컴파일 하는 style 은 4가지 스타일이 존재합니다.

1. nested

2. expanded

3. compact

4. compressed


일반 scss 문법을 통하여 css 로 어떻게 컴파일 되는지 확인해 보겠습니다.

scss

1
2
3
4
5
6
7
html{
    font-size:10px;
    body{
        color:red;
        font-family: serif;
    }
}
cs



css

nested

sass 형식과 유사하게 nested된 css 파일이 생성됩니다. 기본값으로 옵션을 추가하지 않아도 기본 적용됩니다.

1
2
3
4
5
html {
  font-size: 10px; }
  html body {
    color: red;
    font-family: serif; }
cs



expanded

표준적인 스타일의 css 파일이 생성됩니다.

1
2
3
4
5
6
7
html {
  font-size: 10px;
}
html body {
  color: red;
  font-family: serif;
}
cs



compact (추천)

여러 룰셋을 한줄로 나타내는 스타일의 css 파일이 생성됩니다.

1
2
html { font-size: 10px; }
html body { color: red; font-family: serif; }
cs



compressed (추천)

가능한 빈공간이 없는 압축된 스타일의 css 파일이 생성됩니다.

1
html{font-size:10px}html body{color:red;font-family:serif}
cs


sass 컴파일은 node-seass 나 sass 가 설치 되어 있어야하며

명령어 종류를 확인하고 싶다면 설치후 sass -h 명령어를 입력하면 됩니다.

이상으로 sass 컴파일 style 종류에 대해서 알아봤습니다.

'Front End Developer > SASS' 카테고리의 다른 글

SASS 사용하기 (문법)  (0) 2016.12.04
SASS 설치  (0) 2016.04.01
SASS 란?  (0) 2016.03.31
Comments