SASS
2019.09.19 21:44
Sass Introspection Functions
조회 수 2421 추천 수 0 댓글 0
스타일 시트를 작성할 때 내부 검사 함수는 거의 사용되지 않습니다. 그러나 무언가가 제대로 작동하지 않으면 가치가 있습니다. 디버깅 기능과 같은 상황을 파악하십시오.
Function | Description & Example |
---|---|
call(function, arguments...) | Calls a function with arguments, and returns the result. |
content-exists() | Checks whether the current mixin was passed a @content block. |
feature-exists(feature) | Checks whether feature is supported by the current Sass implementation. Example: feature-exists("at-error"); Result: true |
function-exists(functionname) | Checks whether the specified function exists. Example: function-exists("nonsense") Result: false |
get-function(functionname, css: false) | Returns the specified function. If css i true, it returns a plain CSS function instead. |
global-variable-exists(variablename) | Checks whether the specified global variable exists. Example: variable-exists(a) Result: true |
inspect(value) | Returns a string representation of value. |
mixin-exists(mixinname) | Checks whether the specified mixin exists. Example: mixin-exists("important-text") Result: true |
type-of(value) | Returns the type of value. Can be number, string, color, list, map, bool, null, function, arglist. Example: type-of(15px) Result: number type-of(#ff0000) Result: color |
unit(number) | Returns the unit associated with a number. Example: unit(15px) Result: px |
unitless(number) | Checks whether the specified number has a unit associated with it. Example: unitless(15px) Result: false unitless(15) Result: true |
variable-exists(variablename) | Checks whether the specified variable exists in the current scope. Example: variable-exists(b) Result: true |
번호 | 분류 | 제목 | 날짜 | 조회 수 |
---|---|---|---|---|
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 |
» | SASS | Sass Introspection Functions | 2019.09.19 | 2421 |
35 | SASS | Sass Color Functions | 2019.09.19 | 3608 |
34 | 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 |