SASS
2019.09.19 21:37

Sass List Functions

조회 수 110 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

사스의 시작단위는  0이 아닌 1부터 시작합니다.

Function Description & Example
append(listvalue, [separator]) Adds a single value to the end of the list. separator can be auto, comma, or space. auto is default.

Example:
append((a b c), d)
Result: a b c d
append((a b c), (d), comma)
Result: a, b, c, d
index(listvalue) Returns the index position for the value in list.

Example:
index(a b c, b)
Result: 2
index(a b c, f)
Result: null
is-bracketed(list) Checks whether the list has square brackets.

Example:
is-bracketed([a b c])
Result: true
is-bracketed(a b c)
Result: false
join(list1list2, [separator, bracketed]) Appends list2 to the end of list1separator can be auto, comma, or space. auto is default (will use the separator in the first list). bracketed can be auto, true, or false. auto is default.

Example:
join(a b c, d e f)
Result: a b c d e f
join((a b c), (d e f), comma)
Result: a, b, c, d, e, f
join(a b c, d e f, $bracketed: true)
Result: [a b c d e f]
length(list) Returns the length of the list.

Example:
length(a b c)
Result: 3
list-separator(list) Returns the list separator used, as a string. Can be either space or comma.

Example:
list-separator(a b c)
Result: "space"
list-separator(a, b, c)
Result: "comma"
nth(listn) Returns the nth element in the list.

Example:
nth(a b c, 3)
Result: c
set-nth(listnvalue) Sets the nth list element to the value specified.

Example:
set-nth(a b c, 2, x)
Result: a x c
zip(lists) Combines lists into a single multidimensional list.

Example:
zip(1px 2px 3px, solid dashed dotted, red green blue)
Result: 1px solid red, 2px dashed green, 3px dotted blue
?

List of Articles
번호 분류 제목 날짜 조회 수
41 SASS Sass @while 2019.09.20 227
40 SASS Sass @for 2019.09.20 168
39 SASS Sass @each 2019.09.20 151
38 SASS Sass @if and @else 2019.09.20 160
37 SASS Sass Operators 2019.09.20 135
36 SASS Sass Introspection Functions 2019.09.19 134
35 SASS Sass Color Functions 2019.09.19 102
34 SASS Sass Selector Functions 2019.09.19 78
33 SASS Sass Map Functions 2019.09.19 150
» SASS Sass List Functions 2019.09.19 110
31 SASS Sass Numeric Functions 2019.09.19 172
30 SASS Sass String Functions 2019.09.19 198
29 SASS Sass @extend 2019.09.19 150
28 SASS Sass @mixin과 @include 2019.09.19 185
27 SASS Sass @import 2019.09.19 182
26 SASS Sass 중첩 규칙과 속성 2019.09.19 125
25 SASS Sass 변수 2019.09.19 142
24 SASS Sass 소개 2019.09.19 169
23 SASS SASS 샘플 2019.08.16 281
22 HTML ::after ::before 토글 사용 예제 2019.06.28 295
Board Pagination Prev 1 2 3 Next
/ 3