CSS Functions Reference

CSS Functions Reference


CSS Functions Reference
Here in this topic we will see all the functions available in CSS with their descriptions  -
1. calc() function - 
Accepts a mathematical expression and returns a numerical value. 
It is especially useful when working with different types of units (e.g. subtracting a px value from a percentage) to calculate the value of an attribute.
2. attr() function
The function returns the value of an attribute of the selected element. 
3. var() function
The var() function allows CSS variables to be accessed by external values.
4. radial-gradient() function
Creates an image representing a gradient of colors radiating from the center of the gradient.
5. linear-gradient() function
Creates an image representing a linear gradient of colors. 
6. Conic-gradient()
This creates a conic gradient
7. counter() - 
This returns the current value of the counter named.
8. cubic-bezier()
This function is used to define a Cubic Bezier curve.
9. hsl() - 
Used to define the colors using the Hue-Saturation-Lightness model.
10. hsla() - 
This defines colors using the Hue-Saturation-Lightness-Alpha model.
11. max() - 
Uses the largest value as property value from a list of values separated by a comma.
12. min() - 
Uses the minimum value as property value from a list of values separated by a comma.
13. repeating-conic-gradient()
As the name suggests, the conic gradient.
14. Repeating-linear-gradient()
As the name suggests, the linear gradient.
15. repeating-radial-gradient()
As the name suggests, the radial gradient.
16. rgb()
Used to define colors using the Red-Green-Blue model.
17. rgba()
Used to define colors using the Red-Green-Blue-Alpha model.