creative
SASS
2019.09.19 21:36

Sass Numeric Functions

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

단축키

Prev이전 문서

Next다음 문서

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

단축키

Prev이전 문서

Next다음 문서

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

 

Function Description & Example
abs(number) Returns the absolute value of number.

Example:
abs(15)
Result: 15
abs(-15)
Result: 15
ceil(number) Rounds number up to the nearest integer.

Example:
ceil(15.20)
Result: 16
comparable(num1num2) Returns whether num1 and num2 are comparable.

Example:
comparable(15px, 10px)
Result: true
comparable(20mm, 1cm)
Result: true
comparable(35px, 2em)
Result: false
floor(number) Rounds number down to the nearest integer.

Example:
ceil(15.80)
Result: 15
max(number...) Returns the highest value of several numbers.

Example:
max(5, 7, 9, 0, -3, -7)
Result: 9
min(number...) Returns the lowest value of several numbers.

Example:
min(5, 7, 9, 0, -3, -7)
Result: -3
percentage(number) Converts number to a percentage (multiplies the number with 100).

Example:
percentage(1.2)
Result: 120
random() Returns a random number between 0 and 1.

Example:
random()
Result: 0.45673
random(number) Returns a random integer between 1 and number.

Example:
random(6)
Result: 4
round(number) Rounds number to the nearest integer.

Example:
round(15.20)
Result: 15
round(15.80)
Result: 16
?

List of Articles
번호 분류 제목 날짜 조회 수
41 SASS Sass @while 2019.09.20 187
40 SASS Sass @for 2019.09.20 133
39 SASS Sass @each 2019.09.20 127
38 SASS Sass @if and @else 2019.09.20 141
37 SASS Sass Operators 2019.09.20 119
36 SASS Sass Introspection Functions 2019.09.19 107
35 SASS Sass Color Functions 2019.09.19 93
34 SASS Sass Selector Functions 2019.09.19 68
33 SASS Sass Map Functions 2019.09.19 122
32 SASS Sass List Functions 2019.09.19 98
» SASS Sass Numeric Functions 2019.09.19 92
30 SASS Sass String Functions 2019.09.19 182
29 SASS Sass @extend 2019.09.19 133
28 SASS Sass @mixin과 @include 2019.09.19 167
27 SASS Sass @import 2019.09.19 172
26 SASS Sass 중첩 규칙과 속성 2019.09.19 116
25 SASS Sass 변수 2019.09.19 126
24 SASS Sass 소개 2019.09.19 154
23 SASS SASS 샘플 2019.08.16 252
22 HTML ::after ::before 토글 사용 예제 2019.06.28 239
Board Pagination Prev 1 2 3 Next
/ 3

Menu