Functions Flashcards
What is a custom property in CSS?
A variable prefixed with two dashes (–), used to tokenize values in CSS.
How does the var() function work in CSS?
It takes one required argument: the name of a custom property and returns its value.
What does the url() function do in CSS?
It takes a string URL and is used to load images, fonts, and content.
What does the calc() function do in CSS?
It evaluates a single math expression and allows mixing of units.
What do the min() and max() functions do in CSS?
min(): Returns the smallest computed value among given arguments.
max(): Returns the largest computed value among given arguments.
What does the clip-path function do in CSS?
It defines the visible area of an element by clipping it into a specific shape.
What does the rotate() function do in CSS?
It rotates an element around its center axis.
How do you rotate an element along a specific axis in CSS?
Use rotateX(), rotateY(), or rotateZ().
What is the rotate3d() function in CSS?
It takes four arguments:
The first three define the x, y, and z coordinates.
The fourth defines the rotation angle.
What does the scale() function do in CSS?
It changes the size of an element along the x and y axes.
What does the translate() function do in CSS?
It moves an element while maintaining its position in the document flow.
How does translate() work with one vs. two arguments?
One argument: Moves along the x-axis.
Two arguments: Moves along both x and y axes.