2019.09.19 21:39

Sass Selector Functions

조회 수 2241 추천 수 0 댓글 0


Prev이전 문서

Next다음 문서

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


Prev이전 문서

Next다음 문서

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


Function Description & Example
is-superselector(supersub) Checks whether the super selector matches all the elements that sub matches.

is-superselector("div", "div.myInput")
Result: true
is-superselector("div.myInput", "div")
Result: false
is-superselector("div", "div")
Result: true
selector-append(selectors) Appends the second (and third/fourth etc.) selector to the first selector.

selector-append("div", ".myInput")
Result: div.myInput
selector-append(".warning", "__a")
Result: .warning__a
selector-nest(selectors) Returns a new selector containing a nested list of CSS selectors based on the list provided.

selector-nest("ul", "li")
Result: ul li
selector-nest(".warning", "alert", "div")
Result: .warning div, alert div
selector-parse(selector) Returns a list of strings contained in selector using the same format as the parent selector.

selector-parse("h1 .myInput .warning")
Result: ('h1' '.myInput' '.warning')
selector-replace(selectororiginalreplacement) Returns a new selector with the selectors specified in replacement in place of selectors specified in original.

selector-replace("p.warning", "p", "div")
Result: div.warning
selector-unify(selector1selector2) Returns a new selector that matches only elements matched by both selector1 and selector2.

selector-unify("myInput", ".disabled")
Result: myInput.disabled
selector-unify("p", "h1")
Result: null
simple-selectors(selectors) Returns a list of the individual selectors in selectors.

Result: div, .myInput
Result: div, .myInput, :before

List of Articles
번호 분류 제목 날짜 조회 수
41 SASS Sass @while 2019.09.20 3238
40 SASS Sass @for 2019.09.20 2747
39 SASS Sass @each 2019.09.20 2444
38 SASS Sass @if and @else 2019.09.20 3222
37 SASS Sass Operators 2019.09.20 2607
36 SASS Sass Introspection Functions 2019.09.19 2421
35 SASS Sass Color Functions 2019.09.19 3608
» SASS Sass Selector Functions 2019.09.19 2241
33 SASS Sass Map Functions 2019.09.19 2377
32 SASS Sass List Functions 2019.09.19 2613
31 SASS Sass Numeric Functions 2019.09.19 2367
30 SASS Sass String Functions 2019.09.19 3713
29 SASS Sass @extend 2019.09.19 2290
28 SASS Sass @mixin과 @include 2019.09.19 2998
27 SASS Sass @import 2019.09.19 2341
26 SASS Sass 중첩 규칙과 속성 2019.09.19 2360
25 SASS Sass 변수 2019.09.19 2141
24 SASS Sass 소개 2019.09.19 13118
23 SASS SASS 샘플 2019.08.16 2872
22 HTML ::after ::before 토글 사용 예제 2019.06.28 3141
Board Pagination Prev 1 2 3 Next
/ 3