Sass Variables
- strings
- numbers
- colors
- booleans
- lists
- nulls
변수의 선언
$variablename: value;
$myFont: Helvetica, sans-serif; $myColor: red; $myFontSize: 18px; $myWidth: 680px; body { font-family: $myFont; font-size: $myFontSize; color: $myColor; } #container { width: $myWidth; }
Sass 변수 범위
입력
$myColor: red; h1 { $myColor: green; color: $myColor; } p { color: $myColor; }
출력
h1 { color: green; } p { color: red; }
!global 사용
입력
$myColor: red; h1 { $myColor: green !global; color: $myColor; } p { color: $myColor; }
출력
h1 { color: green; } p { color: green; }
번호 | 분류 | 제목 | 날짜 | 조회 수 |
---|---|---|---|---|
41 | SASS | Sass @while | 2019.09.20 | 929 |
40 | SASS | Sass @for | 2019.09.20 | 614 |
39 | SASS | Sass @each | 2019.09.20 | 545 |
38 | SASS | Sass @if and @else | 2019.09.20 | 555 |
37 | SASS | Sass Operators | 2019.09.20 | 551 |
36 | SASS | Sass Introspection Functions | 2019.09.19 | 512 |
35 | SASS | Sass Color Functions | 2019.09.19 | 480 |
34 | SASS | Sass Selector Functions | 2019.09.19 | 411 |
33 | SASS | Sass Map Functions | 2019.09.19 | 521 |
32 | SASS | Sass List Functions | 2019.09.19 | 572 |
31 | SASS | Sass Numeric Functions | 2019.09.19 | 507 |
30 | SASS | Sass String Functions | 2019.09.19 | 690 |
29 | SASS | Sass @extend | 2019.09.19 | 547 |
28 | SASS | Sass @mixin과 @include | 2019.09.19 | 616 |
27 | SASS | Sass @import | 2019.09.19 | 605 |
26 | SASS | Sass 중첩 규칙과 속성 | 2019.09.19 | 531 |
» | SASS | Sass 변수 | 2019.09.19 | 538 |
24 | SASS | Sass 소개 | 2019.09.19 | 520 |
23 | SASS | SASS 샘플 | 2019.08.16 | 867 |
22 | HTML | ::after ::before 토글 사용 예제 | 2019.06.28 | 928 |