Functions Flashcards

1
Q

What is a custom property in CSS?

A

A variable prefixed with two dashes (–), used to tokenize values in CSS.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How does the var() function work in CSS?

A

It takes one required argument: the name of a custom property and returns its value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does the url() function do in CSS?

A

It takes a string URL and is used to load images, fonts, and content.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does the calc() function do in CSS?

A

It evaluates a single math expression and allows mixing of units.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What do the min() and max() functions do in CSS?

A

min(): Returns the smallest computed value among given arguments.

max(): Returns the largest computed value among given arguments.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does the clip-path function do in CSS?

A

It defines the visible area of an element by clipping it into a specific shape.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does the rotate() function do in CSS?

A

It rotates an element around its center axis.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you rotate an element along a specific axis in CSS?

A

Use rotateX(), rotateY(), or rotateZ().

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the rotate3d() function in CSS?

A

It takes four arguments:

The first three define the x, y, and z coordinates.
The fourth defines the rotation angle.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does the scale() function do in CSS?

A

It changes the size of an element along the x and y axes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does the translate() function do in CSS?

A

It moves an element while maintaining its position in the document flow.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How does translate() work with one vs. two arguments?

A

One argument: Moves along the x-axis.

Two arguments: Moves along both x and y axes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly